!7 sclass MatchInput > DynPrintLogWithInput { start { dm_useLocallyCopiedMechLists(); } void update(S s) { print("\n> " + s); L pats = mL("English sentence patterns"); L tok = javaTokWithAngleBracketsC(s); printStruct(tok); PlanInMotion plan = new(pats); L>>> results = new L; // pattern + match for (S pat : plan.master()) { L tokPat; tokPat = javaTokWithAngleBracketsC(pat); L> match = uniquify(dropTwinPairsIC(zipTwoListsToPairs_ifSameLength(tokPat, tok))); if (match != null) { print(" Result: Choose pattern " + quote(pat) + " for input " + quote(s) + " if match: " + sfu(match)); results.add(pair(pat, match)); } } // reduce from mech lists for (Pair>> p : results) { L> match = antiFilter(f parsing_checkMatchPairUsingMechList, p.b); if (l(match) < l(p.b)) { print(" Reduced match to: " + sfu(match)); p.b = match; } } print(); pnlStruct(sortedByComparator(results, (Comparator) lengthOfPairBListComparator())); } }