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 02:58:49 +0300
committerJohn Bauer <horatio@gmail.com>2022-09-14 02:58:49 +0300
commit1470cdc6e8aa0c8a73c8ecfdacf9498275d3463e (patch)
tree5152846b879286a175ca55b403c4958a2de76055
parent2511f1f8d96416d047696303f53bd5b12f1abba2 (diff)
Simpler way to have PL charlm specific for NER
-rw-r--r--stanza/resources/prepare_resources.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/stanza/resources/prepare_resources.py b/stanza/resources/prepare_resources.py
index 52d1e7f1..cd219b91 100644
--- a/stanza/resources/prepare_resources.py
+++ b/stanza/resources/prepare_resources.py
@@ -173,7 +173,7 @@ default_charlms = {
"my": "oscar",
"nb": "conll17",
"nl": "ccwiki",
- "pl": "oscar",
+ #"pl": "oscar",
"ru": "newswiki",
"sv": "conll17",
"th": "oscar",
@@ -190,7 +190,6 @@ pos_charlms = {
"genia": None,
"mimic": "mimic",
},
- "pl": None, # temporary until these are rebuilt with charlm
"tr": { # no idea why, but this particular one goes down in dev score
"boun": None,
},
@@ -217,6 +216,9 @@ ner_charlms = {
"nn": {
"norne": None,
},
+ "pl": {
+ "nkjp": "oscar",
+ },
}
ner_pretrains = {
@@ -373,10 +375,8 @@ def get_pos_dependencies(lang, package):
else:
dependencies = [{'model': 'pretrain', 'package': package}]
- if lang in pos_charlms and isinstance(pos_charlms[lang], dict) and package in pos_charlms[lang]:
+ if lang in pos_charlms and package in pos_charlms[lang]:
charlm_package = pos_charlms[lang][package]
- 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)