I have been looking into the howto for nltk-drt and into the module definitions for nltk.sem.drt but I am having a really hard time trying to understand how to achieve basic functionality using these packages.
An example of a task that I would like to achieve is the following: Given the sentence
Google is one of the largest tech companies. It employees many people.
I would like to be able to write a small function that parses a sentence such as this, and return a sentence such as
Google is one of the largest tech companies. Google employees many people.
A more realistic test case can be something like
Tom, Dick and Harry were invited to her party, but declined. This made Sherry angry.
being resolved to
Tom, Dick and Harry were invited to Sherry party, but declined. This made Sherry angry.
I don't think DRT (Discourse Representation Theory) deals with anaphora resolution, like what you wanted. It deals with representing the meaning of a sentence in formal logic.
Also, there is a name for your "more realistic test case", which is called "cataphora".
Anaphora resolution is difficult, but you can try Stanford DCoref
And see some examples here: Anaphora resolution using Stanford Coref
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