-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Conversation
The first part of a Chinese name is the family name
'钱', '阎', '陆', '陶', '韦', '韩', '顾', '马', '高', '魏', '黄', '黎', | ||
'龚', | ||
protected static $lastName = array( | ||
// These are the top 300 lastnames. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a link to the source of this data in the comment, like in other locales.
I have no way to tell that your lists are better than the current ones. Please provide a reference link for each list to prevent other developers like you from contesting this data in the future. |
The previous logic is wrong, the first part of name is not related to gender at all. My 300 family names comes from this list: The data comes from the 6th national census of population. Here are another top 400 list which is slightly different I believe it's data from different time, you can see the population of each family name: For the given name, I just split your original list by gender and add some more popular ones to make each list has 100 names. I don't want to update random names because there is no perfect list for fake data, but the previous list is wrong, mixing female names and male names together, and split family name by gender which is not right either. |
Please, add these links to the source code. |
Found a more believable link and added it in the comment, there are several versions of the surname list, some are published in books, but sorry I could not find the original data from government websites. But any of them is good enough for faking names. Please help me to fix English grammar errors in the comments, thanks! |
Just took a look at zh_TW names, the logic has no problem, it get right order of firstname and lastname, and also right sorting firstnames by gender, but the list of lastnames is thousands years old, (seriously, around 960 D.C.), a lot of the names in that list is not exist anymore. I don't know if you will be happy with those ancient names? |
'钱', '阎', '陆', '陶', '韦', '韩', '顾', '马', '高', '魏', '黄', '黎', | ||
'龚', | ||
protected static $lastName = array( | ||
// According to http://baike.baidu.com/view/6109935.htm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the phpDoc format (starting with /*
) and move it one line up, before the array initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB, /*
isn't phpdoc, it's a "comment". "phpdoc" is /**
. They actually tokenise to T_COMMENT
and T_DOC_COMMENT
.
I agree, the zh_TW list isn't ideal either. |
Sorry, closed by mistake |
Thanks for your PR! |
The first part of a Chinese name is the family name, shared by males and females.
Update lastnames with top 300 family names with population from 0.2 - 90 million.
Separate firstnames by gender.