static L dropPunctuationExcept(L tok, L keep) { 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)) && !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; } static S dropPunctuationExcept(S s, L keep) { ret join(dropPunctuationExcept(nlTok(s), keep)); }