-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors due to Word2Vec being deprecated #12
Comments
Since, the syntax for word2vec training is: Therefore, to avoid common mistakes around the model’s ability to do multiple training passes itself, an explicit epochs argument MUST be provided. In the common and recommended case where train() is only called once, you can set epochs=self.iter. So instead of |
In [25]:all_word_vectors_matrix = thrones2vec.syn0 Solution: The error was due to, |
It should actually be thrones2vec.train(sentences,total_words=thrones2vec.corpus_count,epochs=thrones2vec.epochs) |
The
vocab
dictionary mapping words to slots/counts/etc has been moved to a KeyedVectors object used by the model, and held in thewv
property.So
model.vocab
should be replaced bymodel.wv.vocab
.So in In[19] it should be : print("Word2Vec vocabulary length:", len(thrones2vec.wv.vocab))
The text was updated successfully, but these errors were encountered: