From c8d3694e2d5ce4173304cead3c69d18f1a7c8bcc Mon Sep 17 00:00:00 2001 From: "Kyle P. Johnson" Date: Sun, 13 Nov 2016 09:54:42 -0800 Subject: [PATCH] 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` --- examples/nn_text_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nn_text_class.py b/examples/nn_text_class.py index 4a19e5780..e19e93cac 100644 --- a/examples/nn_text_class.py +++ b/examples/nn_text_class.py @@ -56,7 +56,7 @@ class Extractor(object): self.vector.fill(0) n = 0 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 if orth_id < E.shape[0]: self.vector += E[orth_id] * freq