static void ai_spec_whatIsXInY(S s) { new Matches m; if (!flexMatchIC("What is * (in|of) *", unquote(s), m)) ret; S elem = m.get(0), thing = m.get(2); // trigger required speculations post(s, "possibly related to:", elem); post(s, "possibly related to:", thing); ai_triggerSpeculationOn(thing); // harvest answers for (S text : takeFirst(ai_spec_maxAnswersToReturn(), ai_texts("$X", "is " + elem + " in", thing))) post(quote(text), "answers", s); }