Get words associated with a lexicon for subsequent sentiment analysis.

get_sents(lexicon = c("bing", "afinn", "nrc", "loughran"), normalize = TRUE)

Arguments

lexicon

character. Specifies lexicon to use. Must be a lexicon available in the tidytext::package.

normalize

logical. Only releveant if lexicon = 'afinn'. Renormalizes 'afinn' scores to -1 to 1 range.

Value

data.frame

Details

Called by compute_sent_facet_summary(). This function is essentially a customized version of tidytext::get_sentiments().

See also

https://github.com/juliasilge/tidytext/blob/master/R/sentiments.R.