Custom negation #7544
Replies: 1 comment 2 replies
-
It looks like this is the package you're using? https://github.com/Liebeck/spacy-sentiws If so, it looks like it's dictionary-based, not statistical. Since the problem you have is with negative modifiers it's going to be very situational ("nicht gut" and "nicht schlecht" are different), so using the dependency parse to invert scores seems like a reasonable approach. You can't train it because it's dictionary based, and you can't handle modifiers just by changing the dictionary, so the dep parse is better than that. If you need to handle negations of arbitrary concepts I think you might find things get too complicated; that's just one of the limitations of dictionary based sentiment analysis. Depending on your dataset negation might not be a problem - it's pretty typical for negations to be infrequent enough that in aggregate you can ignore them and still get ok results. You might want to look at negspaCy for a package that does some handling of negation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i am trying to build a german sentiment analysis with spacy and sentiws.
The Sentence: "Das ist kein Problem" gets a negative score, because the token "kein" has a dep_ attribute of "nk" (i am filtering for dep_ == 'ng' to find negation and recalculate the sentiment score)
Is this matter of training, or would i have to use custom list of negation words to check against?
Beta Was this translation helpful? Give feedback.
All reactions