emoxicon_scores {transforEmotion} | R Documentation |
Emoxicon Scores
Description
A bag-of-words approach for computing emotions in text data using the lexicon compiled by Araque, Gatti, Staiano, and Guerini (2018).
Usage
emoxicon_scores(text, lexicon, exclude)
Arguments
text |
Matrix or data frame. A data frame containing texts to be scored (one text per row) |
lexicon |
The lexicon used to score the words. The default is the |
exclude |
A vector listing terms that should be excluded from the lexicon.
Words specified in |
Author(s)
Tara Valladares <tls8vx at virginia.edu> and Hudson F. Golino <hfg9s at virginia.edu>
References
Araque, O., Gatti, L., Staiano, J., and Guerini, M. (2018). DepecheMood++: A bilingual emotion lexicon built through simple yet powerful techniques. ArXiv
See Also
emotions
, where we describe how we modified the original DepecheMood++ lexicon.
Examples
# Obtain "emotions" data
data("emotions")
# Obtain "tinytrolls" data
data("tinytrolls")
## Not run:
# Obtain emoxicon scores for first 10 tweets
emotions_tinytrolls <- emoxicon_scores(text = tinytrolls$content, lexicon = emotions)
## End(Not run)