!7 sS input = "lalalalala please give me the number yo la la"; p { ai_alternativeSmartBot(); while licensed { temp ActualThoughtSpace myTS = newThoughtSpace(); myTS.blockedA = litsymbolset("We", "Suggest"); input = trim(input); print("Have input: " + input); post("We", "are parsing", quote(input)); for (S tail : ai_texts_verified_quoted("$X", "is", "a droppable tail")) { //print("Have tail: " + tail); if (nempty(tail) && ewic(input, tail)) post("Suggest", "splitting off after index", l(rtrim(dropLast(l(tail), input)))); } for (S prefix : ai_texts_verified_quoted("$X", "is", "a droppable prefix")) { //print("Have prefix: " + prefix); if (nempty(prefix) && swic(input, prefix)) post("Suggest", "splitting off before index", smartIndexOf(input, ' ', l(prefix))); } S idx = random(ai_texts("Suggest", "splitting off after index", "$X")); if (idx != null) { int i = parseInt(idx); print("Splitting off: " + substring(input, i)); continue with input = takeFirst(i, input); } idx = random(ai_texts("Suggest", "splitting off before index", "$X")); if (idx != null) { int i = parseInt(idx); print("Splitting off: " + takeFirst(i, input)); continue with input = substring(input, i); } // Nothing to do break; // end of thought space } print("Final input: " + input); assertEqualsIC("give me the number", input); print("OK"); //printThoughtSpace(); }