From fd1a9225d80a667bfd88c5d21bdaeaf156003cf2 Mon Sep 17 00:00:00 2001 From: ines Date: Fri, 29 Sep 2017 20:52:56 +0200 Subject: [PATCH] Handle conversion of pipeline components correctly Allow both comma and comma + whitespace as separators --- spacy/cli/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spacy/cli/package.py b/spacy/cli/package.py index 7019819a7..5ffc493c3 100644 --- a/spacy/cli/package.py +++ b/spacy/cli/package.py @@ -105,8 +105,11 @@ def generate_pipeline(): "parser, ner. For more information, see the docs on processing pipelines.", title="Enter your model's pipeline components") pipeline = util.get_raw_input("Pipeline components", True) - replace = {'True': True, 'False': False} - return replace[pipeline] if pipeline in replace else pipeline.split(', ') + subs = {'True': True, 'False': False} + if pipeline in subs: + return subs[pipeline] + else: + return [p.strip() for p in pipeline.split(',')] def validate_meta(meta, keys):