Description Usage Arguments Value Examples
Generate word-frequency table for Markov text generation.
1 | get_word_freqs(text_input, num_words = 500, n_grams = c(2, 3))
|
text_input |
A |
num_words |
(Default 500) The number of unique words to include in the table. |
n_grams |
(Default 2) Accepts values 2 or 3. How many words should we look at when computing frequencies? |
A tbl_df
suitable for markov_text::generate_text().
1 2 3 4 | ## Not run: wordfreqs_prideprejudice <- get_word_freqs(dplyr::tibble(text = janeaustenr::prideprejudice))
generate_text(wordfreqs_prideprejudice)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.