for (int j=sentStartTok; j<=sentEndTok; j++) {
sentenceAccumulator += tokens[j] + whites[j+1];
}
int sPos = textAccumulator.length();
int ePos = sPos + StringUtils.chomp(sentenceAccumulator, whites[sentEndTok+1]).length();
Annotation sentenceAnnotation = new Annotation("Sentence", sPos, ePos, text.substring(sPos, ePos));
sentenceAnnotations.add(sentenceAnnotation);
textAccumulator += sentenceAccumulator;
sentStartTok = sentEndTok+1;
}
}