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

Tries to parse triples #65

Closed progval closed 9 years ago

progval commented 9 years ago

There is a very tricky bug in the last release.

On the input {"type": "sentence", "value": "(Douglas Adams, birth date, ?)"}}, your module returns this object:

<PPP response language='en', tree=<PPP node "triple" {'predicate': <PPP node "resource" {'value': 'birth date'}>, 'object': <PPP node "resource" {'value': 'Douglas Adams'}>, 'subject': <PPP node "missing" {}>}>, measures={'relevance': 0.5, 'accuracy': 0.5}, trace=[<PPP traceitem module='QuestionParsing-Grammatical', tree=<PPP node "triple" {'predicate': <PPP node "resource" {'value': 'birth date'}>, 'object': <PPP node "resource" {'value': 'Douglas Adams'}>, 'subject': <PPP node "missing" {}>}>, measures={'relevance': 0.5, 'accuracy': 0.5}>]>

while it should not return anything (this is not a sentence).

progval commented 9 years ago

Note: I noticed this bug thanks to the integration tests. That's why I did not deploy this update yet

Ezibenroc commented 9 years ago

It as a type sentence, so yes it is a sentence, isn't it?

yhamoudi commented 9 years ago

can we know what is the first release that produced this bug ?

progval commented 9 years ago

0.4.7

yhamoudi commented 9 years ago

it's not really a bug: before 4.7 there was a error if the first word of the sentence was not a node of the dependency tree (it happens especially for triples, now it's no longer the case (it allows us to support "in wich..." questions for instance).

The only solution we have is to write an algo that determines wether the input is a question or not. Is it really our job (other modules also want to know this)?

Ezibenroc commented 9 years ago

Maybe we could play with the accuracy and/or the relevance: if the triple-parser returns something, it must have an higher accuracy/relevance than the thing returned by Grammatical.

progval commented 9 years ago

So this is not a bug?

Ezibenroc commented 9 years ago

I think it is not relevant to our module. This is the same for maths: if you send us maths, we will answer some very weird things.

yhamoudi commented 9 years ago

Since we have never try to detect the type of the input (math, triples, question...), i consider it's not a bug (it was working on your example before because of an assert error that was not designed to detect wether the input is a triple or not)