static Int find3_levenWithSwapsDistance(S pat, S input) { LS tokPat = parse3_cachedPattern(pat); LS tok = parse3_cachedInput(input); int end = tok.size()-tokPat.size()+1; Int min = null; for (int idx = 0; idx < end; idx += 2) { int score = 0; for (int i = 1; i < tokPat.size(); i += 2) { S p = tokPat.get(i), t = tok.get(idx+i); score += levenWithSwapsIC(p, t); } min = min_withNull(min, score); } ret min; }