Extract Relationship Between two Entities using StanfordCoreNLP

独自空忆成欢 提交于 2019-12-08 03:24:11

问题


the similar question has been asked here but i cant find any relevant answer of it so i am trying again. I am able to get NER and Dependency tree using the library. Now what i looking for is that i want to extract entities with the relationship between the entities. For example , "flipkart has invested in myntra" so i should be able to get entity1 as "flipkart " and entity2 as "myntra" and "investor" as the relation .or similar kind of structure. I am not able to get correct tool for doing the same. I neee some guidelines guys, how to achieve this?. Thanks in advance


回答1:


You can train your own model using Stanford relation extraction toolkit. The model released with the code has only a few relations: Live_In, Located_In, OrgBased_In, Work_For, and None. To train your own model, look at "Training and specifying your own model" on its webpage. The existing model is trained on a small dataset so you will go a long way if you add more training data.

If you want to extract prominent words between two entities in sentences (that is, do not want to classify them into a given set of relations), you can also look at ReVerb.



来源:https://stackoverflow.com/questions/28749163/extract-relationship-between-two-entities-using-stanfordcorenlp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!