Actually I am developing an application in python 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.
So I was thinking to use their API in my application.
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.
Here what I am trying to using http://www.i-gender.com/ API.
>>> import urllib2 >>> import json >>> req = urllib2.Request("http://www.i-gender.com/ai", "name=jhony") >>> resp = urllib2.urlopen(req).read() >>> decoder = json.JSONDecoder() >>> result = decoder.decode(resp) >>> print result['gender'] male >>> print result['confidence'] 100 >>>
Thanks in Advance,