Ch lex.repvec to lex.vector

For preventing the AttributeError: `File "spacy/lexeme.pyx", line 159, in spacy.lexeme.Lexeme.repvec.__get__ (spacy/lexeme.cpp:5016)
AttributeError: lex.repvec has been renamed to lex.vector`
This commit is contained in:
Kyle P. Johnson 2016-11-13 09:54:42 -08:00 committed by GitHub
parent 12a7b05360
commit c8d3694e2d

View File

@ -56,7 +56,7 @@ class Extractor(object):
self.vector.fill(0) self.vector.fill(0)
n = 0 n = 0
for orth_id, freq in bow.items(): for orth_id, freq in bow.items():
self.vector += self.nlp.vocab[self.nlp.vocab.strings[orth_id]].repvec * freq self.vector += self.nlp.vocab[self.nlp.vocab.strings[orth_id]].vector * freq
# Apply the fine-tuning we've learned # Apply the fine-tuning we've learned
if orth_id < E.shape[0]: if orth_id < E.shape[0]:
self.vector += E[orth_id] * freq self.vector += E[orth_id] * freq