【PaddleHub创意赛】APP评论情感分析

项目链接

无意中测试了一下paddlehub的情感分析的(唯一的三分类模型)预训练模型emotion_detection_textcnn,发现英文的准确度好像没有中文高?

同一句话的中英文测试:

import paddlehub as hub

module = hub.Module(name = "emotion_detection_textcnn")#模型加载
test_text = ["你真丑", "You're so ugly"]
input_dict = {"text": test_text} #文字输入
results = module.emotion_classify(data = input_dict) #预测结果

for result in results:
    print(result['text'])
    print(result['emotion_label'])
    print(result['emotion_key'])
    probs_name = result['emotion_key'] + "_probs"
    #print(result['negative_probs'])
    #print(probs_name)
    print(result[probs_name])
#你真丑
#0
#negative
#0.9627
#You're so ugly
#1
#neutral
#0.9766

 本来是贬义的句子被误判为中性~

Kaggle的Google Play数据集含有APP的评论信息(包含:“APP”:APP的名称,“Translated_Review”:用户评论(已预处理并翻译成英文),“Sentiment”:情感分为:积极/消极/中性,“Sentiment_Polarity”:情绪极性得分,“Sentiment_Subjectivity”:情绪主观性得分

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值