!7 cmodule IWantYouToBe > DynAttractorBot { transient WordTokRule rule = wordTokReplacerRule( "I want you to be my assistant", "assistant", "I want that {you are my assistant}"); S standardSwitcheroo(S s) { ret switcheroo(s); } transient WordTokRule rule = new WordTokRule("I want that X", "X") { run { S x_simplified = simpleSpaces_nTok(getVar("X")); if (contains(facts, x_simplified)) emit("But " + x_simplified + " already"); else if (contains(facts, "It is impossible that " + curly(x_simplified) + "}")) emit("No way brother"); } }; transient Set facts = litciset( "Computery is usery's assistant", "It is impossible that {Computery is usery's mother}"); class Bot > AttractorBot { addStandardAttractor(new DefaultAttractor { run { /*S rewritten = applyWordTokRule(rule, input); if (rewritten == null) ret;*/ } }); } } AttractorBot makeBot() { ret new Bot; } }