From 4555e3e251ed1923c29cd1c08a429397ca6fa6dd Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 28 Mar 2018 20:12:45 +0200 Subject: [PATCH] Dont assume pretrained_vectors cfg set in build_tagger --- spacy/_ml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/_ml.py b/spacy/_ml.py index 2d366af74..7a76405fb 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -438,7 +438,7 @@ def build_tagger_model(nr_class, **cfg): token_vector_width = cfg['token_vector_width'] else: token_vector_width = util.env_opt('token_vector_width', 128) - pretrained_vectors = cfg['pretrained_vectors'] + pretrained_vectors = cfg.get('pretrained_vectors') with Model.define_operators({'>>': chain, '+': add}): if 'tok2vec' in cfg: tok2vec = cfg['tok2vec']