text-to-emoji

0.1.0

🤷‍♂️ Not sure why you'd need this.
WouterWisse/text-to-emoji

What's New

🥳 0.1.0

2022-10-20T20:06:23Z

First release of text-to-emoji. Still an early version with just en and nl localizations with a heavy focus on the food and drink category which is needed for an upcoming app.

text-to-emoji

text-to-🤩
🤷‍♂️ Not sure why you'd need this.

Installation

XcodeFileAdd packages... → enter url → https://github.com/WouterWisse/text-to-emoji

How to use

Get an emoji

let emoji = await TextToEmoji.emoji(for: "tomato") // 🍅

This is an async method that will throw the error noMatchFound if no emoji has been matched with the given text.

Get an emoji for a preferred category

let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .foodAndDrink) // 🍤
let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .animalsAndNature) // 🦐

With preferredCategory, you can give a certain emoji category a higher priority. This can be very useful if you already know the context in which you are searching. For example, when looking for the word shrimp, two matching emoji's could be: 🦐 and 🍤.
By passing .foodAndDrink as the preferredCategory, the first match will be 🍤. Passing .animalsAndNature would result in 🦐.

See EmojiCategory.swift for all categories.

Localization

Languages Supported
🇬🇧 English
🇳🇱 Dutch
🇩🇪 Deutsch
🇪🇸 Español
🇫🇷 Français
🇮🇹 Italiano
🇵🇹 Português

Contribution

Feel free to help me out here, especially with the localization.

Keep me caffeinated

Buy me a Coffee

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Apr 15 2024 05:45:34 GMT-0900 (Hawaii-Aleutian Daylight Time)