else
{
// very simple implementation: use termText with length
// closer to original word
Token current = tokens.get(tokens.size() - 1);
if (Math.abs(origWord.length() - current.termText().length()) > Math.abs(origWord.length()
- t.termText().length()))
{
// replace current token and word
words.set(words.size() - 1, t.termText());
tokens.set(tokens.size() - 1, t);