diff --git a/spacy/munge/read_conll.py b/spacy/munge/read_conll.py index e18fb7557..ed6037a4d 100644 --- a/spacy/munge/read_conll.py +++ b/spacy/munge/read_conll.py @@ -13,7 +13,6 @@ def parse(sent_text, strip_bad_periods=False): id_map = {} for i, line in enumerate(sent_text.split('\n')): word, tag, head, dep = _parse_line(line) - id_map[i] = len(words) if strip_bad_periods and words and _is_bad_period(words[-1], word): continue @@ -24,8 +23,6 @@ def parse(sent_text, strip_bad_periods=False): 'head': int(head) - 1, 'dep': dep}) words.append(word) - for entry in annot: - entry['head'] = id_map.get(entry['head'], entry['head']) return words, annot