Skip to content

Instantly share code, notes, and snippets.

@a-paxton
a-paxton / text-cleaning+word2vec-gensim.py
Created September 11, 2015 23:31
Cleaning Text Data and Creating 'word2vec' Model with Gensim
# preliminaries
from pymongo import MongoClient
from nltk.corpus import stopwords
from string import ascii_lowercase
import pandas as pd
import gensim, os, re, pymongo, itertools, nltk, snowballstemmer
# set the location where we'll save our model
savefolder = '/data'