mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
support pipeline as "list in string"
This commit is contained in:
parent
2247d62655
commit
5b94aeece9
|
@ -42,6 +42,8 @@ def init_config_cli(
|
||||||
"""
|
"""
|
||||||
if isinstance(optimize, Optimizations): # instance of enum from the CLI
|
if isinstance(optimize, Optimizations): # instance of enum from the CLI
|
||||||
optimize = optimize.value
|
optimize = optimize.value
|
||||||
|
if pipeline.startswith("[") and pipeline.endswith("]"):
|
||||||
|
pipeline = pipeline[1:-1]
|
||||||
pipeline = [p.strip() for p in pipeline.split(",")]
|
pipeline = [p.strip() for p in pipeline.split(",")]
|
||||||
init_config(output_file, lang=lang, pipeline=pipeline, optimize=optimize, cpu=cpu)
|
init_config(output_file, lang=lang, pipeline=pipeline, optimize=optimize, cpu=cpu)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user