static L nlLogic_applyMetaRules(L rules) { final L metaRules = nlLogic_filterByRHSConstructs(rules, 'construct); if (empty(metaRules)) ret rules; new L newRules; for (IfThen rule : rules) newRules.add(nlLogic_transformShallow(rule, func(Exp e) -> Exp { if (!e instanceof Sentence2) ret e; final new NLLogic_ConstructChecker c; S original = e.text(); c.construct = original; applyNLLogicFacts_v3(c, voidfunc(Exp e) { if (e cast Func) if (eq(e.name, 'construct)) c.construct = e.arg.text(); }, metaRules); ret eq(c.construct, original) ? e : nlLogic_parseExpression(c.construct); })); ret newRules; }