static Collection gazelle_preprocess(S input1, O... _) { new L interpretables; int max = optPar max(_, 20); Collector collector = limitedCollector(interpretables, max); new Map evalCache; F1 eval = boolPar noEvals(_) ? f_id() : func(S s) -> S { gazelle_processSafeEvals(s, evalCache) }; input1 = callF(eval, input1); Set texts = litCISet(input1); collector.add(GInterpretable(input1)); RuleEngine2 engine = ((F0) optPar contextMaker(_)).get().engine; int nInterpreted = 0; bigLoop: while (!collector.full() && nInterpreted < l(interpretables)) { GInterpretable workingOn = get(interpretables, nInterpreted); S input = workingOn.text; S ruleBase = empty(workingOn.ruleID) ? "" : workingOn.ruleID + "+"; ++nInterpreted; for (RuleEngine2.SimplifyWithRule rule : engine.splitterRules()) pcall { for (S out : gazelle_executeSplitterRule(engine, rule, input)) if (texts.add(out = callF(eval, out))) if (collector.add(new GInterpretable(out, ruleBase + rule.globalID))) break bigLoop; } for (GazelleTree t : dm_gazelle_reasonAboutChatInput_v2(null, input, paramsPlus(_, skipSplitters := true, acceptablePurposes := litset('preprocess), skipUserName := true, skipUserID := true))) { S s = callF(eval, t.line); if (texts.add(s)) if (collector.add(new GInterpretable( s, ruleBase + t.ruleID(), t.mr))) break bigLoop; } } ret interpretables; }