Я хочу сохранить векторы слов в виде массива из модели Google Word2vec.Я выполнил следующее:
import numpy as np
model = gensim.models.KeyedVectors.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True,limit=50000)
word_vectors = model.wv
text=[]
for word in word_vectors.vocab:
text=np.append(text,word)
text=text.tolist()
np.save('googleWordlist',text)
a = np.array([])
for i in range(1000):
b = np.array(model[wordsList[i]])
a = np.vstack((a,b))