ProjetPP / PPP-QuestionParsing-Grammatical

Question Parsing module for the PPP using a grammatical approch
GNU Affero General Public License v3.0
33 stars 11 forks source link

Try to get the K best dependency trees #120

Open yhamoudi opened 9 years ago

yhamoudi commented 9 years ago

In some cases, the tree output by the Stanford Parser is correct from a grammatical point of view but doesn't reflect the real meaning of the sentence.

Ex: image

The stanford parser considers that there is a List of books and this List has been done by Roald Dahl. It could be true, however, we prefer to obtain List -prep_of-> books -prep_by-> Roald Dahl.

The stanford parser seems to be able to provide more than one parsing result (http://stackoverflow.com/questions/14014631/get-the-k-best-parses-of-a-sentence-with-stanford-parser). If we succeed to get the 2 best dependency trees (for instance), we could hope that sometimes the second tree is better than the first one in case of ambiguity.

Finally, the question parsing will output 2 normal forms instead of 1.

Resources:

yhamoudi commented 9 years ago

If you parse List of books by Roald Dahl instead of List of books by Roald Dahl. (just remove the point), you obtain: image

It's exactly what we want!!! It proves that the 2 trees are very close and the last one is probably the 2nd best dependency tree when you parse List of books by Roald Dahl.