有人知道一个好的图书馆,以将一个人的名字映射到他或她的性别吗? [英] Does anyone know of a good library for mapping a person's name to his or her gender?

查看:149
本文介绍了有人知道一个好的图书馆,以将一个人的名字映射到他或她的性别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个图书馆或数据库,可以根据他或她的姓名或昵称提供关于某人是男性还是女性的猜测。像

  john => M,
mary => F,
alex => A,#ambiguous



我正在寻找支持英文名称以外的名称日本,印度等)。



在我得到另一个答案之前,你会冒犯人通过假设他们的性别/性别让我清楚,我的应用程序不与任何人互动。它不发送电子邮件或反正与任何人联系。没有用户要问。在许多情况下,有关的人已经死亡,我唯一的信息是姓名,出生日期和死亡日期。我想知道个人的性别的原因是为了使输出的语法更好,并帮助可能的后续搜索。

解决方案

名称的性别是在一般情况下无法通过编程方式推断出来的。您需要一个名称数据库。 以下是美国人口普查局的免费名称数据库


I am looking for a library or database that can provide guesses about whether a person is male or female based on his or her name or nickname. Something like

john => "M",
mary => "F",
alex => "A", #ambiguous

I am looking for something that supports names other than English names (such as Japanese, Indian, etc.).

Before I get another answer along the lines of "you are going to offend people by assuming their sex/gender" let me be clear, my application does not interact with anyone. It does not send emails or contact anyone in anyway. There are no users to ask. In many cases, the person in question is dead, and the only information I have is name, birth date, and date of death. The reason I want to know the sex of the individual is to make the grammar of the output nicer and to aid in possible searches that may come latter.

解决方案

The gender of a name is something that cannot be inferred programmatically in the general case. You need a name database. Here is a free name database from the US Census Bureau.

EDIT: The link for the 2010 name is dead but there are working links and a libraries in the comments.

这篇关于有人知道一个好的图书馆,以将一个人的名字映射到他或她的性别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆