  
          for i, gold_i in enumerate(self.cand_to_gold):
              if doc[i].text.isspace():
                  self.words[i] = doc[i].text
                  self.tags[i] = 'SP'
                  self.heads[i] = None
                  self.labels[i] = None
                  self.ner[i] = 'O'
              if gold_i is None:
                  pass
 
</s> remove                 pass
 </s> add                 if i in i2j_multi:
                    self.words[i] = words[i2j_multi[i]]
                    self.tags[i] = tags[i2j_multi[i]]
                    is_last = i2j_multi[i] != i2j_multi.get(i+1)
                    is_first = i2j_multi[i] != i2j_multi.get(i-1)
                    # Set next word in multi-token span as head, until last
                    if not is_last:
                        self.heads[i] = i+1
                        self.labels[i] = 'subtok'
                    else:
                        self.heads[i] = self.gold_to_cand[heads[i2j_multi[i]]]
                        self.labels[i] = deps[i2j_multi[i]]
                    # Now set NER...This is annoying because if we've split
                    # got an entity word split into two, we need to adjust the
                    # BILOU tags. We can't have BB or LL etc.
                    # Case 1: O -- easy.
                    ner_tag = entities[i2j_multi[i]]
                    if ner_tag == 'O':
                        self.ner[i] = 'O'
                    # Case 2: U. This has to become a B I* L sequence.
                    elif ner_tag.startswith('U-'):
                        if is_first:
                            self.ner[i] = ner_tag.replace('U-', 'B-', 1)
                        elif is_last:
                            self.ner[i] = ner_tag.replace('U-', 'L-', 1)
                        else:
                            self.ner[i] = ner_tag.replace('U-', 'I-', 1)
                    # Case 3: L. If not last, change to I.
                    elif ner_tag.startswith('L-'):
                        if is_last:
                            self.ner[i] = ner_tag
                        else:
                            self.ner[i] = ner_tag.replace('L-', 'I-', 1)
                    # Case 4: I. Stays correct
                    elif ner_tag.startswith('I-'):
                        self.ner[i] = ner_tag </s> remove         self.cand_to_gold = align([t.orth_ for t in doc], words)
        self.gold_to_cand = align(words, [t.orth_ for t in doc])
 </s> add         # This needs to be done before we align the words
        if make_projective and heads is not None and deps is not None:
            heads, deps = nonproj.projectivize(heads, deps)

        # Do many-to-one alignment for misaligned tokens.
        # If we over-segment, we'll have one gold word that covers a sequence
        # of predicted words
        # If we under-segment, we'll have one predicted word that covers a
        # sequence of gold words.
        # If we "mis-segment", we'll have a sequence of predicted words covering
        # a sequence of gold words. That's many-to-many -- we don't do that.
        cost, i2j, j2i, i2j_multi, j2i_multi = align([t.orth_ for t in doc], words)

        self.cand_to_gold = [(j if j >= 0 else None) for j in i2j]
        self.gold_to_cand = [(i if i >= 0 else None) for i in j2i] </s> remove         with loc.open('r', encoding='utf8') as file_:
            docs = ujson.load(file_)
        if limit is not None:
            docs = docs[:limit]
        for doc in docs:
 </s> add         for doc in _json_iterate(loc): </s> remove             self._phrase_key[i] = doc.c[j].lex.orth
        cdef hash_t key = hash64(self._phrase_key,
                                 self.max_length * sizeof(attr_t), 0)
 </s> add             phrase_key[i] = doc.c[j].lex.orth
        cdef hash_t key = hash64(phrase_key,
                                 (end-start) * sizeof(attr_t), 0) </s> remove     assert matches[0][1] == start
    assert matches[0][2] == end
 </s> add     print(matches)
    assert matches[-1][1] == start
    assert matches[-1][2] == end
                self.tags[i] = '_SP'
  
          for i, gold_i in enumerate(self.cand_to_gold):
              if doc[i].text.isspace():
                  self.words[i] = doc[i].text
                self.tags[i] = '_SP'
                  self.heads[i] = None
                  self.labels[i] = None
                  self.ner[i] = 'O'
              if gold_i is None:
                  pass
keep keep keep keep replace keep keep keep keep keep
 Revert "Merge branch 'develop' of https://github.com/explosion/spaCy into develop"

This reverts commit c9ba3d3c2dc7067cf8bd55f878cec45a8c6d73d4, reversing
changes made to 92c26a35d425d4e8ca1b805ea776ea10f5ded3df. 
spacy/gold.pyx