A lexicon-based sentiment analysis for Spanish.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file SentiLeak-0.1.4.tar.gz.
File metadata
- Download URL: SentiLeak-0.1.4.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
965c4859a37894e1580ec9505a4f991d9088a95fd454ce7fd73b55f79d82c18e
|
|
| MD5 |
9ee1dc2b6f7f5fbf68ef470d6f7c89f4
|
|
| BLAKE2b-256 |
59607f7098137d925ecc94f30895acaef8b73fe9909df0933f632e3ff0b17f1f
|
File details
Details for the file SentiLeak-0.1.4-py3-none-any.whl.
File metadata
- Download URL: SentiLeak-0.1.4-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80dabdd1e9383cdad6f4d5aaf58ed8785d5e9532aacfc273fe2e73848a1fb214
|
|
| MD5 |
16e9d2b1271a43e6204eecf0f4ab0b73
|
|
| BLAKE2b-256 |
249e96e22498d8ec3c3b4279a733831f369c2976af634dfd779b9b31d11067a7
|