cjhutto / vaderSentiment

VADER Sentiment Analysis. VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media, and works well on texts from other domains.
MIT License
4.43k stars 1k forks source link

Incorrect results for sentences containing negations #71

Open hoonkai opened 5 years ago

hoonkai commented 5 years ago

Hi

First of all, great work!

I've noticed some negations are analysed incorrectly. For instance,

Not the worst show I've seen-------- {'neg': 0.0, 'neu': 0.603, 'pos': 0.397, 'compound': 0.5096} Not the worst ever but definitely worst this year------ {'neg': 0.0, 'neu': 0.372, 'pos': 0.628, 'compound': 0.879}

The compound scores are incorrectly positive as these two sentences are neural at best.

cjhutto commented 4 years ago

Made an update that corrects for the second sentence -- clearly it should be negative in the compound score. Your intuition is probably correct for the first sentence (I haven't tested it, but I would guess most people would say it was neutral or some degree of negative)... so if there was a general rule that could be applied to catch these types of exceptions, we could make a change to the analysis engine to detect it and account for it... (note that VADER's rule evaluation engine is already catching the negation of "Not" used with the adjective "worst").