Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whitead/emoji-math
A complete waste of time
https://github.com/whitead/emoji-math
Last synced: 29 days ago
JSON representation
A complete waste of time
- Host: GitHub
- URL: https://github.com/whitead/emoji-math
- Owner: whitead
- Created: 2021-07-28T19:34:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-11T19:15:14.000Z (almost 2 years ago)
- Last Synced: 2024-08-06T21:20:49.428Z (3 months ago)
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Emoji Math
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/whitead/emoji-math/blob/master/colab/EmojiMath.ipynb)Because why not? I put a minimal effort into this project, so please have low expectations.
```sh
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.```sh
>emoji-math π - πΉ + πΊ
Best Matches:
π-πΉ+πΊ = πΈ
π-πΉ+πΊ = π
π-πΉ+πΊ = π€΄
``````sh
>emoji-math πΉ @ πΊ
πΉ @ πΊ = 0.32784234338655205
``````sh
>emoji-math np.sin(π°)
Best Matches:
np.sin(π°) = π―
np.sin(π°) = π°
np.sin(π°) = πΈ
``````sh
>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.```sh
>emoji-math --cosine πΉ + πΊ
Best Matches:
πΉ+πΊ = π
πΉ+πΊ = πΊ
πΉ+πΊ = πΉ
```## Google Colab
Start using emoji math with [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/whitead/emoji-math/blob/master/colab/EmojiMath.ipynb)
## Credit
Made by [@andrewwhite01](https://twitter.com/andrewwhite01)
Vector embeddings from [emoji2vec](https://github.com/uclnlp/emoji2vec) as described in
```bibtex
@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}
}
```