Skip to content

Instantly share code, notes, and snippets.

View mjahanshahi's full-sized avatar

Maryam mjahanshahi

View GitHub Profile
@mjahanshahi
mjahanshahi / sentiment.py
Created August 3, 2017 22:06 — forked from bbengfort/sentiment.py
An end-to-end demonstration of a Scikit-Learn SVM classifier trained on the positive and negative movie reviews corpus in NLTK.
import os
import time
import string
import pickle
from operator import itemgetter
from nltk.corpus import stopwords as sw
from nltk.corpus import wordnet as wn
from nltk import wordpunct_tokenize