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

Negation case-sensitivity #46

Closed
zHaytam opened this issue Apr 20, 2018 · 4 comments
Closed

Negation case-sensitivity #46

zHaytam opened this issue Apr 20, 2018 · 4 comments

Comments

@zHaytam
Copy link

zHaytam commented Apr 20, 2018

Hello,

Today I randomly tried to evaluate the following sentence: 'Not bad at all'. To my surprise, the compound was negative so I was trying to find out why would it.

After a quick read of the source code, I understood that Vader only handles lowercase negation.
Is there any solution to this?

A first instect is to .lower the whole text, but that would make things terrible, I'll be losing some key-features of Vader like GOOD vs good etc..

I'm thinking (as a last resort) to split the words, check NEGATE contains their lowercase form and re-write the sentence with the negations in lowercase, but I'm hopping for a better solution.

Thank you.

@cjhutto
Copy link
Owner

cjhutto commented Apr 20, 2018

Oh -- GREAT CATCH! That case should absolutely should be caught (and it was correctly handled in the former Python 2.7 version of VADER) -- I think it got lost in the shuffle when we modularized for speed/performance increases while updating for Python 3... at any rate, the solution is pretty simple, I'll update the function that checks for negation to compare lowercase versions of input words to negation words. (That way, we won't lose the ability to detect capitalization emphasis and such).

Again - thanks for the heads up! I'll push the update soon.

@zHaytam
Copy link
Author

zHaytam commented Apr 22, 2018

Glad I could help. Is there a date for the update? Not trying to rush you or anything, I just want to know if I should keep my solution or just wait for the update 😄

@cjhutto
Copy link
Owner

cjhutto commented Apr 23, 2018

About to push it out this evening...

@cjhutto
Copy link
Owner

cjhutto commented Apr 23, 2018

@zHaytam it should be ready to go using pip install --upgrade vaderSentiment.

Thanks!

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

2 participants