Handle conversion of pipeline components correctly

Allow both comma and comma + whitespace as separators
This commit is contained in:
ines 2017-09-29 20:52:56 +02:00
parent 7d77dc490f
commit fd1a9225d8

View File

@ -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):