              if st._sent[i].head == 0 and st._sent[i].dep == 0:
                  st._sent[i].dep = root_label
  
      cdef int set_valid(self, bint* output, StateClass stcls) except -1:
          cdef bint[N_MOVES] is_valid
          is_valid[SHIFT] = Shift.is_valid(stcls, -1)
          is_valid[REDUCE] = Reduce.is_valid(stcls, -1)
          is_valid[LEFT] = LeftArc.is_valid(stcls, -1)
 
</s> remove         cdef int root_label = self.strings['ROOT']
 </s> add         cdef int root_label = self.strings['root'] </s> remove         # Label Shift moves with the best Right-Arc label, for non-monotonic
        # actions
        if best.move == SHIFT:
            score = MIN_SCORE
            for i in range(self.n_moves):
                if self.c[i].move == RIGHT and scores[i] > score:
                    best.label = self.c[i].label
                    score = scores[i]
 </s> add  </s> remove     elif _is_gold_root(gold, head) and _is_gold_root(gold, child):
 </s> add     elif USE_ROOT_ARC_SEGMENT and _is_gold_root(gold, head) and _is_gold_root(gold, child):
            # If we're not using the Break transition, we segment via root-labelled
            # arcs between the root words.
            elif USE_ROOT_ARC_SEGMENT and st._sent[i].dep == root_label:
                st._sent[i].head = 0
              if st._sent[i].head == 0 and st._sent[i].dep == 0:
                  st._sent[i].dep = root_label
            # If we're not using the Break transition, we segment via root-labelled
            # arcs between the root words.
            elif USE_ROOT_ARC_SEGMENT and st._sent[i].dep == root_label:
                st._sent[i].head = 0
  
      cdef int set_valid(self, bint* output, StateClass stcls) except -1:
          cdef bint[N_MOVES] is_valid
          is_valid[SHIFT] = Shift.is_valid(stcls, -1)
          is_valid[REDUCE] = Reduce.is_valid(stcls, -1)
          is_valid[LEFT] = LeftArc.is_valid(stcls, -1)
keep add keep keep keep keep keep keep
 * Add flag to toggle handling of multi-root inputs without the Break transition. Clear up now unused best_valid stuff. 
spacy/syntax/arc_eager.pyx