I am getting question from user and trying to understand syntactically.
My goal is to identify the exact question sentence from user entered question. Like
Obama is president of USA, who is his wife?
So I am able to apply anaphora resolution
and get his
pointing to Obama
and can convert above sentence to
Obama is president of USA, who is Obama wife?
but how can I syntactically identify exact question sentence i.e. Who is obama wife?
from above entire question
I am trying with pylinkgrammar
which give 54 linkage for above sentence, like
linkparser>
Linkage 54, cost vector = (UNUSED=0 DIS= 8.05 LEN=24)
+------------------------------Xp------------------------------+
+---------------------->WV---------------------->+ |
+-------------------Xx-------------------+-->WV->+---SIs---+ |
+----Wd---+--Ss--+--Oum--+---Mp--+-Js+ +Wq+--Q-+ +Ds**c+ |
| | | | | | | | | | | |
LEFT-WALL Obama[!] is.v president.t of USA.l , who is.v his wife.n ?
What I want to do it defining pattern for different question type like W5H1, conjunction based question etc.
But I dont find how to write rule for these pattern, any suggestion and reference would be much appreciable?