don't require read_json_file to expect particular annotations

This commit is contained in:
Wolfgang Seeker 2016-05-02 15:29:30 +02:00
parent c2f76a4024
commit b6b96b233c
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ def read_json_file(loc, docs_filter=None):
ids.append(i) ids.append(i)
tags.append(token.get('tag','-')) tags.append(token.get('tag','-'))
heads.append(token.get('head',0) + i) heads.append(token.get('head',0) + i)
labels.append(token.get('dep','ROOT')) labels.append(token.get('dep',''))
# Ensure ROOT label is case-insensitive # Ensure ROOT label is case-insensitive
if labels[-1].lower() == 'root': if labels[-1].lower() == 'root':
labels[-1] = 'ROOT' labels[-1] = 'ROOT'