From 5b94aeece9b4acc9d303ad8a17b04ce3e11870f2 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 11 Sep 2020 11:08:46 +0200 Subject: [PATCH] support pipeline as "list in string" --- spacy/cli/init_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/cli/init_config.py b/spacy/cli/init_config.py index 584ca7f64..a23b15d53 100644 --- a/spacy/cli/init_config.py +++ b/spacy/cli/init_config.py @@ -42,6 +42,8 @@ def init_config_cli( """ if isinstance(optimize, Optimizations): # instance of enum from the CLI optimize = optimize.value + if pipeline.startswith("[") and pipeline.endswith("]"): + pipeline = pipeline[1:-1] pipeline = [p.strip() for p in pipeline.split(",")] init_config(output_file, lang=lang, pipeline=pipeline, optimize=optimize, cpu=cpu)