Practical AI : Generate English pronoun questions from any story using neural coreference resolution

Ramsri Goutham
The Startup
Published in
4 min readOct 25, 2019

--

Neural Coreference resolution

In this post we will see how to generate English pronoun questions from any story or article. This is one step towards automatically generating English language learning worksheet.

The input to our program will be a small story like the following -

Scientists know many things about the Sun. They know how old it is. The Sun is more than 4½ billion years old. It is also a star that is the centre of our solar system. They also know the Sun’s size.

The output from the program will be a set of pronoun questions -

  1. What does “They” refer to in the sentence — “They know how old it is.”? Ans : Scientists
  2. What does “They” refer to in the sentence — “They also know the Sun’s size.”? Ans : Scientists
  3. What does “It” refer to in the sentence — “It is also a star that is the centre of our solar system.”? Ans : The sun

Let’s get started to see how we can achieve this using the neural coreference library from hugging face.

All the code and the jupyter notebook is available at -

--

--