diff options
author | John Bauer <horatio@gmail.com> | 2022-09-01 03:46:25 +0300 |
---|---|---|
committer | John Bauer <horatio@gmail.com> | 2022-09-01 03:46:25 +0300 |
commit | 5e3ab62f0bbbc005f08d611657b42b61457ad01f (patch) | |
tree | 130b77bd08a89495968c1dc24d9978e35fb09c4b | |
parent | 942433a4dd67d799d5ffadfdff057b9278e93640 (diff) |
Allow for a list of NER models in the processors argument, similar to the list of NER models in the package argument when creating a pipeline. From @mpenalver in #928
-rw-r--r-- | stanza/resources/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stanza/resources/common.py b/stanza/resources/common.py index 1a93797a..f80986f9 100644 --- a/stanza/resources/common.py +++ b/stanza/resources/common.py @@ -404,8 +404,8 @@ def process_pipeline_parameters(lang, model_dir, package, processors): package = None elif isinstance(processors, dict): processors = { - k.strip().lower(): v.strip().lower() \ - for k, v in processors.items() + k.strip().lower(): ([v_i.strip().lower() for v_i in v] if isinstance(v, (tuple, list)) else v.strip().lower()) + for k, v in processors.items() } elif processors is not None: raise TypeError( |