From 69c900f0032b03dc00e8393acd57768011d4d379 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 25 Jun 2018 18:26:02 +0200 Subject: [PATCH] Fix init-model if no vectors provided --- spacy/cli/init_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/init_model.py b/spacy/cli/init_model.py index c83b95782..bad63209e 100644 --- a/spacy/cli/init_model.py +++ b/spacy/cli/init_model.py @@ -96,7 +96,7 @@ def create_model(lang, probs, oov_prob, clusters, vectors_data, vector_keys, pru lexeme = nlp.vocab[word] lexeme.is_oov = False lex_added += 1 - if len(vectors_data): + if vectors_data: nlp.vocab.vectors = Vectors(data=vectors_data, keys=vector_keys) if prune_vectors >= 1: nlp.vocab.prune_vectors(prune_vectors)