Emoji Math
Because why not? I put a minimal effort into this project, so please have low expectations.
pip install [email protected]+git://github.com/whitead/emoji-math.git
Usage
emoji-math
computes the given python expression and returns either the value or the nearest 5 emojis as measured by cosine similarity.
>emoji-math ๐ - ๐น + ๐บ
Best Matches:
๐-๐น+๐บ = ๐ธ
๐-๐น+๐บ = ๐
๐-๐น+๐บ = ๐คด
>emoji-math ๐น @ ๐บ
๐น @ ๐บ = 0.32784234338655205
>emoji-math np.sin(๐ฐ)
Best Matches:
np.sin(๐ฐ) = ๐ฏ
np.sin(๐ฐ) = ๐ฐ
np.sin(๐ฐ) = ๐ธ
>emoji-math ๐น + ๐บ
Best Matches:
๐น+๐บ = ๐ป
๐น+๐บ = ๐บ
๐น+๐บ = ๐น
Options
You can choose between using the Euclidean distance or cosine similarity for reporting results. Cosine works better for multiplication/division because it only cares about direction. Default is Euclidean.
>emoji-math --cosine ๐น + ๐บ
Best Matches:
๐น+๐บ = ๐
๐น+๐บ = ๐บ
๐น+๐บ = ๐น
Google Colab
Credit
Made by @andrewwhite01
Vector embeddings from emoji2vec as described in
@misc{eisner2016emoji2vec,
title={emoji2vec: Learning Emoji Representations from their Description},
author={Ben Eisner and Tim Rocktรคschel and Isabelle Augenstein and Matko Boลกnjak and Sebastian Riedel},
year={2016},
eprint={1609.08359},
archivePrefix={arXiv},
primaryClass={cs.CL}
}