1

I'm trying to apply NRC dictionary to a particular text for sentiment analysis. It can be found in 'syuzhet' package.

Unfortunately, unlike on this tutorial, I am not getting result data frame with each row representing a sentence from file (get_nrc_sentiment part).

Does this have something to do with text organization? I kept all the punctuation in text, still it returns me just one row with some numbers for each emotion, which I don't know how to interpret.

1 Answers1

-1

get_nrc_sentiment function, for each of the words in the given sentence/data frame, returns a data frame with values for each emotions and sentiments, based on the match with the list of words and it emotions.

For example: get_nrc_sentiment("I love icecreams")

anger anticipation disgust fear joy sadness surprise trust negative positive

1 0 0 0 0 1 0 0 0 0 1

Here the word love had made the counter for "joy" and "positive" to be incremented by one. Similarly all the other words, if found a match or carries a emotion/sentiment, will be represented by this data frame.

Hope this helps.