Skip to main content

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.

image

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.

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

emoji_sentiment-0.0.6.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emoji_sentiment-0.0.6-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

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

Hashes for emoji_sentiment-0.0.6.tar.gz
Algorithm Hash digest
SHA256 bb62962ceb12c41fab69775192ebb5144249cbfb1a30c4edb011e3b735c0ba85
MD5 aca15ba0f30f970af676dd84b389d043
BLAKE2b-256 357cf066ee672cef88bc21e4a520a6a7c11be09f82bdd6ad54ad67eb19557aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for emoji_sentiment-0.0.6.tar.gz:

Publisher: pypi.yml on wei840222/emoji-sentiment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for emoji_sentiment-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ab79c724ede770c34c40aae886cb92c5e72210a530f8e91b3f3806d67aecfb0d
MD5 d4900b00968743ad54b6967bbbf9e3bb
BLAKE2b-256 67decde8c15a181e5987327f6f3e46352ef77fb144515d3d327a6f28e0907a7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for emoji_sentiment-0.0.6-py3-none-any.whl:

Publisher: pypi.yml on wei840222/emoji-sentiment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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