emoj
Find relevant emoji from text
Uses the API from this great article on Emoji & Deep Learning. Check out the Dango app if you want something like this on your phone.
Install
In your mix.exs:
defp deps do
[
{:emoj, "~> 1.0.1"}
]
end
Then run mix deps.get.
Usage
Check out the HexDocs for more detailed information.
First of all, add Emoj to the application function in your mix.exs:
def application do
[applications: [:logger, :emoj]]
end
Then just use Emoj.search to search for relevant emoji:
Emoj.search("I love chicken")
# {:ok, ["🐔", "🍗", "🐓", "🐥", "🐤", "🐣", "🍖", "😋", "😍", "👅"]}
Any possible error will result in an {:error, reason} tuple.
Related
- sindresorhus/emoj - Node and CLI version of this
License
MIT © Juan Soto