The package sentimentr
provides tools to calculate text polarity sentiment at the sentence level and
optionally aggregate by rows or grouping variable. One of its functions, sentiment
, approximates the sentiment (polarity) of text by sentence. In particular,
sentiment(text.var, polarity_dt = lexicon::hash_sentiment_jockers_rinker, ...)
text.var
is the text variable, whereas polarity_dt
is the dictionary provided by lexicon
package. I would like to know whether it is possible to extend the set of terms in the lexicon
dictionaries, by adding words (with their corresponding scores) to them.