#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    1
    Rep Power
    0

    Algorithm to Detect Gender(m/f) from Name


    Hi,

    Actually I am developing an application in which I want a feature by which the application can detect whether any name is male or female name.
    I did Google search on this, but could not find any algorithm/code by which I can do it.

    So finally I found a website which is doing the same thing pretty good.


    www __dot__i-gender__dot_com

    So I was thinking to use their API in my application. But Actually I am looking for an algorithm that can be used to do the same.

    But before that just wanted to how they are detecting the gender from name?? Is it really possible to do it algorithmically??If yes please suggest some docs/links.


    Thanks in Advance,
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,997
    Rep Power
    9397
    It's not. Consider names like "Jamie" or "Alex".

    But you can build up a giant database of names+genders and look up names in there.
  4. #3
  5. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,109
    Rep Power
    1802
    No, of course it is not possible - not from the name alone. The only viable method (and the means by which the website you referenced no doubt does it), is by look-up. You need a large database or list of all boys names and all girls names, and you simply look up the name.

    The only real "algorithm" to be applied is perhaps one for efficient search. The difficult part is perhaps how to obtain a suitable database or name list. Be aware also that some names are applicable to both genders and may even be a girls name in one language or culture, but a boys in another.

    Even then, there is nothing stopping fans of Johnny Cash for example from naming their boy "Sue", so all you can say about any name is that it is "traditionally" or "predominantly" applied to one gender or another.

    Also in modern culture many "invented" given names occur, named for example after Cities (e.g. "Brooklyn") or cars (e.g. Mercedes), and whether such names apply to a boy or a girl is entirely the decision of the parent - there's no algorithm for that! :rolleyes:


    What were you expecting!? Perhaps if you add the ASCII character codes for each letter of the name, odd numbers are girls and even numbers are boys. ;)
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    Nope, all names are odd.
    Code:
       +/a.i.'Carol'
    497
       +/a.i.'John'
    399
       +/a.i.'Andrew'
    609
       +/a.i.'Sam'
    289
       +/a.i.'Samuel'
    615
       +/@(a.&i.)&>@;:'Fred Suzy Samantha Beth Lisa Bradley Nick'
    385 443 813 387 393 707 389
    Lots-o-laughter.

    Comments on this post

    • clifford agrees : Well, I guess that disproved that hypothesis ;-)
    Last edited by b49P23TIvg; April 15th, 2013 at 05:30 PM.
    [code]Code tags[/code] are essential for python code and Makefiles!
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Posts
    149
    Rep Power
    36
    The best I can think of is choosing the gender of the "closest" name you can find in your lookup. Perhaps adding phonetic or audio data for each name and asking for phonetic/audio input could be an approach, and allow you to either find the exact name and its gender (if it isn't gender neutral like a car or a city) or to pick the gender of the nearest match.

    Though there are names of opposite genders which "rhyme":
    Bonnie (F), Donnie (M), Ronnie (M), Connie (F)
    so even that wouldn't really work. All I can really say is good luck. :cheers:

IMN logo majestic logo threadwatch logo seochat tools logo