convert a word to corresponding emoji
Project description
Joji
Joji convert a text to corresponding emoji if emoji is available
How it Works ?
1. There is a json file with emoji names as keys and corresponding unicode of emojis as values.
2. There is a method that check if the input word is in the key space of the json. If yes then will return corresponding value.
3. There is a method that do similarity matching of word against the keys in json and return the emoji unicode corresponding to the key with maximum similarity value.
4. There is a threshold to avoid False Positives.
5. If both checking and matching don't return anything, just return the word - means there is no emoji for that word.
Libraries used
How to configure
python setup.py install
Install
Joji is now available in pip
pip install joji
How to Run
>> from joji.jojify import Jojify
>> print(Jojify.predict("dracula"))
('🧛', 'U+1F9DB', 0.5509367532053601)
>> print(Jojify.predict("ganja"))
('🌿', 'U+1F33F', 0.2860632682239092)
How to Test
pytest tests
Future work
- Maybe add vaaku2vec and create malayalam text to emoji
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
joji-1.1.9-py3-none-any.whl
(45.3 MB
view hashes)