if ((token = input.next()) == null) {
return null;
}
// Check the exclusiontable.
else if (exclusions != null && exclusions.contains(token.termText())) {
return token;
} else {
String s = stemmer.stem(token.termText());
// If not stemmed, dont waste the time creating a new token.
if ((s != null) && !s.equals(token.termText())) {
return new Token(s, token.startOffset(), token.endOffset(), token.type());
}
return token;
}