Skip to content
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

open-entity-relation-extraction/code/core/entity_combine.py 的第55行注释问题 #12

Open
tianyunzhe opened this issue Mar 18, 2020 · 1 comment

Comments

@tianyunzhe
Copy link

您好,您在open-entity-relation-extraction/code/core/entity_combine.py 的第55行注释中表明
词合并: (前后词都是实体) and (前后词的词性相同 or 前词 in ["nz", "j"] or 后词 in ["nz", "j"])
但是在56行和57行代码中,只有设置前词 in ["nz", "j"] or 后词 in ["nz", "j"],并没有设置 前后词性相同这一个步骤


if (self.is_entity(word.postag) and self.is_entity(words[i-1].postag)
                    and (word.postag in {'nz', 'j'} or words[i-1].postag in {'nz', 'j'})):
                newword += word.lemma

所以这可能是一个可以改进的原因,但根据我的实验目前来看,由于分词的产生的错误,根据词性相同来合并普通实体并不能很好的补充识别命名实体。当然这只是我个人的一个观点了,最后再次感谢您的贡献!

@lemonhu
Copy link
Owner

lemonhu commented Aug 30, 2020

好的,谢谢你的建议。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants