          smallest_np_arc = self._get_smallest_nonproj_arc(proj_heads)
          if smallest_np_arc == None: # this sentence is already projective
              return proj_heads, copy(labels)
          while smallest_np_arc != None:
              self._lift(smallest_np_arc, proj_heads)
              smallest_np_arc = self._get_smallest_nonproj_arc(proj_heads)
          deco_labels = self._decorate(heads, proj_heads, labels)
          return proj_heads, deco_labels
  
  
      def deprojectivize(self, heads, labels):
          # reattach arcs with decorated labels (following HEAD scheme)
 
</s> remove         smallest_np_arc = self._get_smallest_nonproj_arc(proj_heads)
 </s> add         smallest_np_arc = cls._get_smallest_nonproj_arc(proj_heads) </s> remove     def deprojectivize(self, heads, labels):
 </s> add     @classmethod
    def deprojectivize(cls, Doc tokens): </s> remove         newheads, newlabels = copy(heads), copy(labels)
        spans = None
        for tokenid, head in enumerate(heads):
            if labels[tokenid].find('||') != -1:
                newlabel,_,headlabel = labels[tokenid].partition('||')
                newhead = self._find_new_head(head,tokenid,headlabel,heads,labels,spans=spans)
                newheads[tokenid] = newhead
                newlabels[tokenid] = newlabel
        return newheads, newlabels


    def _decorate(self, heads, proj_heads, labels):
 </s> add         parse = tokens.to_array([HEAD, DEP])
        labels = [ tokens.vocab.strings[int(p[1])] for p in parse ]
        for token in tokens:
            if cls.is_decorated(token.dep_):
                newlabel,headlabel = cls.decompose(token.dep_)
                newhead = cls._find_new_head(token,headlabel)
                parse[token.i,1] = tokens.vocab.strings[newlabel]
                parse[token.i,0] = newhead.i - token.i
        tokens.from_array([HEAD, DEP],parse)


    @classmethod
    def _decorate(cls, heads, proj_heads, labels): </s> remove     def _lift(self, tokenid, heads):
 </s> add     @classmethod
    def _lift(cls, tokenid, heads): </s> remove     def _get_smallest_nonproj_arc(self, heads):
 </s> add     @classmethod
    def _get_smallest_nonproj_arc(cls, heads):
            cls._lift(smallest_np_arc, proj_heads)
            smallest_np_arc = cls._get_smallest_nonproj_arc(proj_heads)
        deco_labels = cls._decorate(heads, proj_heads, labels)
          smallest_np_arc = self._get_smallest_nonproj_arc(proj_heads)
          if smallest_np_arc == None: # this sentence is already projective
              return proj_heads, copy(labels)
          while smallest_np_arc != None:
            cls._lift(smallest_np_arc, proj_heads)
            smallest_np_arc = cls._get_smallest_nonproj_arc(proj_heads)
        deco_labels = cls._decorate(heads, proj_heads, labels)
            cls._lift(smallest_np_arc, proj_heads)
            smallest_np_arc = cls._get_smallest_nonproj_arc(proj_heads)
        deco_labels = cls._decorate(heads, proj_heads, labels)
            cls._lift(smallest_np_arc, proj_heads)
            smallest_np_arc = cls._get_smallest_nonproj_arc(proj_heads)
        deco_labels = cls._decorate(heads, proj_heads, labels)
          return proj_heads, deco_labels
  
  
      def deprojectivize(self, heads, labels):
          # reattach arcs with decorated labels (following HEAD scheme)
keep keep keep keep replace replace replace keep keep keep keep keep
 integrated pseudo-projective parsing into parser

- nonproj.pyx holds a class PseudoProjectivity which currently holds
  all functionality to implement Nivre & Nilsson 2005's pseudo-projective
  parsing using the HEAD decoration scheme
- changed lefts/rights in Token to account for possible non-projective
  structures 
spacy/syntax/nonproj.pyx