Description Usage Arguments Details Value Author(s) Examples
Generate random text based on Stupid Back-off language model.
1 |
model |
a |
input |
a length one character vector. Starting point for babbling!
If |
n_max |
a length one integer. Maximum number of words to generate. |
L |
a length one integer. Number of next-word suggestions from which to sample (see details). |
This function generates random text from a Stupid Back-off language
model.
babble
randomly samples one of the top L next word
predictions. Text generation stops when an End-Of-Sentence token is
encountered, or when the number of generated words exceeds n_max.
A character vector of length one.
Valerio Gherardi
1 2 3 4 | # Babble!
p <- sbo_predictor(twitter_predtable)
set.seed(840) # Set seed for reproducibility
babble(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.