December 2019
Intermediate to advanced
468 pages
14h 28m
English
In the first example, we'll train a word2vec model on the classic novel War and Peace by Leo Tolstoy. The novel is stored as a regular text file in the code repository. Let's start:
import loggingimport pprint # beautify printsimport gensimimport nltk
logging.basicConfig(level=logging.INFO)
Read now
Unlock full access