Skip to content

DanilBaibak/sentiment_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment analysis

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.

Main features

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.

Installation

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

Example

from sentiment_analysis.estimator import Estimator

estimator = Estimator()
print(estimator.estimate('The staff is amazing, friendly and helpful.'))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages