predict.sbo_kgram_freqs {sbo} | R Documentation |
Predictive text based on Stupid Back-off N-gram model.
## S3 method for class 'sbo_kgram_freqs'
predict(object, input, lambda = 0.4, ...)
object |
a |
input |
a length one character vector, containing the input for next-word prediction. |
lambda |
a numeric vector of length one. The back-off penalization in Stupid Back-off algorithm. |
... |
further arguments passed to or from other methods. |
A tibble containing the next-word probabilities for all words in the dictionary.
Valerio Gherardi
predict(twitter_freqs, "i love")