As each mention comes to head the queue, we generate a training instance in which the classifier decides whether it is more likely that the mention shift onto the stack as the first mention of a new discourse entity or reduce with the cluster of an already active one.
the reduce score initialise queue; initialise stack; while queue do active = queue.pop(); prediction = classify(active, stack); gold = correct classification(active, stack); if prediction != gold then update(prediction, gold); end cluster = apply pred(active, stack, gold); promote(cluster, stack); end initialise queue; initialise stacks; while queue do active = queue.pop(); forall stacks do prediction = classify(active, stack); cluster = apply pred(active, stack, prediction); promote(cluster, stack); end prune stacks(stacks); end is the highest of all potential merges.