Skip to content

Instantly share code, notes, and snippets.

View schinazi's full-sized avatar

Brian Schinazi schinazi

View GitHub Profile
@schinazi
schinazi / sentiment.py
Created December 4, 2017 22:00 — 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