-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
将关键词与实体进行关系抽取的函数返回空列表 #3
Comments
如果不添加 |
同样发现上面这个问题,楼上老哥解决了吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
text_grapher.py
文件中,构建实体与关键词关系的函数返回的events_entity_keyword
是空列表[]
通过查看函数的代码,发现问题可能出在这一行:
keyword = [i[0] for i in keyword]
。['谢雕', '凯旋', '同学', '家人', '北京', '南都', '记者', '高中', '警方', '告诉']
,keyword = [i[0] for i in keyword]
:['谢', '凯', '同', '家', '北', '南', '记', '高', '警', '告']
可以看到返回的结果是关键词的第一个字。这样得到的events是空列表。如果想要得到正常的结果的话,应该删除
keyword = [i[0] for i in keyword]
这一行。请问我的理解对吗?想知道这里是不是bug,还是说有我没有想到的地方。
The text was updated successfully, but these errors were encountered: