commit 4cf0b6db97514b5148c8f6e5115743e5971e138d Author: aboelhamd Date: Sat Aug 24 11:15:57 2019 +0200 Remove ambiguities with size=1 diff --git a/src/RulesApplier.cpp b/src/RulesApplier.cpp index 13a2b76..451d9c8 100644 --- a/src/RulesApplier.cpp +++ b/src/RulesApplier.cpp @@ -136,7 +136,7 @@ int main(int argc, char **argv) { // cout << allSents << endl; - // spaces after each token +// spaces after each token vector spaces; // tokens in the sentence order @@ -185,6 +185,13 @@ int main(int argc, char **argv) { RuleExecution::getAmbigInfo(tokenRules, nodesPool, &ambigInfo, &compNum); + + vector newAmbigInfo; + for (unsigned j = 0; j < ambigInfo.size(); j++) + if (ambigInfo[j]->combinations.size() > 1) + newAmbigInfo.push_back(ambigInfo[j]); + ambigInfo = newAmbigInfo; + RuleExecution::getOuts(&outs, &combNodes, ambigInfo, nodesPool, ruleOutputs, spaces);