Unigram Tokenizer
Category: NLP / Language Processing
A subword tokenization method that starts with a large vocabulary and iteratively removes tokens to optimize a unigram language model likelihood.
Full Explanation
The unigram tokenizer takes a top-down approach to building a subword vocabulary, starting with a large set of candidate tokens and progressively pruning those whose removal least affects the overall likelihood of the training data. This contrasts with BPE, which builds the vocabulary bottom-up through merges. The algorithm assigns probabilities to each token and finds the most likely segmentation of any given word using the Viterbi algorithm. Unigram tokenization is one of the two methods supported by SentencePiece and is used in models like ALBERT and XLNet. It tends to produce more flexible segmentations and can naturally handle multiple valid tokenizations of the same word. The probabilistic framework makes it theoretically elegant and practically effective.
Related Terms
More in NLP / Language Processing
Explore More
- AI Tools Library — Discover AI tools related to Unigram Tokenizer
- AI Education — Courses to learn about NLP / Language Processing
- AI News — Latest news and updates