【发布时间】:2020-08-04 14:25:00
【问题描述】:
如标题所述,代码如下:
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
new_words = {
'????': 4.0,
}
sia = SentimentIntensityAnalyzer()
sia.lexicon.update(new_words)
sia.polarity_scores('????')
给定的表情符号被原始词典认为是负面的,但我希望它是正面的。但是按照上面的代码更新好像根本不起作用:
{'neg': 1.0, 'neu': 0.0, 'pos': 0.0, 'compound': -0.34}
【问题讨论】:
标签: python sentiment-analysis vader