Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devgopher/sentimental_w_stemmer
https://github.com/devgopher/sentimental_w_stemmer
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/devgopher/sentimental_w_stemmer
- Owner: devgopher
- Created: 2019-06-25T11:21:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T11:30:23.000Z (over 5 years ago)
- Last Synced: 2024-10-31T13:45:22.632Z (2 months ago)
- Language: Python
- Size: 54.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Sentimental
Python port of github.com/Wobot/Sentimental (orig: https://github.com/text-machine-lab/sentimental) with some improvements
A simple dictionary-based sentiment analysis system with Russian language support.
Installationpip3 install -U git+https://github.com/devgopher/sentimental_w_stemmer.git
or
pip3 install -U git+ssh://[email protected]/devgopher/sentimental_w_stemmer.git
Usage
from sentimental import Sentimental
sent = Sentimental()
sentence = 'Today is a good day!'
result = sent.analyze(sentence)The result is a dictionary with four fields:
{'negative': 0.0, 'positive': 3.0, 'positive_share': 1.0, 'score': 3.0, 'comparative': 0.6}
The filed score reflects the overall sentiment of the input data, and the comparative field is normalized by the length of the input, so it can be used to compare the sentiment of different texts.