Skip to content
A simple dictionary-based sentiment analysis system with Russian language support
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sentimental Fix empty input bug May 27, 2017
tests Fix empty input bug May 27, 2017
.gitignore .gitignore and readme May 12, 2017
README.md Fix empty input bug May 27, 2017
setup.py Fix empty input bug May 27, 2017

README.md

Sentimental

Python port of github.com/Wobot/Sentimental with some improvements

A simple dictionary-based sentiment analysis system with Russian language support.

Installation

pip install -U git+https://github.com/text-machine-lab/sentimental.git

or

pip install -U git+ssh://git@github.com/text-machine-lab/sentimental.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, '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.

You can’t perform that action at this time.