Skip to main content

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)
>> print(Jojify.predict("ironman"))
('🦸', 'U+1F9B8', 0.40435058484084363)
>> print(Jojify.predict("good night"))
('👌🌃', ['U+1F44C', 'U+1F303'], 0.7178929764409834)

How to Test

pytest tests

Future work

  1. 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.2.0-py3-none-any.whl (45.3 MB view hashes)

Uploaded Python 3

Supported by

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