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

"To die for" misinterpreted #67

Closed fcpenha closed 5 years ago

fcpenha commented 5 years ago

I have found this basic common expression which is misinterpreted by Vader:

To die for.-------------- {'neg': 0.661, 'neu': 0.339, 'pos': 0.0, 'compound': -0.5994}

Could you consider adding a new rule for that?

AbtinZo commented 5 years ago

These cases should be added to special_case_idioms list with a positive value. You can customize that list and add to it manually.

fcpenha commented 5 years ago

@AbtinZohrabi I am not sure how to add these. You mean that I have to change the source code?

AbtinZo commented 5 years ago

@fcpenha Yes, There's a variable in this file vaderSentiment/vaderSentiment.py called SPECIAL_CASE_IDIOMS. you have to add to this list

ddugovic commented 5 years ago

For ease of understanding & future development might it make sense to store SENTIMENT_LADEN_IDIOMS and SPECIAL_CASE_IDIOMS with their scores in CSV files?

(Longer-term a database might work even better, so users can easily add/change scores with which they disagree.)

fcpenha commented 5 years ago

Sincerely, I like the idea of having this as an optional parameter, which in this case would be a python dictionary. Then, you don't need to worry about changing source code, and just do pip install and be happy.

AbtinZo commented 5 years ago

@ddugovic That would be a good option

cjhutto commented 5 years ago

added to special case idiom rules