              guess = self.moves.best_valid(scores, stcls)
              #print self.moves.move_name(guess.move, guess.label), stcls.print_state(words)
              guess.do(stcls, guess.label)
          self.moves.finalize_state(stcls)
          tokens.set_parse(stcls._sent)
  
      cdef int _beam_parse(self, Tokens tokens) except -1:
          cdef Beam beam = Beam(self.moves.n_moves, self.cfg.beam_width)
          beam.initialize(_init_state, tokens.length, tokens.data)
 
</s> remove             #print stcls.print_state(words)
 </s> add  </s> remove             best = self.moves.best_gold(scores, stcls, gold)
 </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
            assert stcls._s_i >= 0
              guess = self.moves.best_valid(scores, stcls)
              #print self.moves.move_name(guess.move, guess.label), stcls.print_state(words)
              guess.do(stcls, guess.label)
            assert stcls._s_i >= 0
          self.moves.finalize_state(stcls)
          tokens.set_parse(stcls._sent)
  
      cdef int _beam_parse(self, Tokens tokens) except -1:
          cdef Beam beam = Beam(self.moves.n_moves, self.cfg.beam_width)
          beam.initialize(_init_state, tokens.length, tokens.data)
keep keep add keep keep keep keep keep keep
 * Fixes to unshift/fast-forward strategy. Getting 91.55 greedy on NW dev, gold preproc 
spacy/syntax/parser.pyx