svoid nlLogic_setScriptID(L rules, fS scriptID) { final Set ids = collectAsHashSet(rules, 'globalID); for (IfThen rule : rules) { rule.globalID = scriptID + rule.globalID; nlLogic_visit(rule, voidfunc(O o) { S name; if (o cast Func) { if (eq(o.name, 'followingUpOn)) { L tok = javaTok(nlLogic_text(o.arg)); if (ids.contains(get(tok, 1))) { tok.set(1, scriptID + tok.get(1)); o.arg = Sentence2(join(tok)); } } } }); } }