Example of NLTK's Vader Scoring Text

旧时模样 提交于 2019-12-06 07:28:48

It's just your normalization that is wrong. From the code the function is defined:

def normalize(score, alpha=15):
"""
Normalize the score to be between -1 and 1 using an alpha that
approximates the max expected value
"""
norm_score = score/math.sqrt((score*score) + alpha)
return norm_score

So you have 3.8/sqrt(3.8*3.8 + 15) = 0.7003

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!