Warning: session_start(): open(/var/lib/php/sessions/sess_bhu8k7gri9v616t78go0p09g8r, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
svoid applyNLLogicFacts(S input, VF1 super S> postMessage) {
new NLLogicChecker_v2 c;
c.matcher = new NLStringMatcher_dollarVars;
c.facts.addAll(mL("Random facts"));
c.input = input;
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 " + quote(input) + " 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)
callF(postMessage, ((Sentence) out.arg).text());
}
}
}