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.38k stars 1k forks source link

Vader returning not accurate result #118

Open ImSanjayChintha opened 3 years ago

ImSanjayChintha commented 3 years ago

I am trying to pass a statement 'Nothing, Everything is great.' to vader, it is actually returning as 'Negative' but it is actually 'Positive' statment.

from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer analyser = SentimentIntensityAnalyzer()

def sentiment_analyzer_scores(sentence): score = analyser.polarity_scores(sentence)

max_key = max(score, key=score.get)

#print(status[max_key], score[max_key] * 100)
if(score['compound'] >= 0.05):
    return 'Positive'
elif (score['compound'] > -0.05 and score['compound'] < 0.05):
    return 'Neutral'
elif (score['compound'] <= -0.05):
    return 'Negative'
else:
    return 'None'

sentiment_analyzer_scores("Nothing. Everything is great") // Returns Negative, but it is actually positive statement.