How to get vectors for a word list using Word2Vec?

I want to create a text file, which is essentially a dictionary, with each word being associated with its vector representation via word2vec. I guess the process should be to prepare word2vec first and then look at every word from my list and find its representation (and then save it in a new text file)?

I am new to word2vec and I do not know how to do this. I read a few basic sites and a few questions about Stack and have not yet found a good tutorial.

+4
source share
1 answer

The Gensim tutorial explains this very clearly.

word2vec - , .

 model = Word2Vec(sentences, size=100, window=5, min_count=5, workers=4)

( , ).

:

for word in words:
  vector = model[word]

, , .

+9

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


All Articles