问题
I'm using syuzhet package for sentiment analysis. It is very simple for usage but I cannot find method/function where it could return all the evaluated words from sentence. It is returning only data frame with count of values correspond to eg. anger, anticipation, surprise, ..., negative, positive. But how can I get back particular words which are considered e.g. as a positive or negative...
text <- c("I love it. It's awesome!", 'Im positively surprised.', 'very bad alrighty then.', 'something is not good.')
pander::pandoc.table(syuzhet::get_nrc_sentiment(syuzhet::get_sentences(text))[,9:10])
回答1:
Download https://github.com/mjockers/syuzhet/blob/master/R/sysdata.rda
and open it in R or RStudio.
Once that's loaded, do:
View(nrc)
to see all the words and what emotion they are considered, or the other dataframes for the +/- valence
来源:https://stackoverflow.com/questions/40175803/syuzhet-package-extracting-words-evaluated-by-sentiment-score