To split the vector query code between different training algos (Word2Vec, Fastext, WordRank, VarEmbed), the authors divided the storage and query of word vectors into a separate class KeyedVectors.
Two methods and several attributes in the word2vec class are deprecated.
Methods
- load_word2vec_format
- save_word2vec_format
Attributes
- syn0norm
- syn0
- Vocab
- index2word
They have been ported to the KeyedVectors class.
After upgrading to this version, you may receive exceptions about deprecated methods or missing attributes.
To remove exceptions you should use
KeyedVectors.load_word2vec_format (instead ofWord2Vec.load_word2vec_format) word2vec_model.wv.save_word2vec_format (instead of word2vec_model.save_word2vec_format) model.wv.syn0norm instead of (model.syn0norm) model.wv.syn0 instead of (model.syn0) model.wv.vocab instead of (model.vocab) model.wv.index2word instead of (model.index2word)
source share