Skip to content

Latest commit

 

History

History
123 lines (98 loc) · 3.34 KB

wquestions.md

File metadata and controls

123 lines (98 loc) · 3.34 KB

Question-Answering capabilities overview

In this file is shown how AD-CASPAR deals with Polar and Wh-questions, by the means of the module qa_shifter.py. The latter works as a parser based on production rules, which works considering linguistic rules in order to shift a question into a likely assertion.

Polar questions

This is the simplest case of questions which not requires any structured answer but True or False.


  • Barack Obama became president of United States in 2009?
  • Have you found a name for your dog?

The corresponding queries as single composite literals will be:

> In_IN(Become_VBD(Barack_NNP_Obama_NNP(x1), Of_IN(President_NN(x2), United_NNP_States_NNP(x3))), N2009_CD(x4))
> Find_VBD(You_PRP(x1), For_IN(Name_NN(x2), Your_PRP__Dog_NN(x3)))

Who-questions


Copular tenses like "is", "was", "were", although intransitive, identify a subject with an object, thus a likely answer might have subject/object inverted as well. Each copular verb we want to give such a behaviour, can be defined inside COP_VERB (QA Section) in config.ini.

  • Who is Donald Trump?
> Be_VBZ(x1, Donald_NNP_Trump_NNP(x2))
> Be_VBZ(Donald_NNP_Trump_NNP(x1), x2)
  • Who wants to be king?
> Want_VBZ_Be_VB(x1, King_NN(x2))

For this prototype information representation, modal verbs (could) are discarded. Otherwise the dependency aux must be removed from FILTER in parse_en.py and treated properly.

  • Who could be the president of United States?
> Be_VB(x1, Of_IN(President_NN(x2), United_NNP_States_NNP(x3)))
  • Who could it be?
> Be_VB(It_PRP(x1), x2)
  • Who did you see?
> See_VBD(You_PRP(x1), x2)

What-questions


  • What is a king?
> Be_VBZ(x1, King_NN(x2))
> Be_VBZ(King_NN(x1), x2)
  • What is located in Nevada?
> In_IN(Locate_VBN(__, x2), Nevada_NNP(x3))
  • What does Mary want?
> Want_VBZ(Mary_NNP(x1), x2)
  • What movie have you seen recently?
> Be_VBZ(x1, Recently_RB(See_VBN(You_PRP(x3), Movie_NN(x2))))
> Be_VBZ(Recently_RB(See_VBN(You_PRP(x3), Movie_NN(x2))), x1)

Where-questions


Each adverb used for any answer attempt must be defined by changing LOC_PREPS (QA Section) in config.ini.

  • Where is the newspaper?
> In_IN(Be_VBZ(Newspaper_NN(x1), __), x3)
> At_IN(Be_VBZ(Newspaper_NN(x1), __), x3)
  • Where could your brother live?
> In_IN(Live_VB(Your_PRP__Brother_NN(x1), __), x3)
> At_IN(Live_VB(Your_PRP__Brother_NN(x1), __), x3)
  • Where does your brother live?
> In_IN(Live_VBZ(Your_PRP__Brother_NN(x1), __), x3)
> At_IN(Live_VBZ(Your_PRP__Brother_NN(x1), __), x3)

When a where-question ends with a preposition (at), the latter will be used for the assertion composition without using the content of LOC_PREPS.

  • Where are you looking at?
> At_IN(Look_VBG(You_PRP(x1), __), x3)

When-questions


Each adverb used for any answer attemp must be defined by changing TIME_PREPS (QA Section) in config.ini.

  • When is the Thanksgiving?
> In_IN(Be_VBZ(Thanksgiving_NNP(x1), __), x3)
  • When could your city become a metropolis?
> In_IN(Become_VB(Your_PRP__City_NN(x1), Metropolis_NN(x2)), x3)
  • When do you want to leave the country?
> In_IN(Want_VBP_Leave_VB(You_PRP(x1), Country_NN(x2)), x3)