for (Iterator<HasWord> wordIter = goldSentence.iterator(); wordIter.hasNext();) {
StringLabel word = (StringLabel) wordIter.next();
goldCharBuf.append(word.value());
}
String goldChars = goldCharBuf.toString();
s = seg.segment(goldChars);
} else {
s = goldSentence;
}
Tree tree;
if (parse) {