diff --git a/spacy/cli/converters/conllu2json.py b/spacy/cli/converters/conllu2json.py index 8f2900a9b..e66a8c50e 100644 --- a/spacy/cli/converters/conllu2json.py +++ b/spacy/cli/converters/conllu2json.py @@ -34,6 +34,9 @@ def conllu2json(input_data, n_sents=10, use_morphology=False, lang=None, **_): doc = create_doc(sentences, i) docs.append(doc) sentences = [] + if sentences: + doc = create_doc(sentences, i) + docs.append(doc) return docs