Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stanfordnlp/stanza.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bauer <horatio@gmail.com>2022-09-14 00:29:48 +0300
committerJohn Bauer <horatio@gmail.com>2022-09-14 00:29:48 +0300
commitc7099238c2e388ee13e0b8cb793a64eb0cfd63b1 (patch)
treeeedb320300353af8b4aee0a84ae282086c0776b8
parent06f95b4222918de0baecca34cd1769068124a498 (diff)
Oops, bugfix. Otherwise you get the whole dictionary for a language/model pair where the model is not in the dictionary
-rw-r--r--stanza/resources/prepare_resources.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stanza/resources/prepare_resources.py b/stanza/resources/prepare_resources.py
index 055038f9..52d1e7f1 100644
--- a/stanza/resources/prepare_resources.py
+++ b/stanza/resources/prepare_resources.py
@@ -375,7 +375,7 @@ def get_pos_dependencies(lang, package):
if lang in pos_charlms and isinstance(pos_charlms[lang], dict) and package in pos_charlms[lang]:
charlm_package = pos_charlms[lang][package]
- elif lang in pos_charlms:
+ elif lang in pos_charlms and not isinstance(pos_charlms[lang], dict):
charlm_package = pos_charlms[lang]
else:
charlm_package = default_charlms.get(lang, None)