Skip to main content

A lexicon-based sentiment analysis for Spanish.

Project description

CI new dev push

CD approved PR dev to master

SentiLeak

This is a lexicon-based sentiment analysis package for Python.

For now, it only supports Spanish but it will be extended to support other languages like English, Portuguese, Catalan or French.

Installation

SentiLeak can be installed with pip:

pip install SentiLeak

Usage

To use this package, it is only necessary to import SentiLeak class and call the method compute_sentiment.

This is an example of usage:

>>> from sentileak import SentiLeak
>>> sent_analysis = SentiLeak()
>>> text = "La decisión del árbitro fue muy perjudicial para el equipo local. El partido estaba empatado para ambos equipos. Al final, el portero hizo una gran intervención que salvó a su equipo."
>>> sent_analysis.compute_sentiment(text)
{
	'per_sentence_sentiment': [{
		'position': 0,
		'text': 'La decisión del árbitro fue muy perjudicial para el equipo local.',
		'score': -3.0
	}, {
		'position': 1,
		'text': 'El partido estaba empatado para ambos equipos.',
		'score': 0.0
	}, {
		'position': 2,
		'text': 'Al final, el portero hizo una gran intervención que salvó a su equipo.',
		'score': 3.0
	}],
	'global_sentiment': 0.0
}

Contributor

The main (and the only) contributor is FernanOrtega

This project has also the support of Opileak

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SentiLeak, version 0.1b11
Filename, size File type Python version Upload date Hashes
Filename, size SentiLeak-0.1b11-py3-none-any.whl (19.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size SentiLeak-0.1b11.tar.gz (16.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page