fst_freq_plot {finnsurveytext}R Documentation

Make Top Words plot

Description

Plots most common words.

Usage

fst_freq_plot(table, number = NULL, name = NULL)

Arguments

table

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

number

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

name

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

Value

Plot of top words.

Examples

cb <- conllu_cb_bullying
pf <- c("NOUN", "VERB", "ADJ", "ADV")
top_bullying_words <- fst_get_top_words(cb, number = 15, pos_filter = pf)
fst_freq_plot(top_bullying_words, number = 5, name = "Bullying")

q11_1 <- conllu_dev_q11_1_nltk
q11_1_ngrams <- fst_get_top_ngrams(q11_1, number = 10, ngrams = 1)
fst_freq_plot(q11_1_ngrams)

[Package finnsurveytext version 1.0.0 Index]