scope dropPunctuation3. static LS #keep = ll("*", "<", ">"); static SS #cache = defaultSizeMRUCache(); static LS dropPunctuation3(LS tok) { tok = new ArrayList(tok); for (int i = 1; i < tok.size(); i += 2) { S t = tok.get(i); if (t.length() == 1 && !Character.isLetter(t.charAt(0)) && !Character.isDigit(t.charAt(0)) && !dropPunctuation3_keep.contains(t)) { tok.set(i-1, tok.get(i-1) + tok.get(i+1)); tok.remove(i); tok.remove(i); i -= 2; } } return tok; } sS dropPunctuation3(S s) { ret getOrCreate_f1(cache, () -> join(dropPunctuation3(javaTokNoQuotes(s))); } end scope