Module tokenizers::models::unigram
source · Expand description
Unigram model.
Structs§
- Structure to implement Viterbi algorithm to find the best encoding, or sample from all possible encodings of a given sentence.
- A node from the lattice, that helps reconstruct the underlying
String - A
Unigrammodel to encode sentences. - Iterator to iterate of vocabulary of the model, and their relative score.
- A
UnigramTrainercan train aUnigrammodel fromword_counts. - Builder for
UnigramTrainer.
Enums§
- Error type for UnigramTrainerBuilder