List<CoreLabel> words = new ArrayList<CoreLabel>();
StringBuilder textContent = new StringBuilder();
for(int i = 0; i < tokens.size(); i ++){
CoreLabel l = new CoreLabel();
l.setWord(tokens.get(i).getLiteral());
l.set(CoreAnnotations.ValueAnnotation.class, l.word());
l.set(CoreAnnotations.CharacterOffsetBeginAnnotation.class, tokens.get(i).getByteStart());
l.set(CoreAnnotations.CharacterOffsetEndAnnotation.class, tokens.get(i).getByteEnd());
words.add(l);
if(i > 0) textContent.append(" ");
textContent.append(tokens.get(i).getLiteral());