-
Notifications
You must be signed in to change notification settings - Fork 33
/
README
90 lines (56 loc) · 2.09 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Sentiment Classification using WSD
==================================
- ``pip install sentiment_classifier``
- `Home <http://www.jaist.ac.jp/~s1010205/>`_
- `Download <http://pythonpackages.com/package/sentiment_classifier>`_
- `Github <https://github.com/kevincobain2000/sentiment_classifier>`_
- `Try Online <http://www.jaist.ac.jp/~s1010205/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
-----------
- `Try Online <http://www.jaist.ac.jp/~s1010205/sentiment_classifier/>`_
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
-------------
- http://pythonhosted.org/sentiment_classifier/
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.7`` Python 3.0 suport Thanks to @MrLokans
- ``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