为什么我这边的UIE效果这么差呢
收藏
下面是安装了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
收藏
请登录后评论
1.换更大的模型试试。
2.使用几条数据微调过后再试试。
怎么又那么多的空值啊,是不是数据集不太行啊。
hjskgs
是直接使用uie预测的,我看很多论坛上面都是可以直接跑的
我的也是 跟别人的例子跑出来完全不一样
我的也是 跟别人例子跑出来完全不一样,全是这种一个个字和字符的预测,都小于0.5
你是不是也用的conda
我之前是按最新版本安装的,出来的效果也是很差。我后面根据网友的提示,paddle的版本使用2.5.0rc1,paddlenlp的版本用2.5.2.post0后效果就和例子差不多了,你们可以试下