NLP to find relationship between entities

后端 未结 5 1859
天涯浪人
天涯浪人 2020-12-29 13:56

My current understanding is that it\'s possible to extract entities from a text document using toolkits such as OpenNLP, Stanford NLP.

However, is there a way to fi

5条回答
  •  时光取名叫无心
    2020-12-29 14:53

    Yes absolutely. This is called Relation Extraction. Stanford has developed several useful tools for working on this problem.

    Here is there website: http://deepdive.stanford.edu/relation_extraction Here is the github repository: https://github.com/philipperemy/Stanford-OpenIE-Python

    In general here is how the process works.

    results = entract_entity_relations("Barack Obama was born in Hawaii.")
    print(results)
    # [['Barack Obama','was born in', 'Hawaii']]
    

    Of some importance is that only triples are extracted of the form (subject,predicate,object).

提交回复
热议问题