JULIELab / semedico

Semedico
0 stars 0 forks source link

ScicopiaParser: Issue with operator precedence #19

Closed khituras closed 3 years ago

khituras commented 5 years ago

The test https://github.com/JULIELab/semedico/blob/121b30f69f500448bd90cff6875e7c7fe839451f/semedico-core/src/test/java/de/julielab/scicopia/core/parsing/ParserLogicalTests.java#L24 expects the correct outcome for the query blood or death and cancer to be (logical (logical (part (term blood)) or (part (term death))) and (part (term cancer))).

However, in boolean algebra, the conjunction has a higher operator precedence than the disjunction. Thus, death and cancer should first be engaged in the disjunction and this complex expression should then be disjuncted with blood.

khituras commented 3 years ago

I refactored the grammar. This works now.