【发布时间】:2021-04-08 14:40:00
【问题描述】:
我想在 vader 词典中向上更新图表并向下绘制表情符号情绪值。看到这篇文章 (VaderSentiment: unable to update emoji sentiment score) 我试图复制它但没有成功:
new_words = {
"chart decreasing" : -1,
"????" : -1
}
analyzer.lexicon.update(new_words)
analyzer.polarity_scores("????")
结果:
{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
它应该显示neg: 1.0,因为我刚刚更新了词典。
任何想法如何更新值?
【问题讨论】:
标签: python sentiment-analysis vader