From cd0dd782761abc83849fbb6ba3fdad5253b5b9c8 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sat, 27 Jun 2020 21:16:57 +0200 Subject: [PATCH] Simplify model loading (now supported via load_model) --- spacy/cli/evaluate.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spacy/cli/evaluate.py b/spacy/cli/evaluate.py index 039a596d4..49d02ca9a 100644 --- a/spacy/cli/evaluate.py +++ b/spacy/cli/evaluate.py @@ -64,10 +64,7 @@ def evaluate( if displacy_path and not displacy_path.exists(): msg.fail("Visualization output directory not found", displacy_path, exits=1) corpus = Corpus(data_path, data_path) - if model.startswith("blank:"): - nlp = util.get_lang_class(model.replace("blank:", ""))() - else: - nlp = util.load_model(model) + nlp = util.load_model(model) dev_dataset = list(corpus.dev_dataset(nlp, gold_preproc=gold_preproc)) begin = timer() scorer = nlp.evaluate(dev_dataset, verbose=False)