emoji switch
Project description
Emojiswitch
Emoji switch (supporting Chinese and English by set parameter lang)
Example
from emojiswitch import emojize, demojize
# word switch to emoji
print(emojize('This animal is :tiger:', delimiters=(":", ":"), lang="en")) # This animal is 🐅
print(emojize('这个动物是__老虎__', delimiters=("__", "__"), lang="zh")) # 这个动物是🐅
# emoji swith to word
print(demojize('我喜欢吃🍏', delimiters=("__", "__"), lang="zh")) # 我喜欢吃__青苹果__
print(demojize('I like eating 🍏', delimiters=("__", "__"), lang="en")) # I like eating __green_apple__
Two modes:
-
demojize :Parsing Emoji into a specific language
(delimiters: distinguish the text to be translated) -
emojize :Translate text to Emoji
(delimiters: distinguish the text to be translated)
(Note: currently only Chinese (zh) and English (en) are supported)
Installation
$ pip install emojiswitch
Authors
mieqihezi (梅妻鹤子)
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
emojiswitch-0.0.3.tar.gz
(71.0 kB
view hashes)
Built Distribution
Close
Hashes for emojiswitch-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38e69a10bf90f1539fd5494793c586a4e6ae3f8bac5b93a8d07f0c4e763eca23 |
|
MD5 | 4abfbbf1aaea47d08c9febc8099e5a35 |
|
BLAKE2b-256 | 68ad6e91e528ac5d0e85e626a57121324afd41b1edd4a5d2a5bde21bb8681b0e |