From 1470cdc6e8aa0c8a73c8ecfdacf9498275d3463e Mon Sep 17 00:00:00 2001 From: John Bauer Date: Tue, 13 Sep 2022 16:58:49 -0700 Subject: Simpler way to have PL charlm specific for NER --- stanza/resources/prepare_resources.py | 10 +++++----- 1 file 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) -- cgit v1.2.3