CoreLabel production = new CoreLabel();
production.setValue(label);
production.set(TreeCoreAnnotations.HeadWordAnnotation.class, headLabel.get(TreeCoreAnnotations.HeadWordAnnotation.class));
production.set(TreeCoreAnnotations.HeadTagAnnotation.class, headLabel.get(TreeCoreAnnotations.HeadTagAnnotation.class));
Tree newTop = new LabeledScoredTreeNode(production);
newTop.addChild(left);
newTop.addChild(right);
stack = stack.push(newTop);
return new State(stack, state.transitions.push(this), state.separators, state.sentence, state.tokenPosition, state.score + scoreDelta, false);