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.47k stars 1.01k forks source link

`SPECIAL_CASES` do not work #144

Open mchlandel opened 1 year ago

mchlandel commented 1 year ago

For example, the phrase "kiss of death" from the SPECIAL_CASES dictionary has assigned the value -1.5. Therefore, I would suppose that whole this phrase should have got negative sentiment, unlike the phrases "kiss" and "death" separately, which are positive and negative, respectively. But the code behaves strangely:

But what is even more strange is that,

Isn't there a bug in the tri-gram heuristic?

ViennaMike commented 1 year ago

If you look at the source code, while there are lists for SPECIAL_CASES and for SENTIMENT_LADEN_IDIOMS, there's no code actually using SPECIAL_CASES, and the code for SENTIMENT_LADEN_IDIOMS is only a placeholder. So no, they don't work at present.

ViennaMike commented 6 months ago

For the maintainer: I should have some time to work on adding the missing code for SPECIAL_CASES and SENTIMENT_LADEN_IDIOMS. If I put the time in and get it working, is this main branch still being maintained and are you interested in such a fix?

Siddharth-Latthe-07 commented 4 months ago

The vader module works on the basis of finding the lexical meaning of the phrases and then providing the scores between -1 and +1, so I think that it might be processing the phrase Kiss of Death, as a whole and the word death having a string negative sentiment as compared to kiss, it is showing overall negative emotion. I don't think there is a bug, in the fiunctionality, but seems work needs to be done in handling such edge case scenarios