!7 cmodule IsBot > DynAttractorBot { AttractorBot makeBot() { ret testBot(MultiSpaceReasoningBot(litAttractorsBySpace(new DefaultAttractor { run { // tautological case if (matchDoubleRest("is", input)) ret with emitAnswer(print("Emitting", "yes, obviously")); LS tok = wordTok(input); L determiners = indicesOfAny(tok, mechCISet("Determiners")); print(+determiners); if (isBetween(l(determiners), 1, 2)) { int i = last(determiners); S a = joinSubList(tok, 3, i-1), b = joinSubList(tok, i, l(tok)-1); ret with emitAnswer("I wonder if " + a + " is " + b); } }}))); } AttractorBot testBot(AttractorBot bot) { testAttractorBotResponses_noFail(bot, "is green green?", "yes, obviously", "is a man a child?", "I wonder if a man is a child"); ret bot; } }