Open RyanYip-Kat opened 3 years ago
In this position,When you run predict, self.i2p_dict keys will become str, but the 'p' types is int. You need transition it's types to str
------------------ 原始邮件 ------------------ 发件人: "leefsir/triplet_extraction" @.>; 发送时间: 2021年7月26日(星期一) 上午8:42 @.>; @.***>; 主题: [leefsir/triplet_extraction] model predict error (#5)
When I run model_predict.py as described in readme ,I got the error: Traceback (most recent call last): File "model_predict.py", line 17, in print(model.predict(text)) File "/home/jovyan/work/triplet_extraction/train/entity_relation_extract.py", line 176, in predict ) for s, p, o in spoes File "/home/jovyan/work/triplet_extraction/train/entity_relation_extract.py", line 176, in ) for s, p, o in spoes KeyError: 11
And how can I fix it?Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
OK!Thanks!
When I run model_predict.py as described in readme ,I got the error: Traceback (most recent call last): File "model_predict.py", line 17, in
print(model.predict(text))
File "/home/jovyan/work/triplet_extraction/train/entity_relation_extract.py", line 176, in predict
) for s, p, o in spoes
File "/home/jovyan/work/triplet_extraction/train/entity_relation_extract.py", line 176, in
) for s, p, o in spoes
KeyError: 11
And how can I fix it?Thanks!