Fix init_model

This commit is contained in:
Matthew Honnibal 2018-07-05 14:02:06 +02:00
parent 7b09a4ca49
commit 8ae1bec8bf

View File

@ -145,7 +145,6 @@ def add_vectors(nlp, vectors_loc, prune_vectors):
if word not in nlp.vocab: if word not in nlp.vocab:
lexeme = nlp.vocab[word] lexeme = nlp.vocab[word]
lexeme.is_oov = False lexeme.is_oov = False
lex_added += 1
if vectors_data is not None: 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)
nlp.vocab.vectors.name = '%s_model.vectors' % nlp.meta['lang'] nlp.vocab.vectors.name = '%s_model.vectors' % nlp.meta['lang']