Skip to content

4. Training Word2Vec Model

akoksal edited this page May 2, 2018 · 3 revisions

After preprocessing the corpus, training word2vec model with gensim library is very easy. You can use the code below to create word2vec model. First argument is revised corpus and the second one is name of the model.

python3 trainCorpus.py wiki.tr.txt trmodel

This command creates an output file which is binary file for vectors for words.

You can download pretrained model which is created by following steps in this tutorial.

Previous: 3. Preprocessing the Corpus
Next: 5. Using Word2Vec Model and Examples