Closed Tpt closed 9 years ago
The only solution that I see is an other hardcoded map: (question word, verb) -> predicate. For instance, we would have
Why “bear”?
(but I never used it, so I find it quite strange)
Hum, this highlight the fact that we should maybe normalize verbs to their related nouns in order to get birth instead of bear and death instead of die. But it seems difficult.
If I were you (but it's only a first idea that may be not relevant) I would work in two steps:
example: bear -> birth
To go to "birth" with the questionWord "when" to "birth date"
questionToWord = {when: date, where:place}
wordsForQuestion = {when: [date, time, day, month, year,...], where:[place, location,...]}
if(not predicate contains one of wordsForQuestion[questionWord])
predicate = predicate + ' ' + questionToWord[questionWord]
I believe this way will be more easy than doing a full hardcoded correspondence table.
Some info about VerbToNoun on StackOverflow I will think about it later.
What blocks you from using the algorithm given by @Tpt?
It's in progress (actually it's finished but the data model needs to be fixed before merging the pull request). The algorithm is close to the idea of Tpt
What pull request?
not a pull request (not yet), a branch: https://github.com/ProjetPP/PPP-QuestionParsing-Grammatical/tree/connectors_processing
Fix in branch connectors_processing \o/
Questions like http://ppp.pony.ovh/?lang=en&q=Where+is+Jean-Fran%C3%A7ois+Champollion+born%3F aren't well parsed by the NLP module. We should end with triple like (X, birth (date|place))