emoji_translate
Emoji translation for Python. This project relies on previous works, like emoji, emojilib, and vaderSentiment.
The primary differentiator of this work is the incorporation of keyword alternatives to the standard unicode emoji descriptions, which result in more natural translations. The translation can also be randomized if desired.
Example
from emoji_translate.emoji_translate import Translator
emo = Translator(exact_match_only=False, randomize=True)
# basic translation
print(emo.emojify('The house is on fire!')) # > 'The 🏠 is on 🔥!'
print(emo.demojify('The 🏠 is on 🔥!')) # > 'The house is on fire!'
# targeting sentiment
print(emo.remove_positive_emojis('That new SNL skit 😂😂')) # > 'That new SNL skit'
print(emo.add_positive_emojis('I cannot believe it!', num=1)) # > 'I cannot believe it! 💪'
print(emo.add_negative_emojis('I cannot believe it!', num=2)) # > 'I cannot believe it! 🙄😱'
print(emo.add_neutral_emojis('I cannot believe it!', num=3)) # > 'I cannot believe it! 🚝🐮🛶'
NOTE: Emoji sentiment (polarity) was computed by concatenating the emoji short_name and keywords and passing them all into vaderSentiment.SentimentIntensityAnalyzer.
Installation
Via pip:
pip install emoji_translate
From master branch:
$ git clone https://github.com/fabriceyhc/emoji_translate.git
$ cd emoji_translate
$ python setup.py install
Roadmap
The following enhancements are planned for sometime in the future. Feel free to reach out / submit pull requests if you want to beat me to it.
- Creating a static / functional version of the package that does not require the creation of Emojify object.
- Incorporating part-of-speech (POS) information during emoji translation, possibly via spaCy.
- Using an alternative to VADER for sentiment analysis on the emojis, possibly offering a variety of options.
Authors
Fabrice Harel-Canada / @fabriceyhc
Metadata
Release files for emoji-translate 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emoji_translate-0.1.1.tar.gz | 173.3 kB | Without provenance | Details for emoji_translate-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emoji_translate-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for emoji_translate-0.1.1-py3-none-any.whl |
Total release size: 348.1 kB
Release files / emoji_translate-0.1.1.tar.gz
| Download URL | emoji_translate-0.1.1.tar.gz |
|---|---|
| Size | 173.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21a0495d14258e1be644ad7e3a331a537f2c4ba78f00859061c98990eff2da82
|
|
BLAKE2b-256 checksum How to use checksums |
34e08eaa05c9140f0646e85ab3de18dcb95834e2175d9414aad80e01daad43e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Release files / emoji_translate-0.1.1-py3-none-any.whl
| Download URL | emoji_translate-0.1.1-py3-none-any.whl |
|---|---|
| Size | 174.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0331c0d817a96203c95cb7a5c614394370e83a80662c41b8416b6211185dbad0
|
|
BLAKE2b-256 checksum How to use checksums |
5ff2f0e493080deac42a0970bd7624181eb8d4aa779f7496314527637531d6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Security for emoji-translate 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.