mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
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:
parent
12a7b05360
commit
c8d3694e2d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user