Skip to main content

A simple library to replace or append emojis to text using NLTK

Project description

My Text Emojifier

A simple Python library to replace or append emojis to text using NLTK for smart matching.

Installation

pip install my-text-emojifier

Usage

Note: The import name is emoji_lib.

from emoji_lib import replace_with_emoji, append_emoji

text = "I loved my happy dogs!"

# Replace
print(replace_with_emoji(text))
# Output: I ❤️ my 😄 🐶!

# Append
print(append_emoji(text))
# Output: I loved ❤️ my happy 😄 dogs 🐶!

Project Structure

Your project folder is my-text-emojifier, but the Python package you distribute is emoji_lib (what users import). This is a common pattern—for example, you pip install scikit-learn but import sklearn.

The Python code remains unchanged:

  • emoji_lib/core.py — contains the NLTK logic
  • emoji_lib/__init__.py — contains the package imports

Build & Upload Commands

1. Build Your Package

python setup.py sdist bdist_wheel

This creates distribution files like my-text-emojifier-0.1.0.tar.gz in your dist/ folder.

2. Upload to TestPyPI

twine upload --repository testpypi dist/*

3. Test Your Package

# Deactivate and delete your old test environment first!
pip install -i https://test.pypi.org/simple/ my-text-emojifier

4. Upload to Real PyPI

twine upload dist/*

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

my_text_emojifier-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

my_text_emojifier-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file my_text_emojifier-0.1.0.tar.gz.

File metadata

  • Download URL: my_text_emojifier-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for my_text_emojifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d35eec9ce6f57877bf018bd0fd0d3cc5263ea97f9920335084babd7ccafeccd9
MD5 5bade15417e3bfd5f045a8c862fdc4e3
BLAKE2b-256 279d52e4723b2222c698f60f8c8949b3bc5713e6c0c12d48b5b2481495ea7888

See more details on using hashes here.

File details

Details for the file my_text_emojifier-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for my_text_emojifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59784051a67e946081e8a1800161499aa0138a1c7975be41a6964c66947c2c8e
MD5 74ed6899c7fa3fd4eadd14bdf1371ea9
BLAKE2b-256 25faf52f8a84d9072de47e6a89af7b94eb0d77e74a03b583368ccff3c0b465b1

See more details on using hashes here.

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