Open mchlandel opened 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.
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?
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
For example, the phrase
"kiss of death"
from theSPECIAL_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 theSPECIAL_CASES
dictionary, the phrase"kiss of death"
per se should have got entirely negative sentiment.But what is even more strange is that,
"it was his kiss of death"
I get'compound': -0.6124
which seems correct so long as'compound': -0.6124
for the shorter phrase"it was kiss of death"
Isn't there a bug in the tri-gram heuristic?