June 2019
Intermediate to advanced
372 pages
6h 34m
English
This section is included to assist the learners to perform the activities present in the book. It includes detailed steps that are to be performed by the learners to complete and achieve the objectives of the book.
Solution:
from gensim.models import word2vec
sentences = word2vec.Text8Corpus('text8')
model = word2vec.Word2Vec(sentences, size = 200)
model.most_similar(['man'])
The output is as follows: ...
Read now
Unlock full access