| model_unigram {tok} | R Documentation |
An implementation of the Unigram algorithm
Description
An implementation of the Unigram algorithm
An implementation of the Unigram algorithm
Super class
tok::tok_model -> tok_model_unigram
Methods
Public methods
Method new()
Constructor for Unigram Model
Usage
model_unigram$new(vocab = NULL, unk_id = NULL, byte_fallback = FALSE)
Arguments
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.
Method clone()
The objects of this class are cloneable with this method.
Usage
model_unigram$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other model:
model_bpe,
model_wordpiece,
tok_model
[Package tok version 0.1.3 Index]