powered by
Predictive text based on Stupid Back-off N-gram model.
# S3 method for sbo_kgram_freqs predict(object, input, lambda = 0.4, ...)
a sbo_kgram_freqs object.
sbo_kgram_freqs
a length one character vector, containing the input for next-word prediction.
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.
# NOT RUN { predict(twitter_freqs, "i love") # }
Run the code above in your browser using DataLab