static L gazelle_reasonWithPreprocessing(S input1, O... _) { F0 contextMaker = cast assertNotNull("Need contextMaker", optPar contextMaker(_)); S userName = stringPar userName(_); bool debug = boolPar debug(_); bool debugPreprocessing = boolPar debugPreprocessing(_); Collector interpretables_out = cast optPar interpretables_out(_); Collection interpretables = gazelle_preprocess(input1, _); if (debugPreprocessing) { print("Got " + n2(interpretables, "interpretable") + "."); printIndentLines(interpretables); } if (interpretables != null) addAll(interpretables_out, interpretables); Set acceptablePurposes = cast optPar acceptablePurposes(_); if (acceptablePurposes == null) acceptablePurposes = litset(""); new L l2; Set outputs = ciSet(); for (GInterpretable intp : interpretables) { L results = dm_gazelle_reasonAboutChatInput_v2(userName, intp.text, paramsPlus(_, +acceptablePurposes)); print(intp.text + " => " + n2(results, "result")); for (GazelleTree tree : results) if (outputs.add(tree.line)) { if (tree.mr != null) tree.mr.interpretable = intp; l2.add(tree); } } gazelle_dropMatchedDefaultRules(l2, _); ret l2; }