Skip to content

whitead/emoji-math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emoji Math

Open In Colab

Because why not? I put a minimal effort into this project, so please have low expectations.

pip install emath@https://github.com/whitead/emoji-math/archive/refs/heads/main.zip

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

Start using emoji math with Open In 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}
}

About

A complete waste of time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published