Repository navigation
What constitutes an acceptable keyword? #194
Description
First of all, thank you for maintaining this repository!
I wrote a rudimentary emoji search program using your data, and noticed that, for example, "poop" does not match any of the keywords for 💩:
emojilib/dist/emoji-en-US.json
Lines 746 to 753 in f3169dc
| "💩": [ | |
| "pile_of_poo", | |
| "hankey", | |
| "shitface", | |
| "fail", | |
| "turd", | |
| "shit" | |
| ], |
There are a lot of other poop synonyms listed here, so I feel that "poop" would be an uncontroversial addition. But there are many synonyms for poop, and we might not want to include them all?
Another example I ran into was for 📱:
emojilib/dist/emoji-en-US.json
Lines 7259 to 7265 in f3169dc
| "📱": [ | |
| "mobile_phone", | |
| "technology", | |
| "apple", | |
| "gadgets", | |
| "dial" | |
| ], |
The first phrase I'd say if you asked me to identify this emoji is "cell phone." However, none of the keywords for this emoji would match "cell." Would it be appropriate to add "cell," "cell_phone," or "cellular_phone?" Are non-official keywords that use underscores OK, or should substrings like "phone" be added as well as "mobile_phone?"
Finally, and I write this sincerely, I'd like to discuss 🍆:
emojilib/dist/emoji-en-US.json
Lines 4269 to 4275 in f3169dc
| "🍆": [ | |
| "eggplant", | |
| "vegetable", | |
| "nature", | |
| "food", | |
| "aubergine" | |
| ], |
This emoji is often used to signify a penis. Would it be acceptable to add "dick" or "penis" to the list of associated keywords for this emoji? I think that doing so would better reflect common usage, but might stray too far from Unicode's "intended use" for the emoji (if that's a thing).
I suggest that a section be added to CONTRIBUTING.md or README.md that gives guidance to future contributors about questions like these.
…and that's how I posted a GitHub issue about poop, cell phones, and penises 🤪
Activity
muan commentedon Feb 3, 2022
Hey sorry for the lack of response I was largely away last year.
TBH I have not thought about this at length. but I agree with what you've written here. If pull requests were sent for these keywords, I'd accept them all.
I agree. I'd be happy to accept a PR for this if anyone's willing to send them.
thdoan commentedon Jul 5, 2022
@jacobwhall I'm planning to fork this and start an emoji autocomplete project also. Have you settled on a fast way to search through the aliases? I was thinking about doing something like a filter, but not sure if there are faster options out there.
UPDATE: I did some performance tests, and I think for best performance I'm going to flatten the arrays into strings -- finding partial text matches in strings is faster than doing the same operation on arrays.
https://jsbench.me/zql58n0oew/1
When doing a partial match on every keystroke, every bit of performance counts ^^.
jacobwhall commentedon Jul 7, 2022
@thdoan sounds like you've done as much as I have. I wrote an emoji picker in Python that you're welcome to check out. The search works surprisingly well!
thdoan commentedon Jul 8, 2022
@jacobwhall cool, I'm experimenting with an emoji autocomplete by leveraging the browser's native datalist functionality. However, I've decided to start my emojis map from scratch based on https://emojipedia.org/ (all tedious manual work since they closed their API). We'll see how it goes.
JoshuaKGoldberg commentedon May 19, 2023
+1, having docs on this would be great. I'm working on omnidan/node-emoji#132 to bring
node-emojitoemojilib@3. The test cases in that draft PR are showing a lot of places where emojilib@3 removed conveniences the library relied on. For example,"heart"shows up in a few emojis, but not ❤️ itself:emojilib/dist/emoji-en-US.json
Lines 986 to 991 in e8e9a84
I wrote a quick script to find discrepencies:
@muan is there a description anywhere of how #178's lists were generated? Or, if not, could you speak to how you generated it?
muan commentedon Sep 22, 2023
I believe I had some hack-together local scripts so I don't recall the exact differences. But here's what might have happened:
Previously this project was exclusively built for github shortcodes at our internal hackathon, and with v3 I decided to move away from that. so the primary key became their official unicode names, which would explains why
tadawas replaced withparty popper,poopwas replaced bypile of poo.IIRC, the official name of the emoji changes with each version sometimes too (gun -> water gun), which was why I made the character be the key now.
I feel like I would/should have done the work to compare and keep the GitHub shortcodes but I guess I did not.
So to add them all back, a name/alias comparison between GitHub's set and the unicode set could potentially do the trick.
JoshuaKGoldberg commentedon Mar 18, 2024
OK! Sorry for taking so long on this - I wanted to really think through the problem space. As in: what's a "keyword"?
Using the 🛫 emoji as an example, I think there are really 2-3 use cases for emoji keywords:
airplane_departure)airplane,departure)airport,taking)Ideally I'd propose emojilib separate at least 🆔 identity from 🔗 relation keywords. Some users will want only identity, e.g.
node-emoji's:shortcode:replacement. Some users will want the relation ones as well, e.g. general text searches.+1 to @muan's suggestion in #194 (comment) of a comparison. I'd say a programmatic approach would be the easiest & least controversy-risking approach for
emojilib. My proposal would be something like:As for setting up that programmatic approach... we can get halfway there. I made a standalone
emojipediapackage to scrape & store the Emojipedia data for each emoji. That data includes 🆔 identity shortcodes across Discord, Emojipedia (based on the Unicode standard), GitHub, and Slack.Looking at the data that's in
emojipediaand/oremojilib@3today on the 🛫 emoji, we can see that there are a lot of 🆔 identity keywords that are only in one of the two datasets but not both:airplane_departureairplanedepartureairportflightlandingaeroplane_taking_offairplane_taking_offflight_departureplane_taking_offaeroplaneoffplanetakingFull comparison on: https://github.com/JoshuaKGoldberg/repros/tree/emojilib-emojipedia-keywords-comparison.
My next task will be trying to similarly source the 🔗 relation keywords programmatically. That way we can make a script that populates
emojilibdata automatically. 🔗 Relation keywords aren't stored on Emojipedia that I can find, so I plan on trying to find exports of individual platforms' emoji libraries such as https://github.com/github/gemoji.JoshuaKGoldberg commentedon Mar 20, 2024
Update: I have a proposal for your review now @muan! 🙌
Preview the full proposal of changes here:
Proposed-all.html.This follows what I proposed in the last comment: that
emojilib's keywords be sourced from all associated words in Emojilib/Unicode and platforms we can scrape from. The ones I could easily access were: "fluemoji" (Fluent UI / Windows), "gemoji" (GitHub), and "twemoji" (Twitter).Using 🛫 as an example, here's what that would look like:
airplane_departureairportflightlandingaeroplaneaeroplane_taking_offairplaneairplane_departureairplane_taking_offcheck-indeparturedeparturesflightflight_departureoffplaneplane_taking_offtakingvehicleaeroplaneaeroplane_taking_offairplaneairplane_taking_offcheck-indeparturedeparturesflight_departureoffplaneplane_taking_offtakingvehicleairportlandingairplane_departureflightFull comparison and proposal tables on: https://github.com/JoshuaKGoldberg/repros/tree/emojilib-platforms-keywords-comparison.
Unless directed otherwise, I'll send a big PR updating the keywords in this repo... soon. Hopefully later this month.
Note that the following emojis have significantly fewer keywords in the proposed changes:
birdcustomsdesertdolphin,flipperelephantgorillamountainoctopus*,sparkleNone of the platforms in
emoji-platform-datahave more than 1-2 keywords for them. Adding in a more rich platform would fill back in those missing keywords. For example, asking the native macOS emoji picker forseaincludes 🐙 in the results. I addedemoji-platform-dataissues labeledplatform support.jacobwhall commentedon Mar 22, 2024
Thank you for your work on this @JoshuaKGoldberg
I suggest that we integrate individual keyword contributions into this new workflow. I think it's worth retaining the keywords from this project for the example emojis you provided. Contributions to this project could continue to add common-sense keywords that may have been overlooked by unicode/emojipedia/etc.
JoshuaKGoldberg commentedon Mar 30, 2024
Makes sense! I sent #226 as a draft for reference that only augments, rather than removes.
yannickgloster commentedon May 13, 2024
Is there any indication when #226 will be moved from draft/will be merged? Interested in seeing a resolution to this upstream lib omnidan/node-emoji#132.
pimjansen commentedon Aug 1, 2024
Any progress on this guys? Like the idea of having a strict workflow in here instead of random keyword proposals