Compute sentiment scores given tokens.

compute_sent_summ_facet_at(data = NULL, token = NULL, feature = NULL,
  facet = NULL, lexicon = "bing", ...)

compute_sent_summ_facet(..., token, feature, facet)

compute_sent_summ_at(data = NULL, facet = NULL, ...)

compute_sent_summ(..., token, feature, facet)

Arguments

data

data.frame. Must already be in 'tidy' format.

token

bare for NSE; character for SE. Name of column in data whose values are scored.

feature

bare for NSE; character for SE. Name of column in data whose values serve as entity across which 'token' values are scored. Probably something like 'sentence', or, in the case of Twitter data, 'status_id'.

facet

bare for NSE; character for SE. Name of column in data used for grouping in the case that there are more than one entitiy.

lexicon

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

...

dots. Parameters to pass to get_sents() internally.

Value

data.frame.

Details

Heavily influenced by Text Mining with R. Creates output columns 'sentiment' and 'score'.

See also

Don't have an explicit url.