          while not stcls.is_final():
              fill_context(context, stcls)
              scores = self.model.score(context)
              guess = self.moves.best_valid(scores, stcls)
              best = self.moves.best_gold(scores, stcls, gold)
              cost = guess.get_cost(stcls, &gold.c, guess.label)
              self.model.update(context, guess.clas, best.clas, cost)
              guess.do(stcls, guess.label)
              loss += cost
          return loss
 
</s> remove             #print stcls.print_state(words)
 </s> add 
            try:
                best = self.moves.best_gold(scores, stcls, gold)
            except:
                history.append((self.moves.move_name(guess.move, guess.label), '!', stcls.print_state(words)))
                for i, word in enumerate(words):
                    print gold.orig_annot[i]
                print '\n'.join('\t'.join(s) for s in history)
                print words[gold.c.heads[stcls.S(0)]]
                print words[gold.c.heads[stcls.B(0)]]
                print push_cost(stcls, &gold.c, stcls.B(0))
                print arc_cost(stcls, &gold.c, stcls.S(0), stcls.B(0))
                self.moves.set_valid(self.moves._is_valid, stcls)
                raise
          while not stcls.is_final():
              fill_context(context, stcls)
              scores = self.model.score(context)
              guess = self.moves.best_valid(scores, stcls)
            try:
                best = self.moves.best_gold(scores, stcls, gold)
            except:
                history.append((self.moves.move_name(guess.move, guess.label), '!', stcls.print_state(words)))
                for i, word in enumerate(words):
                    print gold.orig_annot[i]
                print '\n'.join('\t'.join(s) for s in history)
                print words[gold.c.heads[stcls.S(0)]]
                print words[gold.c.heads[stcls.B(0)]]
                print push_cost(stcls, &gold.c, stcls.B(0))
                print arc_cost(stcls, &gold.c, stcls.S(0), stcls.B(0))
                self.moves.set_valid(self.moves._is_valid, stcls)
                raise
              cost = guess.get_cost(stcls, &gold.c, guess.label)
              self.model.update(context, guess.clas, best.clas, cost)
              guess.do(stcls, guess.label)
              loss += cost
          return loss
keep keep keep keep replace keep keep keep keep keep
 * Fixes to unshift/fast-forward strategy. Getting 91.55 greedy on NW dev, gold preproc 
spacy/syntax/parser.pyx