static L> nlLogic_matchAllFacts(NLLogicChecker_v2 c, S pat, NLLogicChecker_v2.Matching m) { ret nlLogic_matchAllFacts(pat, c.facts, m); } static L> nlLogic_matchAllFacts(S pat, LS facts) { ret nlLogic_matchAllFacts(pat, facts, new NLLogicChecker_v2.Matching); } static L> nlLogic_matchAllFacts(S pat, LS facts, NLLogicChecker_v2.Matching m) { LS patterns = tok_splitAtVerticalBar(pat); LinkedHashMap m2 = null; new L> choices; for (S fact : unnull(facts)) { if (m2 == null) m2 = cloneLinkedHashMap(m.matches); bool result = nlLogic_matchMultiplePatterns(c, patterns, fact, m2); if (m.verbose) print("matched " + quote(pat) + " with " + quote(fact) + " & " + sfu(m.matches) + " => " + result); if (result) { choices.add(m2); m2 = null; } } ret choices; }