  
      def predict(self):
          self.eg.reset()
          self.parser.model.set_featuresC(&self.eg.c, self.stcls)
          self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls)
          self.parser.model.set_scoresC(self.eg.c.scores,
              self.eg.c.features, self.eg.c.nr_feat)
  
          cdef Transition action = self.parser.moves.c[self.eg.guess]
          return self.parser.moves.move_name(action.move, action.label)
 
</s> remove     cdef int set_valid(self, int* is_valid, StateClass stcls) nogil:
 </s> add     cdef int set_valid(self, int* is_valid, const StateC* st) nogil: </s> remove     cdef int set_valid(self, int* output, StateClass state) nogil
 </s> add     cdef int set_valid(self, int* output, const StateC* st) nogil </s> remove             is_valid[i] = self.c[i].is_valid(stcls.c, self.c[i].label)
 </s> add             is_valid[i] = self.c[i].is_valid(st, self.c[i].label) </s> remove         self.set_valid(is_valid, stcls)
 </s> add         self.set_valid(is_valid, stcls.c) </s> remove             self.moves.set_valid(eg.c.is_valid, stcls)
 </s> add             self.moves.set_valid(eg.c.is_valid, stcls.c)
        self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)
  
      def predict(self):
          self.eg.reset()
          self.parser.model.set_featuresC(&self.eg.c, self.stcls)
        self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)
          self.parser.model.set_scoresC(self.eg.c.scores,
              self.eg.c.features, self.eg.c.nr_feat)
  
          cdef Transition action = self.parser.moves.c[self.eg.guess]
          return self.parser.moves.move_name(action.move, action.label)
keep keep keep keep replace keep keep keep keep keep
 * Pass a StateC pointer into the transition and validation methods in the parser, so that the GIL can be released over a batch of documents 
spacy/syntax/parser.pyx