-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detecting gender-neutral emoji #36
Comments
Ah, this seems to be a duplicate of #18. Would be nice if this could be automated somehow and integrated into this library, but I haven't found a clean way to do so so far. The most-effort case would be maintaining a manual list of such "gender-neutral" emoji, that would need to be updated for every new emoji version. Maybe there's no clean way around that. |
Here's some hacky Python code that seems to work okay-ish: gender_neutral = []
for category in categories.values():
for emoji in category:
if ', FEMALE SIGN' in emoji['name']:
gender_neutral.append(emoji['name'].split(', FEMALE SIGN')[0])
for category in categories.values():
for emoji in category:
if emoji['name'] in gender_neutral:
print('NEUTRAL: ', emoji['name']) It results in this list:
This seems to result all emoji that are available in a gender-modifier variant as well. However, there are also some special cases. For example "couple with heart". There are 4 variants:
Since those don't use the gender modifiers, there is no "gender" field in the data. Strictly speaking, those are gender-neutral emoji that are also available as gendered versions. I'm not sure how to proceed. However, this is something that every person implementing an emoji picker will face, and it would be great if we could do the work only once in this library, instead of reinventing the wheel over and over again. |
I don't want to add additional properties to the dataset if they're not required, as it will increase the filesize. I'd much prefer helper functions that operate on the dataset. An easier way would be to reverse the list and search that way. If you find The couple with heart emoji (and some others) are super complicated. They even have special rules in the specification. It would be better to just hardcode them. |
Is the ordering (neutral, male, female) guaranteed? Is there always a neutral emoji after a gendered one? |
Neutral always comes first before the male and female variants, according to the unicode data files. However, I don't believe all names with |
Ok, maybe we should leave this to the developers. Since some fonts may render "person" differently than "man" or "woman", it probably depends on the application whether they should be displayed or not. I ended up using something like that Python script up there (although I also needed to apply the flag to all skintone variants). |
There are a few emoji that are available both with a gender and in a neutral version:
It would be fantastic, if you could mark emoji that have gendered versions available, but are neutral. For skintones, that's possible by checking whether a
skins
field is present (if there is, it's the neutral version), but for genders that's not possible.Regarding notation, I'm unsure what would be best. Maybe
"gender": null
,"gender": -1
or"gender_neutral": true
?The text was updated successfully, but these errors were encountered: