PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.17k stars 2.95k forks source link

information_extraction 情感分析传入数组时返回个别数据返回为空 #2421

Closed zhaozhaozhaozzz closed 1 year ago

zhaozhaozhaozzz commented 2 years ago

欢迎您反馈PaddleNLP使用问题,非常感谢您对PaddleNLP的贡献! 在留下您的问题时,辛苦您同步提供如下信息:

PaddlePaddle版本号:2.3 系统环境:Linux hi-prod-20 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

场景:情感分析 参考案例:https://github.com/PaddlePaddle/PaddleNLP/blob/release/2.3/docs/model_zoo/taskflow.md#%E6%83%85%E6%84%9F%E5%80%BE%E5%90%91%E5%88%86%E6%9E%90

异常描述:当传入情感分析的为数组时,有部分返回为空,如图: image

schema = '情感倾向[正向,中性,负向]' ie = Taskflow("information_extraction", schema=schema, model='uie-tiny') res_tmp = ie(arr) #arr为一个需做情感分析的数组

数组数据: 数据.xlsx

wawltor commented 2 years ago
image
  1. 当行文本输入的时候,也是出现了空结果,出现空结果的原因是模型没有判断出具体哪个分类是正确的,如果每行都想输出的结果,可以设置 position_prob 概率来输出结果的置信度
 e = Taskflow('information_extraction', schema=schema, model='uie-tiny', position_prob=0.01) 
  1. 看schema UIE对三分类的情感分类识别效果不好,这是因为UIE在基础数据微调的时候主要是进行二分类情感分析,如果想提升效果可以标注一些数据进行微调
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。