Changing a Noun to its Pronoun in a sentence

712 views Asked by At

I want to replace a Noun in a sentence with its pronoun. I will be using this to create a dataset for a NLP task. for example if my sentences are -->

"Jack and Ryan are friends. Jack is also friends with Michelle."

Then I want to replace the second Jack(in italics and bold ) with "He". I have done the POS tagging to find the Nouns in my sentences. But I do not know how to proceed from here. If I have a list of all possible pronouns that can be used, Is there a corpus or system that can tell me the most appropriate pronoun for the word?

1

There are 1 answers

0
Christopher Manning On

You can almost do this with tools in Stanford CoreNLP. If you run the "coref" annotator, then it will attempt to determine the reference of a pronoun to other entity mentions in the text. There is also a "gender" annotator, which can assign a (binary) gender to an English name (based just on overall frequency statistics). (This gender annotator can at present only be accessed programmatically; its output doesn't appear in our standard output formats.)

However, both coreference resolution and automated gender assignment are tasks with mediocre accuracy, and the second has further assumptions that make it generally questionable. I find it hard to believe that doing this automatically will be a useful strategy to automatically produce data for an NLP task.