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

uie不产出任何结果,这个正常吗? #2401

Closed zouhan6806504 closed 1 year ago

zouhan6806504 commented 2 years ago

我用https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/uie 训练了一个判断一句话是否正常的模型,在预测的时候,发现有些结果无输出

from pprint import pprint
from paddlenlp import Taskflow

schema = '情感倾向[1,0]'
my_ie = Taskflow("information_extraction", schema=schema, task_path='/home/aistudio/uie_model/model_best')
pprint(my_ie("我们通过调整金属填料和配色方案为主,机场提供一系列的金属色排号,另外我们还能提供很多精致的激光雕刻纹理,直接涂层的样板。还最近我们刚刚发布的汽车行业流行的趋势所有的人。"))
pprint(my_ie("嗯嗯嗯嗯嗯。嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯!嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯嗯"))
pprint(my_ie("对啊。哎呀,就那个牌子在朋友圈看到那个牌楼换个看一下你的点赞啊!"))
pprint(my_ie("嗯。当时心心相称。三楼。"))

得到结果

[{'情感倾向[1,0]': [{'probability': 0.9996060520065164, 'text': '1'}]}]
[{'情感倾向[1,0]': [{'probability': 0.9995459742087007, 'text': '0'}]}]
[{'情感倾向[1,0]': [{'probability': 0.9992944629737011, 'text': '0'}]}]
[{}]

这个算正常情况吗?

linjieccc commented 2 years ago

相比抽取任务,分类任务需要的训练样本数量会多些,可以适当增加一些标注数据再试试

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天,即将关闭。