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 logicemoji_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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d35eec9ce6f57877bf018bd0fd0d3cc5263ea97f9920335084babd7ccafeccd9
|
|
| MD5 |
5bade15417e3bfd5f045a8c862fdc4e3
|
|
| BLAKE2b-256 |
279d52e4723b2222c698f60f8c8949b3bc5713e6c0c12d48b5b2481495ea7888
|
File details
Details for the file my_text_emojifier-0.1.0-py3-none-any.whl.
File metadata
- Download URL: my_text_emojifier-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59784051a67e946081e8a1800161499aa0138a1c7975be41a6964c66947c2c8e
|
|
| MD5 |
74ed6899c7fa3fd4eadd14bdf1371ea9
|
|
| BLAKE2b-256 |
25faf52f8a84d9072de47e6a89af7b94eb0d77e74a03b583368ccff3c0b465b1
|