text_plain_output_1.png
from gensim.models import KeyedVectors, Word2Vec

from nltk.tokenize import RegexpTokenizer

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

forum_posts = pd.read_csv('../input/meta-kaggle/ForumMessages.csv')['Message'].astype('str')

tokenizer = RegexpTokenizer('\\w+')
data_tokenized = [w.lower() for w in forum_posts.tolist()]
data_tokenized = [tokenizer.tokenize(i) for i in data_tokenized]

model_2 = Word2Vec(size=300, min_count=1)
model_2.build_vocab(data_tokenized)
total_examples = model_2.corpus_count
model_2.train(data_tokenized, total_examples=total_examples, epochs=1)