static Map ai_ruleEngine2_mappingQualities(RuleEngine2.Rule rule) { new Map map; new Matches m; for (S s : rule.comments) if (match("changing * to * is *", s, m)) { int value = eqic($1, "ok") ? 1 : eqic($1, "bad") ? -1 : 0; map.put(pair($2, $3), value); } ret map; }