I am working on an NLP project and I need the following functionality illustrated by an example. Say there is a sentence
Tell Sam that he will have to leave without Arthur, as he is sick.
In this statement, the first he
has to be tagged to Sam and the second he
to Arthur. I work in Python. Any suggestions on what I can use to get the following functionality?
This task is called coreference resolution. In order to parse complex cases like the one you mention, you'd need to use a coreference resolution system, most of which (free/OOS) are developed in Java. There are several ways to easily use them from Python. One of the most well-know is this Standford CoreNLP wrapper: https://github.com/dasmith/stanford-corenlp-python
Update:
There are now Python native tools with coreference resolution, such as:
AllenNLP by AllenAI.
Huggingface which is almost a spaCy expansion.
StanfordNLP by Stanford.
These references were mainly retrieved from this nice RASA (a NLU based chatbot solution) tutorial: https://github.com/RasaHQ/tutorial-knowledge-base
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With