| model_unigram | R Documentation |
An implementation of the Unigram algorithm
An implementation of the Unigram algorithm
tok::tok_model -> tok_model_unigram
new()Constructor for Unigram Model
model_unigram$new(vocab = NULL, unk_id = NULL, byte_fallback = FALSE)
vocabA dictionary of string keys and their corresponding relative score.
Default: NULL.
unk_idThe unknown token id to be used by the model.
Default: NULL.
byte_fallbackWhether to use byte-fallback trick. Default: FALSE.
clone()The objects of this class are cloneable with this method.
model_unigram$clone(deep = FALSE)
deepWhether to make a deep clone.
Other model:
model_bpe,
model_wordpiece,
tok_model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.