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.1.1.tar.gz (16.3 kB view hashes)

Uploaded source

Built Distribution

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

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page