Skip to contents

Plots frequency n-grams.

Usage

fst_ngrams_plot(table, number = NULL, ngrams = 1, name = NULL)

Arguments

table

Output of `fst_get_top_words()` or `fst_get_top_ngrams()`.

number

Optional number of n-grams for title, default is `NULL`.

ngrams

The type of n-grams, default is `1`.

name

An optional "name" for the plot to add to title, default is `NULL`.

Value

Plot of top n-grams.

Examples

top_bigrams <- fst_ngrams_table(fst_child, ngrams = 2, number = 15)
#> Note:
#>  N-grams with equal occurrence are presented in alphabetical order. 
#>  By default, n-grams are presented in order to the `number` cutoff n-gram. 
#>  This means that equally-occurring later-alphabetically n-grams beyond the cutoff n-gram will not be displayed. 
#> 
fst_ngrams_plot(top_bigrams, ngrams = 2, number = 15, name = "Children")