From eca41f0cf6c8773813fc7e73096881d3eef38850 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 1 Nov 2017 21:26:49 +0100 Subject: [PATCH] Fix filename conversion for conllu --- spacy/cli/converters/conllu2json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/converters/conllu2json.py b/spacy/cli/converters/conllu2json.py index 4dc789010..854b4f204 100644 --- a/spacy/cli/converters/conllu2json.py +++ b/spacy/cli/converters/conllu2json.py @@ -27,8 +27,8 @@ def conllu2json(input_path, output_path, n_sents=10, use_morphology=False): docs.append(doc) sentences = [] + output_filename = input_path.parts[-1].replace(".conll", ".json") output_filename = input_path.parts[-1].replace(".conllu", ".json") - output_filename = output_filename.parts[-1].replace(".conll", ".json") output_file = output_path / output_filename with output_file.open('w', encoding='utf-8') as f: f.write(json_dumps(docs))