A Python package for emoji sentiment analysis.
Project description
Emoji Sentiment
A Python package for looking up sentiment scores from the Emoji Sentiment Ranking 1.0 dataset.
The package provides a score from -1 (negative) to 1 (positive), together
with the emoji name, character, short names, and sample count. Scores come from
the bundled research dataset; the package does not run a predictive model.
Installation
Requires Python 3.14 or newer.
pip install emoji-sentiment
Usage
from emoji_sentiment import EmojiSentiment
emoji_sentiment = EmojiSentiment()
smile_emoji = emoji_sentiment.get("smile")
print(smile_emoji)
get() is case-insensitive and returns None when the short name is unknown or
not present in the dataset. Use emoji_sentiment.all to retrieve all 969
entries.
Demo
uv run --extra demo streamlit run examples/streamlit_demo.py
Development
Install the locked development environment:
uv sync --locked --dev
Run tests and lint checks:
uv run pytest --cov=emoji_sentiment --cov-report=term-missing -v tests
uv run pylint src/emoji_sentiment tests/test_emoji_sentiment.py tests/smoke_test.py
Build and validate the distribution archives:
uv build
uv run twine check --strict dist/*
Data source and license
The bundled Emoji_Sentiment_Data_v1.0.csv is from:
Kralj Novak, Petra; Smailović, Jasmina; Sluban, Borut; and Mozetič, Igor (2015), Emoji Sentiment Ranking 1.0, Slovenian language resource repository CLARIN.SI, ISSN 2820-4042.
- Resource: http://hdl.handle.net/11356/1048
- Paper: https://doi.org/10.1371/journal.pone.0144296
- Dataset license: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
The package source code is licensed under the MIT License in LICENSE. The
bundled dataset remains under CC BY-SA 4.0. See
https://github.com/wei840222/emoji-sentiment/blob/main/NOTICE.md for full
attribution and third-party licensing details.
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
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 emoji_sentiment-0.0.6.tar.gz.
File metadata
- Download URL: emoji_sentiment-0.0.6.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb62962ceb12c41fab69775192ebb5144249cbfb1a30c4edb011e3b735c0ba85
|
|
| MD5 |
aca15ba0f30f970af676dd84b389d043
|
|
| BLAKE2b-256 |
357cf066ee672cef88bc21e4a520a6a7c11be09f82bdd6ad54ad67eb19557aa8
|
Provenance
The following attestation bundles were made for emoji_sentiment-0.0.6.tar.gz:
Publisher:
pypi.yml on wei840222/emoji-sentiment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emoji_sentiment-0.0.6.tar.gz -
Subject digest:
bb62962ceb12c41fab69775192ebb5144249cbfb1a30c4edb011e3b735c0ba85 - Sigstore transparency entry: 2200510743
- Sigstore integration time:
-
Permalink:
wei840222/emoji-sentiment@0b3bd79afaa20c2452cc79f47c0b92ed431037cf -
Branch / Tag:
refs/tags/0.0.6 - Owner: https://github.com/wei840222
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@0b3bd79afaa20c2452cc79f47c0b92ed431037cf -
Trigger Event:
release
-
Statement type:
File details
Details for the file emoji_sentiment-0.0.6-py3-none-any.whl.
File metadata
- Download URL: emoji_sentiment-0.0.6-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab79c724ede770c34c40aae886cb92c5e72210a530f8e91b3f3806d67aecfb0d
|
|
| MD5 |
d4900b00968743ad54b6967bbbf9e3bb
|
|
| BLAKE2b-256 |
67decde8c15a181e5987327f6f3e46352ef77fb144515d3d327a6f28e0907a7e
|
Provenance
The following attestation bundles were made for emoji_sentiment-0.0.6-py3-none-any.whl:
Publisher:
pypi.yml on wei840222/emoji-sentiment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emoji_sentiment-0.0.6-py3-none-any.whl -
Subject digest:
ab79c724ede770c34c40aae886cb92c5e72210a530f8e91b3f3806d67aecfb0d - Sigstore transparency entry: 2200510893
- Sigstore integration time:
-
Permalink:
wei840222/emoji-sentiment@0b3bd79afaa20c2452cc79f47c0b92ed431037cf -
Branch / Tag:
refs/tags/0.0.6 - Owner: https://github.com/wei840222
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@0b3bd79afaa20c2452cc79f47c0b92ed431037cf -
Trigger Event:
release
-
Statement type: