twitter_sentiment: NRC sentiment analysis

Description Usage Arguments Source Examples

View source: R/twitter_sentiment.R

Description

This function is to get NRC sentiment lexicons using tidytext package. The function joins one column of words and another column of categories of lexicon. NRC provides 105 different langauge lexicon

Usage

1
twitter_sentiment(df, language, undesirable_words)

Arguments

df

The preprocessed twitter data frame

language

The language set

undesirable_words

The set of words to eliminate for the analysis

Source

Silge and Robinson (2016) tidytext: Text Mining and Analysis Using Tidy Data Principles in R

Saif Mohammad and Peter Turney (2013) Crowdsourcing a Word-Emotion Association Lexicon, Computational Intelligence, 29 (3), 436-465

Examples

1
df_sent <- twitter_sentiment(df_pre, language = "es", undesirable_words = c("lol", "wtf"))

BeaJJ/ComTxt documentation built on Dec. 17, 2021, 10:46 a.m.