Allowed for empty misc conllu column

This commit is contained in:
Cyprian Laskowski 2023-08-16 16:41:02 +02:00
parent 99ac426e4b
commit 89be603103

View File

@ -278,7 +278,7 @@ def construct_sentence(sent_id, lines):
upos_other = tokens[5] upos_other = tokens[5]
depparse_link = tokens[6] depparse_link = tokens[6]
depparse_link_name = tokens[7] depparse_link_name = tokens[7]
misc = {el.split('=')[0]: el.split('=')[1] for el in tokens[9].split('|')} misc = {el.split('=')[0]: el.split('=')[1] for el in tokens[9].split('|')} if tokens[9] != '_' else {}
sentence.add_item( sentence.add_item(
token, token,