Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPECIAL_CASES do not work #144

Open
mchlandel opened this issue Dec 6, 2022 · 3 comments
Open

SPECIAL_CASES do not work #144

mchlandel opened this issue Dec 6, 2022 · 3 comments

Comments

@mchlandel
Copy link

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:

  • for a trivial one-word sentence "kiss", I get 'compound': -0.4215, which is correct since "kiss" has positive sentiment,

  • for "death", I get 'compound': -0.5994, which is correct since "death" has very negative sentiment,

  • for a longer sentence "kiss and death", I get 'compound': -0.2732, which is correct too, since the very negative "death" is mitigated by slightly positive "kiss".

  • But for the sentence "kiss of death", I get 'compound': -0.2732 too, which seems to me incorrect since, according to the SPECIAL_CASES dictionary, the phrase "kiss of death" per se should have got entirely negative sentiment.

But what is even more strange is that,

  • for the more longer phrase "it was his kiss of death" I get 'compound': -0.6124 which seems correct so long as
  • I got the 'compound': -0.6124 for the shorter phrase "it was kiss of death"

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

@ViennaMike
Copy link

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants