Fix init_model

This commit is contained in:
Matthew Honnibal 2018-07-03 23:24:11 +02:00
parent 4a38a26cb5
commit 6692833887
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ def create_model(lang, lex_attrs, vectors_data, vector_keys, prune_vectors):
lexeme = nlp.vocab[word] lexeme = nlp.vocab[word]
lexeme.is_oov = False lexeme.is_oov = False
lex_added += 1 lex_added += 1
if vectors_data: if vectors_data is not None:
nlp.vocab.vectors = Vectors(data=vectors_data, keys=vector_keys) nlp.vocab.vectors = Vectors(data=vectors_data, keys=vector_keys)
if prune_vectors >= 1: if prune_vectors >= 1:
nlp.vocab.prune_vectors(prune_vectors) nlp.vocab.prune_vectors(prune_vectors)