2017-08-25 190 views
0

我使用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的负面疼痛和给出0或更高极性的TextBlob。

这些是一种文本只是从根本上难以情感分析算法,或者是有其他的方法,我可以考虑?

我提到的图书馆的吸引力在于,我没有做我自己的分类数据集,但我可能会考虑,如果我很可能会取得更好的成绩。

回答

1

基本的区别是,大多数现有的工具上的个别单词的景气指数工作。例如,在文本中的任何地方找到“喜欢”或“优秀”都会表示积极评价。你的例子更多的取决于对短语的一些“理解”,只需要最少的解析。这是一个更加详细的过程,需要更深入地理解语言语义。

你的一种方法可能攻击这是用索引短语(插入为单词)以及单词来填充词典。然后,您会预处理输入,以将这些短语转换为您在词典中使用的任何指示。例如,将这些短语加下划线 - “dark_side”在您的词典中,并且索引为负数。

我希望这给你一个有用的方向轻推。

+0

非常感谢回复,欣赏我的问题很模糊!我会考虑为Vader或TextBlob的词典添加条款......对于未来的Google员工,我发现[本页](http://sentiment.christopherpotts.net/lexicon/textscores_results/)有助于评估不同词典将处理文本。 – user2950747