Negation handling in NLP

前端 未结 1 941
孤城傲影
孤城傲影 2021-02-06 00:16

I\'m currently working on a project, where I want to extract emotion from text. As I\'m using conceptnet5 (a semantic network), I can\'t however simply prefix words in a sentenc

相关标签:
1条回答
  • 2021-02-06 00:59

    Cases like wasn't can be simply parsed by tokenization (tokens = nltk.word_tokenize(sentence)): wasn't will turn into was and n't.

    But negative meaning can also be formed by 'Quasi negative words, like hardly, barely, seldom' and 'Implied negatives, such as fail, prevent, reluctant, deny, absent', look into this paper. Even more detailed analysis can be found in Christopher Potts' On the negativity of negation .

    Considering your initial problem, sentiment analysis, most modern approaches, as far as I know, don't process negations explicitly; instead, they use supervised approaches with high-order n-grams. Those actually processing negation usually append special prefix NOT_ to all words between negation and punctuation marks.

    0 讨论(0)
提交回复
热议问题