Creating the word2vec extension for the syn1neg.npy model

When creating a model, there is no longer a model with an extension of the end

.syn1neg.npy

syn0.npy

My code is below:

corpus= x+y
tok_corp= [nltk.word_tokenize(sent.decode('utf-8')) for sent in corpus]
model = gensim.models.Word2Vec(tok_corp, min_count=1, size = 32)
model.save('/home/Desktop/test_model')

model = gensim.models.Word2Vec.load('/home/kafein/Desktop/chatbot/test_model')

There is only 1 model file

test_model

In what part am I mistaken?

+4
source share
1 answer

Gensim native .save()only stores parts of the model in such separate files (e.g., test_model.syn1neg.npyetc.) if they exceed a certain threshold. When they are small, they get "pickled" into the save file of one model.

, /. , , . ( , test_model, / - .)

+5

Source: https://habr.com/ru/post/1675520/


All Articles