          if strip_bad_periods and words and _is_bad_period(words[-1], word):
              continue
    
          annot.append({
              'id': i,
              'word': word,
              'tag': tag,
              'head': int(head) - 1 if int(head) != 0 else i,
              'dep': dep})
          words.append(word)
 
</s> remove             'head': int(head) - 1 if int(head) != 0 else i,
 </s> add             'head': int(head) - 1, </s> remove         i += 1
 </s> add     for entry in annot:
        entry['head'] = id_map.get(entry['head'], entry['head']) </s> remove     i = 0
    for line in sent_text.split('\n'):
 </s> add     id_map = {}
    for i, line in enumerate(sent_text.split('\n')):
            'id': len(words),
          if strip_bad_periods and words and _is_bad_period(words[-1], word):
              continue
    
          annot.append({
            'id': len(words),
              'word': word,
              'tag': tag,
              'head': int(head) - 1 if int(head) != 0 else i,
              'dep': dep})
          words.append(word)
keep keep keep keep replace keep keep keep keep keep
 * Fix head misalignment in read_conll, when periods are ignored 
spacy/munge/read_conll.py