fst_ngrams_plot {finnsurveytext}R Documentation

Make N-grams plot

Description

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

topn_f <- fst_get_top_ngrams(conllu_dev_q11_1_f_nltk)
topn_m <- fst_get_top_ngrams(conllu_dev_q11_1_m_nltk)
topn_na <- fst_get_top_ngrams(conllu_dev_q11_1_na_nltk)
fst_ngrams_plot(topn_f, ngrams = 2, name = "Female")
fst_ngrams_plot(topn_f, ngrams = 1, number = 15)
fst_ngrams_plot(topn_m, ngrams = 2, number = 15)
fst_ngrams_plot(topn_na, ngrams = 2)

[Package finnsurveytext version 1.0.0 Index]