Rule-based library for sentiment analysis. The main idea, that library returns mark of the sentiment (3, -5, etc), but not only trend - positive or negative. The way how sentiment mark is calculated is just summarization of positive and negative adjectives, paying attention to the increment, decrement and inverter words.
Current version of the library works only with english text.
The library handles:
- increment and decrement words (like less, greatly, etc.)
- inverter words (like not, etc.)
- comparative and superlative form
The vocabulary of the adjectives can strongly influence on the sentiment mark. So you can use different vocabularies of the positive and negative adjectives depends of the context of documents.
For installation the best way use conda. After installation conda just run:
conda env create -f env.yml
After the installation was done successfully, activate your enviroment:
source activate sa
For using conda and environments, please read full documentation of conda.
For those who are using pip pip, there is file with requirements - requirements.txt
from sentiment_analysis.estimator import Estimator
estimator = Estimator()
print(estimator.estimate('The staff is amazing, friendly and helpful.'))