mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +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
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user