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.
Requires Python 3.14 or newer.
pip install emoji-sentimentfrom 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.
uv run --extra demo streamlit run examples/streamlit_demo.pyInstall the locked development environment:
uv sync --locked --devRun 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.pyBuild and validate the distribution archives:
uv build
uv run twine check --strict dist/*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.