213214215216217218219220221222223
public Object apply(Object in) { if (in instanceof WordTag) { WordTag wt = (WordTag) in; String tag = wt.tag(); return new WordTag(lemmatize(wt.word(), tag, lexer, lexer.option(1)), tag); } if (in instanceof Word) { return stem((Word) in); }