Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# import modules & set up logging
import gensim, logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
sentences = [['first', 'sentence'], ['second', 'sentence']]
# train word2vec on the two sentences
model = gensim.models.Word2Vec(sentences, min_count=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment