如何才能提高新闻头条情绪分析的准确性?

时间:2017-08-25 21:04:21

标签: python sentiment-analysis textblob vader

我使用VaderTextBlob来分析新闻标题的情绪,结果喜忧参半:我认为略有负面的许多头条都被评为中性。以下是一些例子:

Who wants to live in an artificially intelligent future?
# Vader: {'compound': 0.4588, 'pos': 0.273, 'neu': 0.727, 'neg': 0.0}
# TextBlob: Sentiment(polarity=0.2840909090909091, subjectivity=0.40625)

The internet and social media provide huge opportunities for the coming generation, but there’s a dark side from which it must be protected.
# Vader: {'compound': 0.743, 'pos': 0.278, 'neu': 0.722, 'neg': 0.0}
# TextBlob: Sentiment(polarity=0.09444444444444448, subjectivity=0.45555555555555555)

For three months I’ve lived without tech and now realise we need to question its ever-encroaching invasion – before we end up in bed with a sex robot.
# Vader {'compound': 0.0, 'pos': 0.0, 'neu': 1.0, 'neg': 0.0}
# TextBlob Sentiment(polarity=0.0, subjectivity=0.0)

我认为第一句话可以以任何一种方式阅读,但第二句肯定会对他们有负面因素:"有一个黑暗的一面"并且"它不断侵入的入侵"所以我很惊讶地发现Vader给出了0的阴性疼痛和TextBlob以给出0或者更高的极性。

对于情绪分析算法,这些文本是否根本难以解决,还是我可以考虑采用另一种方法?

我提到的图书馆的吸引力在于我不必制作自己的分类数据集,但如果我可能会得到更好的结果,我可能会考虑它。

1 个答案:

答案 0 :(得分:1)

最基本的区别在于,大多数当前工具都处理单个词的情感指数。例如,在文本中的任何地方找到“喜欢”或“优秀”将表示积极的评价。您的示例更多地取决于对短语的某些“理解”,需要最少的解析。这是一个更详细的过程,需要更深入地理解语言语义。

然后,您预处理输入以将这些短语转换为您在词典中使用的任何指示。例如,将这些短语与下划线连接 - 并且“dark_side”在您的词典中以负索引。

我希望这会让你在一个有用的方向上轻推。

相关问题