简体   繁体   English

偏向斯坦福CoreNLP的负面情绪

[英]Bias towards negative sentiments from Stanford CoreNLP

I'm experimenting with deriving sentiment from Twitter using Stanford's CoreNLP library, a la https://www.openshift.com/blogs/day-20-stanford-corenlp-performing-sentiment-analysis-of-twitter-using-java - so see here for the code that I'm implementing. 我正在尝试使用斯坦福大学的CoreNLP库从Twitter获得情绪,这是一个来自https://www.openshift.com/blogs/day-20-stanford-corenlp-performing-sentiment-analysis-of-twitter-using-java-所以请看这里我正在实现的代码。

I am getting results, but I've noticed that there appears to be a bias towards 'negative' results, both in my target dataset and another dataset I use with ground truth - the Sanders Analytics Twitter Sentiment Corpus http://www.sananalytics.com/lab/twitter-sentiment/ - even though the ground truth data do not have this bias. 我得到了结果,但我注意到,在我的目标数据集和我使用的另一个数据集中,似乎存在对“负面”结果的偏见 - Sanders Analytics Twitter Sentiment Corpus http://www.sananalytics .com / lab / twitter-sentiment / - 即使地面实况数据没有这种偏见。

I'm posting this question on the off chance that someone else has experienced this and/or may know if this is the result of something I've done or some bug in the CoreNLP code. 我发布这个问题是因为其他人经历过这个问题并且/或者可能知道这是我做过的事情的结果还是CoreNLP代码中的一些错误。

(edit - sorry it took me so long to respond) I am posting links to plots showing what I mean. (编辑 - 抱歉,我花了这么长时间才回复)我发布链接显示我的意思。 I don't have enough reputation to post the images, and can only include two links in this post, so I'll add the links in the comments. 我没有足够的声誉来发布图片,并且在这篇文章中只能包含两个链接,因此我将在评论中添加链接。

I'd like to suggest this is simply a domain mismatch. 我想建议这只是一个域名不匹配。 The Stanford RNTN is trained on movie review snippets and you are testing on twitter data. 斯坦福RNTN受过电影评论片段的培训,您正在测试Twitter数据。 Other than the topics mismatch, tweets also tend to be ungrammatical and use abbreviated ("creative") language. 除了主题不匹配之外,推文也往往是不合语法的,并使用缩写(“创意”)语言。 If I had to suggest a more concrete reason, I would start with a lexical mismatch. 如果我不得不提出一个更具体的理由,我会从一个词汇不匹配开始。 Perhaps negative emotions are expressed in a domain-independent way, eg with common adjectives, and positive emotions are more domain-dependent or more subtle. 也许负面情绪以与领域无关的方式表达,例如使用普通形容词,而积极情绪则更依赖于领域或更微妙。

It's still interesting that you're getting a negative bias. 你得到负面偏见仍然很有趣。 The Polyanna hypothesis suggests a positive bias, IMHO. Polyanna假设提出了一个积极的偏见,恕我直言。

Going beyond your original question, there are several approaches to do sentiment analysis specifically on microblogging data. 超越原始问题,有几种方法专门针对微博数据进行情绪分析。 See eg "The Good, The Bad and the OMG!" 参见例如“好,坏,和OMG!” by Kouloumpis et al. 由Kouloumpis等人。

Michael Haas points out correctly that there is a domain mismatch, which is also specified by Richard Socher in the comments section. 迈克尔哈斯正确地指出存在域名不匹配,这也是Richard Socher在评论部分中指出的

Sentences with a lot of unknown words and imperfect punctuation get flagged as negative. 带有大量未知单词和不完美标点符号的句子被标记为否定。

If you are using Python, VADER is a great tool for twitter sentiment analysis. 如果您使用的是Python, VADER是推特情绪分析的绝佳工具。 It is a rule based tool with only ~300 lines of code and a custom made lexicon for twitter, which has ~8000 words including slangs and emoticons. 它是一个基于规则的工具,只有大约300行代码和一个定制的twitter词典,有大约8000个单词,包括俚语和表情符号。

It is easy to modify the rules as well as the lexicon, without any need for re-training. 无需重新培训即可轻松修改规则和词典。 It is fully free and open source. 它是完全免费和开源的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM