Text Mining: Sentiment Classifier
Sentiment Classifier menggunakan Word Sense Disambiguation menggunakan WordNet dan statistik terjadinya kata dari corpus movie review NLTK. Mengklasifikasikan ke dalam kategori positif dan negatif.
Persyaratan
- Python 2.6.
- NLTK http://www.nltk.org 2.0
- NumPy http://numpy.scipy.org
- SentiWordNet http://sentiwordnet.isti.cnr.it
Cara Install
Perintah shell
sudo python setup.py install
Dokumen
http://readthedocs.org/docs/sentiment_classifier/en/latest/ Try Online
Penggunaan
Perintah shell
senti_classifier -c file/with/review.txt
Penggunaan Python
Perintah shell
cd sentiment_classifier/src/senti_classifier/ python senti_classifier.py -c reviews.txt
Penggunaan Library
from senti_classifier import senti_classifier sentences = ['The movie was the worst movie', 'It was the worst acting by the actors'] pos_score, neg_score = senti_classifier.polarity_scores(sentences) print pos_score, neg_score