Sentiment Classification using WSD
pip install sentiment_classifier
Overview
Sentiment Classifier using Word Sense Disambiguation using wordnet and word occurance statistics from movie review corpus nltk. Classifies into positive and negative categories.
Online Demo
Requirements
In Version 0.5 all the following requirements are installed automatically. In case of troubles install those manually.
You must have Python 2.6.
NLTK http://www.nltk.org 2.0 installed.
NumPy http://numpy.scipy.org
SentiWordNet http://sentiwordnet.isti.cnr.it
How to Install
Shell command
python setup.py install
Documentation
Script Usage
Shell Commands:
senti_classifier -c file/with/review.txt
Python Usage
Shell Commands
cd sentiment_classifier/src/senti_classifier/ python senti_classifier.py -c reviews.txt
Library Usage
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 ... 0.0 1.75
from senti_classifier.senti_classifier import synsets_scores print synsets_scores['peaceful.a.01']['pos'] ... 0.25
History
0.6 Bug Fixed upon nltk upgrade
0.5 No additional data required trained data is loaded automatically. Much faster/Optimized than previous versions.
0.4 Added Bag of Words as a Feature as occurance statistics
0.3 Sentiment Classifier First app, Using WSD module
Metadata
Release files for sentiment_classifier 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sentiment_classifier-0.7.tar.gz | 8.3 kB | Without provenance | Details for sentiment_classifier-0.7.tar.gz |
Release files / sentiment_classifier-0.7.tar.gz
| Download URL | sentiment_classifier-0.7.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bf82f0b83f772b788d979c4d003b98d9197b698d9a84d5995a39a3de7ee8cf2
|
|
BLAKE2b-256 checksum How to use checksums |
6ae19065fea58dc0a8ca34aa0a9bfa854894a2322600d2cb6a787e089320541a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sentiment_classifier 0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.