Skip to content
Snippets Groups Projects
Commit 2d013535 authored by Maja Jablonska's avatar Maja Jablonska
Browse files

Small api.py fixes

parent f655a079
1 merge request!46Merge COMBO 3.0 into master
...@@ -36,10 +36,6 @@ def sentence2conllu(sentence: Sentence, keep_semrel: bool = True) -> conllu.mode ...@@ -36,10 +36,6 @@ def sentence2conllu(sentence: Sentence, keep_semrel: bool = True) -> conllu.mode
tokens = [] tokens = []
for token in sentence.tokens: for token in sentence.tokens:
token_dict = collections.OrderedDict(token.as_dict(keep_semrel)) token_dict = collections.OrderedDict(token.as_dict(keep_semrel))
# Remove semrel to have default conllu format.
# if not keep_semrel:
# del token_dict["semrel"]
# del token_dict["embeddings"]
tokens.append(token_dict) tokens.append(token_dict)
# Range tokens must be tuple not list, this is conllu library requirement # Range tokens must be tuple not list, this is conllu library requirement
for t in tokens: for t in tokens:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment