public void collect(String word, int offset, int end) {
Token c = candidate != null ? candidate : last;
if (c == null) {
candidate = new Token(word, offset, end);
} else if (offset == c.startOffset()) {
if (end > c.endOffset()) {
candidate = new Token(word, offset, end);
}
} else if (offset > c.startOffset()) {
if (candidate != null) {
select(candidate);