!7 set flag DynModule. sclass TelegramFactsBot > AbstractTelegramThinkBot { void thinkAbout(S s) { new NLLogicChecker_v2 c; c.matcher = new NLStringMatcher_dollarVars; c.facts.addAll(mL("Random facts")); c.input = s; for (PairS idAndRule : combineWithGlobalIDs(splitAtEmptyLines(mL_raw("NL Logic Examples")))) pcall { S rule = idAndRule.b; NLLogicChecker_v2.Matching m = new NLLogicChecker_v2.Matching(); if (c.checkRule(nlLogic_parseRule(rule), m)) { print("Matched " + s + " with rule " + quote(rule)); printStruct(m.matches); for (Exp out : m.output) if (out cast Func) if (eq(out.name, "output") && out.arg instanceof Sentence) postMessage(/*"Random facts say: " +*/ join(((Sentence) out.arg).tok)); } } } }