snownlp github:https://github.com/isnowfy/snownlp使用snownlp进行情感分析:from snownlp import SnowNLP #创建snownlp对象,设置要测试的语句 s = SnowNLP('这东西不错。。') # 调用sentiments方法获取积极情感概率 print(s.sentiments)输出: 0.83710345733