Skip to content

πŸ”Ž the most similar πŸ˜€s in 🐍3️⃣.

License

Notifications You must be signed in to change notification settings

chuanconggao/TopEmoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyPI version PyPI pyversions PyPI license

πŸ”Ž the most similar πŸ˜€s in 🐍3️⃣.

  • This is an application of TopSim, which searches the most similar strings against the query in Python 3.

The list of emojis are obtained from the official source Full Emoji List.

Installation

This package is available on PyPI. Just use pip3 install -U TopEmoji to install it.

CLI Usage

You can simply use the algorithm on terminal.

Usage:
    topemoji-cli <query> [-k <k>]
  • Each emoji and its description and similarity, are printed to terminal and separated by tab character \t.
topemoji-cli "baby" -k 5
πŸ‘Ά	baby	1.0
πŸ‘Ό	baby angel	0.666
🐀	baby chick	0.666
🍼	baby bottle	0.6659
🚼	baby symbol	0.6659
  • You can also use emoji as query.
topemoji-cli "πŸ˜€" -k 5
πŸ˜€	grinning face	1.0
πŸ˜†	grinning squinting face	0.9993
😺	grinning cat face	0.9331
πŸ˜…	grinning face with sweat	0.866
πŸ˜ƒ	grinning face with big eyes	0.8659

API Usage

Alternatively, you can use the algorithm via API.

from topemoji import search

print(search("baby", k=5)) # Return each similarity and the respective emojis.
# [(1.0, [('πŸ‘Ά', 'baby')]),
#  (0.6660006660006661, [('πŸ‘Ό', 'baby angel'), ('🐀', 'baby chick')]),
#  (0.665889795238888, [('🍼', 'baby bottle'), ('🚼', 'baby symbol')])]

About

πŸ”Ž the most similar πŸ˜€s in 🐍3️⃣.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages