首页 PaddleNLP 帖子详情
为什么我这边的UIE效果这么差呢
收藏
快速回复
PaddleNLP 问答NLP 377 8
为什么我这边的UIE效果这么差呢
收藏
快速回复
PaddleNLP 问答NLP 377 8

下面是安装了paddlepaddle和paddlenlp的运行结果

from pprint import pprint
from paddlenlp import Taskflow
schema = [{"歌曲名称":["歌手", "所属专辑"]}, "人物"]
ie = Taskflow('information_extraction', schema=schema)
res = ie("告白气球是周杰伦在专辑周杰伦的床边故事里面的歌曲")
pprint(res)

然后输出结果如下所示,

[{'人物': [{'end': 0, 'probability': 0.5001078979898921, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.37414124410717164, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4742409491852797, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.42331748655816526, 'start': 0, 'text': ''},
         {'end': 17,
          'probability': 0.34759590958617537,
          'start': 11,
          'text': '周杰伦的床边'},
         {'end': 0, 'probability': 0.5133195791393632, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.48025117440690224, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.32730528525071634, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.47878590596496906, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.2922517782195797, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4452248701464896, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4790009608644965, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.46628320562781767, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.32010232606958766, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.3273555906524166, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.42556447611627135, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4240360585885554, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.3600331909979957, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.3140833186760972, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.339787238806295, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4992510157702412, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.5067291321153107, 'start': 0, 'text': ''},
         {'end': 0, 'probability': 0.4195270828619755, 'start': 0, 'text': ''},
         {'end': 2, 'probability': 0.5068186886619515, 'start': 1, 'text': '白'},
         {'end': 0, 'probability': 0.4932384829805301, 'start': 0, 'text': ''}],
  '歌曲名称': [{'end': 22,
            'probability': 0.3787745202748738,
            'relations': {'歌手': [{'end': 0,
                                  'probability': 0.32665317139464634,
                                  'start': 0,
                                  'text': ''},
                                 {'end': 0,
                                  'probability': 0.28579000658430687,
                                  'start': 0,
                                  'text': ''}]},
            'start': 21,
            'text': '的'},
           {'end': 0,
            'probability': 0.33930692936175433,
            'start': 0,
            'text': ''},
           {'end': 0,
            'probability': 0.30901941550852285,
            'start': 0,
            'text': ''},
           {'end': 0,
            'probability': 0.2575083272613341,
            'start': 0,
            'text': ''},
           {'end': 19,
            'probability': 0.47635281904112503,
            'start': 18,
            'text': '事'},
           {'end': 20,
            'probability': 0.34064930114772807,
            'start': 19,
            'text': '里'},
           {'end': 0,
            'probability': 0.31317579925943306,
            'start': 0,
            'text': ''},
           {'end': 18,
            'probability': 0.35952550803907,
            'start': 14,
            'text': '的床边故'},
           {'end': 23,
            'probability': 0.4060809511117611,
            'start': 22,
            'text': '歌'},
           {'end': 0,
            'probability': 0.3136445791921574,
            'start': 0,
            'text': ''},
           {'end': 0,
            'probability': 0.336159163940124,
            'start': 0,
            'text': ''}]}]

Process finished with exit code 0

 

此外还尝试了几个其他的例子,发现并没有说的效果那么好,是哪里出问题造成效果这么差呢

0
收藏
回复
全部评论(8)
时间顺序
吾念
#2 回复于2023-10

1.换更大的模型试试。

2.使用几条数据微调过后再试试。

0
回复
nlp-ygq
#3 回复于2023-10

怎么又那么多的空值啊,是不是数据集不太行啊。

0
回复
李琴在努力工作
#4 回复于2023-10

hjskgs

0
回复
s
shawnshall
#5 回复于2023-10

是直接使用uie预测的,我看很多论坛上面都是可以直接跑的

0
回复
sunny风吹吧
#6 回复于2023-10

我的也是   跟别人的例子跑出来完全不一样 

0
回复
sunny风吹吧
#7 回复于2023-10

我的也是  跟别人例子跑出来完全不一样,全是这种一个个字和字符的预测,都小于0.5

0
回复
sunny风吹吧
#8 回复于2023-10

你是不是也用的conda

 

0
回复
bleacherFlame
#9 回复于2024-02

我之前是按最新版本安装的,出来的效果也是很差。我后面根据网友的提示,paddle的版本使用2.5.0rc1,paddlenlp的版本用2.5.2.post0后效果就和例子差不多了,你们可以试下

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户