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.

Source Distribution

SentiLeak-0.1b11.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

SentiLeak-0.1b11-py3-none-any.whl (19.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page