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

Better quotation handling. #143

Closed Ezibenroc closed 9 years ago

Ezibenroc commented 9 years ago

Use a regexp to handle quotations.

Before, any ugly quotation was recognized (for instance “foo“, with an openning quotation mark to close the quotation). Now we only recognize quotations with a correct syntax.

This allows quotations marks within a quotation (like in python).

Ezibenroc commented 9 years ago

This PR also fixes the build error which apparently also exist in branch master. It seems that there has ben a renaming of the Stanford library (stanford-corenlp-full-2015-01-30stanford-corenlp-full-2015-01-29).

Ezibenroc commented 9 years ago

@yhamoudi Merge?

yhamoudi commented 9 years ago

i'm not sure i understand everything, but it seems good

Ezibenroc commented 9 years ago

The algorithm is the same: replace each quotation by some unique string, and store these substitutions in a map.

The only change is the way we find the quotations. Before it was an ugly traversal algorithm. Now, we use regular expressions.