// first construct the actual nodes; keep them indexed by their index and copy count
// sentences such as "I went over the river and through the woods" have
// copys for "went" in the collapsed dependencies
TwoDimensionalMap<Integer, Integer, IndexedWord> nodeMap = TwoDimensionalMap.hashMap();
for (IntermediateNode in: nodes){
CoreLabel token = sentence.get(in.index - 1); // index starts at 1!
IndexedWord word;
if (in.copyAnnotation > 0) {
// TODO: if we make a copy wrapper CoreLabel, use it here instead
word = new IndexedWord(new CoreLabel(token));
word.setCopyCount(in.copyAnnotation);
} else {
word = new IndexedWord(token);
}