6

Does anyone know of any API's out there that can determine gender based on a few of the following:

  • Name
  • Username
  • Posts/Text/How they Talk
  • Location
  • Profile Description
  • Picture

Or if such an API combining all of those aren't available; would it be a good idea to combine various APIs together and build an application to handle all those features?

I do not want to step in the world of natural language processing, image processing; so that's why I'd rather call a service built by professionals.

  • 2
    Location has no bearing Posts/Text/How they talk does not have a good degree of gender determined features. Name/Username/Profile Description/Picture has no guarantee of any basis in reality - lots of username/name will be totally non-normal names so not really guessable (like dev_akm not much to guess from that), and lots of people will totally bull that (ie my girlfriends brother often goes for profile names that are <swearing><female name>). In summary the degree of accuracy of anything you find is going to be quite limited. You could find some that will work in many case; I don't know any. – Nick Wilde May 9 '14 at 17:06
  • @NickWilde the app will interact with users, so even if it isn't accurate; i can get them to verify which of their followers' genders we guessed wrong. The issue here is to not have them tell us the gender for ALL of their followers. – Ramie May 9 '14 at 17:14
  • Ah yes that makes sense - with a bit of user interaction it could be a good time-saver without the problems of inaccurate pictures/descriptions/names (heck it could guess I'm a doe - female goat - from my profile picture here but that would be quite inaccurate and easy to see to anyone reviewing) – Nick Wilde May 9 '14 at 17:25
  • "Posts/Text/How they Talk": For what language? English? – Nicolas Raoul May 12 '14 at 6:07
  • yup, anyways i ended up using www.datumbox.com/machine-learning-api/ for text analysis – Ramie May 12 '14 at 16:34
4

I would be surprised if you find any API combining those features. As the two most useful features are certainly the picture and the name by far, I would use a Face gender detection API such as Lambda Labs's API (picked randomly, you might want to search for benchmark if there are any), combined with a name to gender mapping. To solve the conflicts , you might want to try to find some API returning an answer (male/female) attach with some interval of confidence. Also I would guess males tend to use female pictures more often females tend to use male pictures, but that's probably depend on your applications so you might want to do some basic stats on that side to.

| improve this answer | |
0

In PHP you could write a simple function like this

Extract:

<?php
/* vorname=firstname
   geschlecht=gender */
function analyse_fullname($fullname=null){
    $n=split_fullname($fullname);
    $r["vorname"]=$n[0];
    $r["nachname"]=$n[1];
    $r["fullname"]=$fullname;
    $r["titel"]="Frau";
    $r["geschlecht"]="M";
    if(in_array(strtolower($r["vorname"]),array('achim',
    'adam',
    'adolf',
    'albert',
    #...
    'wolfgang',
    'wolfram'
    ))) $r["titel"]="Herr";

    if(in_array(strtolower($r["vorname"]),array('adelheid'
    ,'agnes'
    ,'alexandra'
    #...
    ,'wilma'
    ,'yvonne'
    ))) $r["geschlecht"]="W";
    if ($r["geschlecht"]=="M") $r["anrede"]="Sehr geehrter Herr ".$r["fullname"];
    else $r["anrede"]="Sehr geehrte Frau ".$r["fullname"];
    if ($r["geschlecht"]=="M") $r["doktoranrede"]="Sehr geehrter Herr Dr. ".$r["fullname"];
    else $r["doktoranrede"]="Sehr geehrte Frau Dr. ".$r["fullname"];
    return $r;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.