String s = sentence.get(i).word();
if (sentence.get(i) instanceof HasOffset) {
HasOffset word = (HasOffset) sentence.get(i);
beginOffsets[i] = word.beginPosition();
endOffsets[i] = word.endPosition();
} else {
//Storing the positions of the word interstices
//Account for single space between words
beginOffsets[i] = ((i == 0) ? 0 : endOffsets[i - 1] + 1);
endOffsets[i] = beginOffsets[i] + s.length();