Giter Site home page Giter Site logo

sandy4321 / topemoji Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chuanconggao/topemoji

0.0 2.0 0.0 40 KB

๐Ÿ”Ž the most similar ๐Ÿ˜€s in ๐Ÿ3๏ธโƒฃ.

Home Page: https://git.io/topemoji

License: MIT License

Python 100.00%

topemoji's Introduction

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')])]

topemoji's People

Contributors

chuanconggao avatar toddrme2178 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.