This function searches for relevant words in a given text and adds sentiments labels (joy, anticipation, surprise, positive, trust, anger, sadness, fear, negative, disgust) for each of them, using NRC. Then, makes a summary for all words and plot results.
sentimentBreakdown(text, lang = "spanish", exclude = c("maduro",
"que"), append_file = NA, append_words = NA, plot = TRUE,
subtitle = NA)
Character vector
Character. Language in text (used for stop words)
Character vector. Which word do you wish to exclude?
Character. Add a dictionary to append. This file must contain at least two columns, first with words and second with the sentiment (consider sentiments on description).
Dataframe. Same as append_file but appending data frame with word and sentiment directly
Boolean. Plot results summary?
Character. Add subtitle to the plot
Other Text Mining: cleanText
,
replaceall
, textCloud
,
textFeats
, textTokenizer