static L<S> dropPunctuationAtEnd_keep = litlist("*", "<", ">", "]", ")", "}"); static L<S> dropPunctuationAtEnd(L<S> tok) { tok = new ArrayList<S>(tok); for (int i = tok.size()-2; i > 0; i -= 2) { S t = tok.get(i); if (t.length() == 1 && !Character.isLetter(t.charAt(0)) && !Character.isDigit(t.charAt(0)) && !dropPunctuationAtEnd_keep.contains(t)) { tok.remove(i); tok.remove(i); } else break; } return tok; } static S dropPunctuationAtEnd(S s) { ret join(dropPunctuationAtEnd(nlTok(s))); }
Began life as a copy of #1000814
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment