void add(TokenType type, int id, String word, float score) {
        Node current = root;
        for (char l : word.toCharArray())
            current = current.children.computeIfAbsent(l, c -> new Node());
        current.type = type;
        current.id = id;
        current.score = score;
    }
A simple trie for sentencepiece token lookups.

@author bratseth
linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Trie.java