Fixed conllu converter

This commit is contained in:
György Orosz 2017-06-09 22:53:56 +02:00 committed by GitHub
parent 49026a1346
commit 62dbf9025c
1 changed files with 4 additions and 4 deletions

View File

@ -73,10 +73,10 @@ def generate_sentence(sent):
tokens = []
for i, id in enumerate(id_):
token = {}
token["orth"] = word[id]
token["tag"] = tag[id]
token["head"] = head[id] - i
token["dep"] = dep[id]
token["orth"] = word[i]
token["tag"] = tag[i]
token["head"] = head[i] - id
token["dep"] = dep[i]
tokens.append(token)
sentence["tokens"] = tokens
return sentence