Skip to content
Snippets Groups Projects
Commit eeae7d61 authored by Bartlomiej's avatar Bartlomiej
Browse files

Fix check tokens and keys from spans ner

parent 6f2ec546
1 merge request!11Clarin json support
Pipeline #14319 passed with stages
in 1 minute and 39 seconds
......@@ -79,7 +79,7 @@ class WiktorNERInputParser(InputParser):
annotations = []
# Morphosyntactic annotations
if content.tokens:
if content.tokens():
for token in content.tokens():
if token.lexemes:
for lexeme in token.lexemes:
......@@ -99,7 +99,7 @@ class WiktorNERInputParser(InputParser):
)
)
# NER annotations
if content.spans:
if 'ner' in content.get_span_types():
for entity in content.spans('ner'):
if entity.type:
annotations.append(
......
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