NLTK Naive Bayes Classification
Sentiment analysis: a movie reviews corpus with reviews categorized into posand neg categories, and a number of trainable classifiers.
Bag of Words Feature Extraction
For text, we’ll use a simplified bag of words model where every word is feature name with a value of True.
Training and Testing the Naive Bayes Classifier
The classifier training method expects to be given a list of tokens in the form of [(feats, label)] where feats is a feature dictionary and label is the classification label.
|
|
Screen Shot 2017-11-14 at 11.05.48 AM
sentiwordnet
|
|
Screen Shot 2017-11-14 at 11.10.51 AM