emoj

Find relevant emoji from text

Build Status

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

License

MIT © Juan Soto