line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Lingua::NameUtils - Identify given/family names and capitalize correctly |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (C) 2023 raf |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
6
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# 20230630 raf |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Lingua::NameUtils; |
11
|
2
|
|
|
2
|
|
62982
|
use 5.014; |
|
2
|
|
|
|
|
22
|
|
12
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
38
|
|
13
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
14
|
2
|
|
|
2
|
|
9
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '1.000'; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
74
|
use Exporter; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2042
|
|
19
|
|
|
|
|
|
|
our @ISA = ('Exporter'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our @EXPORT = (); |
22
|
|
|
|
|
|
|
our @EXPORT_OK = |
23
|
|
|
|
|
|
|
qw( |
24
|
|
|
|
|
|
|
namecase gnamecase fnamecase namecase_exception |
25
|
|
|
|
|
|
|
namesplit nameparts namesplit_exception |
26
|
|
|
|
|
|
|
nametrim normalize |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
our %EXPORT_TAGS = |
29
|
|
|
|
|
|
|
( |
30
|
|
|
|
|
|
|
all => [@EXPORT_OK], |
31
|
|
|
|
|
|
|
case => [qw(namecase gnamecase fnamecase namecase_exception normalize)], |
32
|
|
|
|
|
|
|
split => [qw(namesplit nameparts namesplit_exception normalize)] |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Like fc() but "folds" apostrophe-like and hyphen-like characters as well |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $myfc = (defined eval { &CORE::fc('') }) ? \&CORE::fc : sub { lc shift }; # Downgrade to lc on perl 5.14 |
38
|
|
|
|
|
|
|
my $apostrophe = qr/['’ʼʻ]/; # Apostrophe, Right single quotation mark, Modifier letter apostrophe, Modifier letter turned comma |
39
|
1
|
|
|
1
|
|
7
|
my $hyphen = qr/\p{dash punctuation}/; # Hyphen-Minus, Hyphen, En Dash, Em Dash, et al. |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
40
|
14624
|
|
|
14624
|
1
|
69292
|
sub kc { return $myfc->(shift) =~ s/$apostrophe/'/gr =~ s/$hyphen/-/gr } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Builtin namecase exceptions (Mostly gathered by Michael R. Davis (MRDVT)) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my %namecase_exceptions = map { kc($_) => $_ } |
45
|
|
|
|
|
|
|
(qw( |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
MacAlister MacAlpin MacAlpine MacArthur MacAuley MacBain MacBean |
48
|
|
|
|
|
|
|
MacCallum MacColl MacDomhnaill MacDonald MacDonell MacDonnell MacDougall |
49
|
|
|
|
|
|
|
MacDowall MacDuff MacEvan MacEwen MacFarlane MacFie MacGill MacGillivray |
50
|
|
|
|
|
|
|
MacGregor MacInnes MacIntosh MacIntyre MacIver MacKay MacKenzie |
51
|
|
|
|
|
|
|
MacKinlay MacKinnon MacKintosh MacLachlan MacLaine MacLaren MacLaurin |
52
|
|
|
|
|
|
|
MacLea MacLean MacLellan MacLennan MacLeod MacMillan MacNab MacNaughton |
53
|
|
|
|
|
|
|
MacNeacail MacNeil MacNeill MacNicol MacO'Shannaig MacPhee MacPherson |
54
|
|
|
|
|
|
|
MacQuarrie MacQueen MacRae MacTavish MacThomas |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
MacAuliffe MacCarty MacClaine MacCauley MacClelland MacCleery MacCloud |
57
|
|
|
|
|
|
|
MacCord MacCleverty MacCredie MacCue MacCurrach MacEachern MacGilvray |
58
|
|
|
|
|
|
|
MacCray MacDuffie MacFadyen MacFarland MacKinley MacKinney MacLaughlin |
59
|
|
|
|
|
|
|
MacIvor MacKechnie MacLucas MacManus MacMartin MacNeary MacNevin |
60
|
|
|
|
|
|
|
MacMahon MacNaught MacNeal MacShane MacWhirter MacAtee MacCarthy |
61
|
|
|
|
|
|
|
MacWilliams MaDej MaGaw |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
AbuArab |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
DaSilva DeAnda DeAngelo DeBardelaben DeBary DeBaugh DeBeck DeBergh |
66
|
|
|
|
|
|
|
DeBerry DeBlanc DeBoe DeBoer DeBonis DeBord DeBose DeBostock DeBourge |
67
|
|
|
|
|
|
|
DeBroux DeBruhl DeBruler DeButts DeCaires DeCamp DeCarolis DeCastro |
68
|
|
|
|
|
|
|
DeCay DeConinck DeCook DeCoppens DeCorte DeCost DeCosta DeCoste DeCoster |
69
|
|
|
|
|
|
|
DeCouto DeFamio DeFazio DeFee DeFluri DeFord DeForest DeFraia DeFrancis |
70
|
|
|
|
|
|
|
DeFrange DeFree DeFrees DeGarmo DeGear DeGeare DeGnath DeGraff |
71
|
|
|
|
|
|
|
DeGraffenreid DeGrange DeGraw DeGrenier DeGroft DeGroot DeGuaincour |
72
|
|
|
|
|
|
|
DeHaan DeHaas DeHart DeHass DeHate DeHaven DeHeer DeHerrera DeJarnette |
73
|
|
|
|
|
|
|
DeJean DeLaet DelAmarre DeLancey DeLara DeLarm DelAshmutt DeLaughter |
74
|
|
|
|
|
|
|
DeLay DeLespine DelGado DelGaudio DeLong DeLony DeLorenzo DeLozier |
75
|
|
|
|
|
|
|
DelPrincipe DelRosso DeLuca DeLude DeLuke DeMaio DeMarchi DeMarco |
76
|
|
|
|
|
|
|
DeMarcus DeMarmein DeMars DeMartinis DeMay DeMello DeMonge DeMont |
77
|
|
|
|
|
|
|
DeMontigny DeMoss DeNunzio DeNure DePalma DePaola DePasquale DePauli |
78
|
|
|
|
|
|
|
DePerno DePhillips DePoty DePriest DeRatt DeRemer DeRosa DeRosier |
79
|
|
|
|
|
|
|
DeRossett DeSaegher DeSalme DeShane DeShano DeSilva DeSimencourt |
80
|
|
|
|
|
|
|
DeSimone DesJardins DeSoto DeSpain DesPlanques DeSplinter DeStefano |
81
|
|
|
|
|
|
|
DesVoigne DeTurck DeVall DeVane DeVaughan DeVaughn DeVaul DeVault |
82
|
|
|
|
|
|
|
DeVenney DeVilbiss DeVille DeVillier DeVinney DeVito DeVore DeVorss |
83
|
|
|
|
|
|
|
DeVoto DeVries DeWald DeWall DeWalt DeWilfond DeWinne DeWitt DeWolf |
84
|
|
|
|
|
|
|
DeYarmett DeYoung DiBenedetto DiBona DiCaprio DiCicco DiClaudio |
85
|
|
|
|
|
|
|
DiClemento DiFrisco DiGiacomo DiGiglio DiGraziano DiGregorio DiLiberto |
86
|
|
|
|
|
|
|
DiMarco DiMarzo DiPaolo DiPietrantonio DiStefano DoBoto DonSang DuBois |
87
|
|
|
|
|
|
|
DuBose DuBourg DuCoin DuPre DuPuy DeVaux DeVoir |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
EnEarl |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Fitzell |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
LaBarge LaBarr LaBelle LaBonte LaBounty LaBrue LaCaille LaCasse |
94
|
|
|
|
|
|
|
LaChapelle LaClair LaCombe LaCount LaCour LaCourse LaCroix LaFarge |
95
|
|
|
|
|
|
|
LaFeuillande LaFlamme LaFollette LaFontaine LaForge LaForme LaForte |
96
|
|
|
|
|
|
|
LaFosse LaFountain LaFoy LaFrance LaFuze LaGaisse LaGreca LaGuardia |
97
|
|
|
|
|
|
|
LaHaise LaLande LaLanne LaLiberte LaLonde LaLone LaMaitre LaMatry LaMay |
98
|
|
|
|
|
|
|
LaMere LaMont LaMotte LaMunyon LaPierre LaPlante LaPointe LaPorte |
99
|
|
|
|
|
|
|
LaPrade LaPrairie LaQue LaRoche LaRochelle LaRose LaRue LaSalle LaSance |
100
|
|
|
|
|
|
|
LaSart LaTray LaVallee LaVeau LaVenia LaVigna LeBerth LeBlond LeBoeuf |
101
|
|
|
|
|
|
|
LeBreton LeCaire LeCapitain LeCesne LeClair LeClaire LeClerc LeCompte |
102
|
|
|
|
|
|
|
LeConte LeCour LeCrone LeDow LeDuc LeFevre LeFlore LeFors LeFridge |
103
|
|
|
|
|
|
|
LeGrand LeGras LeGrove LeJeune LeMaster LeMesurier LeMieux LeMoine |
104
|
|
|
|
|
|
|
LePage LeQuire LeRoy LeStage LeSuer LeVally LeVert LiConti LoManto |
105
|
|
|
|
|
|
|
LoMastro LoRusso |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
SanFillipo SanGalli SantaLucia |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
TePas |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
VanArsdale VanBuren VanCamp VanCleave VanDalsem VanderLey VanderNeut |
112
|
|
|
|
|
|
|
VanderTol VanderWegen VanDerWeyer VanderWilligen VanDevelde VandeWege |
113
|
|
|
|
|
|
|
VanDolah VanDusen VanDyke VanHee VanHoak VanHook VanHoose VanHouten |
114
|
|
|
|
|
|
|
VanHouwe VanHoven VanKampen VanKleck VanKleeck VanKuiken VanLanduyt |
115
|
|
|
|
|
|
|
VanLeer VanLiere VanLuven VanMeter VanOlinda VanOrmer VanPelt VanSchaick |
116
|
|
|
|
|
|
|
VanSciver VanScoy VanScoyk VanSickle VanTassel VanTuyl VanValkenburg |
117
|
|
|
|
|
|
|
VanVolkenburgh VanWinkle VanWysenberghe VanZandt VenDerWeyer VonCannon |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
)); |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# Capitalization exceptions for full names used by namecase(). |
122
|
|
|
|
|
|
|
# Include both forms: "given_names family_name" and "family_name, given_names". |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
my %namecase_exceptions_full; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# Capitalization exceptions for full names used by fnamecase(). |
127
|
|
|
|
|
|
|
# This must have the same keys as namecase_exceptions_full. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
my %fnamecase_exceptions_full; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# Family names that appear first (Chinese, Korean, Vietnamese). |
132
|
|
|
|
|
|
|
# When romanized, these family names can appear first or last. |
133
|
|
|
|
|
|
|
# This is only possible when there are only hundreds of names. |
134
|
|
|
|
|
|
|
# For Japanese, a statistical method is used. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
my %family_names_ck; |
137
|
|
|
|
|
|
|
my $family_names_ck_re; |
138
|
|
|
|
|
|
|
my %family_names_ck_roman; |
139
|
|
|
|
|
|
|
my $family_names_ck_roman_re; |
140
|
|
|
|
|
|
|
my %family_names_v_roman; |
141
|
|
|
|
|
|
|
my $family_names_v_roman_re; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
my @family_names_chinese = |
144
|
|
|
|
|
|
|
(qw( |
145
|
|
|
|
|
|
|
王 李 張 张 劉 刘 陳 陈 楊 杨 黃 黄 趙 赵 吳 吴 周 徐 孫 孙 馬 马 朱 胡 郭 何 林 高 |
146
|
|
|
|
|
|
|
羅 罗 鄭 郑 梁 謝 谢 宋 唐 許 许 鄧 邓 韓 韩 馮 冯 曹 彭 曾 蕭 萧 田 董 潘 袁 蔡 蔣 蒋 |
147
|
|
|
|
|
|
|
余 于 杜 葉 程 魏 蘇 呂 丁 任 盧 卢 苏 吕 姚 沈 鍾 钟 姜 崔 譚 谭 陸 陆 范 汪 廖 石 |
148
|
|
|
|
|
|
|
金 韋 韦 賈 贾 夏 傅 方 鄒 邹 熊 白 孟 秦 邱 侯 江 尹 薛 閻 阎 段 雷 龍 龙 黎 史 陶 |
149
|
|
|
|
|
|
|
賀 贺 毛 郝 顧 顾 龔 龚 邵 萬 万 覃 武 錢 钱 戴 嚴 严 歐 欧 莫 孔 向 常 湯 汤 康 易 |
150
|
|
|
|
|
|
|
喬 乔 賴 赖 文 施 洪 辛 柯 莊 庄 |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
温 牛 樊 葛 邢 安 齐 伍 庞 颜 倪 聂 章 鲁 岳 翟 殷 詹 申 耿 关 兰 焦 俞 左 柳 甘 祝 包 宁 尚 符 |
153
|
|
|
|
|
|
|
舒 阮 纪 梅 童 凌 毕 单 季 裴 霍 涂 成 苗 谷 盛 曲 翁 冉 骆 蓝 路 游 靳 欧阳 管 柴 蒙 鲍 华 喻 |
154
|
|
|
|
|
|
|
祁 蒲 房 滕 屈 饶 解 牟 艾 尤 阳 时 穆 农 司 卓 古 吉 缪 简 车 项 连 芦 麦 褚 娄 窦 戚 岑 景 党 |
155
|
|
|
|
|
|
|
宫 费 卜 冷 晏 席 卫 米 柏 宗 瞿 桂 全 佟 应 臧 闵 苟 邬 边 卞 姬 师 和 仇 栾 隋 商 刁 沙 荣 巫 |
156
|
|
|
|
|
|
|
寇 桑 郎 甄 丛 仲 虞 敖 巩 明 佘 池 查 麻 苑 迟 邝 官 封 谈 匡 鞠 惠 荆 乐 冀 郁 胥 南 班 储 原 |
157
|
|
|
|
|
|
|
栗 燕 楚 鄢 劳 谌 奚 皮 粟 冼 蔺 楼 盘 满 闻 位 厉 伊 仝 区 郜 海 阚 花 权 强 帅 屠 豆 朴 盖 练 |
158
|
|
|
|
|
|
|
廉 禹 井 祖 漆 巴 丰 支 卿 国 狄 平 计 索 宣 晋 相 初 门 雲 容 敬 来 扈 晁 芮 都 普 阙 浦 戈 伏 |
159
|
|
|
|
|
|
|
鹿 薄 邸 雍 辜 羊 阿 乌 母 裘 亓 修 邰 赫 杭 况 那 宿 鲜 印 逯 隆 茹 诸 战 慕 危 玉 银 亢 嵇 公 |
160
|
|
|
|
|
|
|
哈 湛 宾 戎 勾 茅 利 於 呼 居 揭 干 但 尉 冶 斯 元 束 檀 衣 信 展 阴 昝 智 幸 奉 植 衡 富 尧 闭 由 |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
習 习 隰 郤 郗 |
163
|
|
|
|
|
|
|
)); |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
my @family_names_chinese_roman = |
166
|
|
|
|
|
|
|
(qw( |
167
|
|
|
|
|
|
|
Wáng Wang Wong Vang Ông Bong Heng Vòng Uōng Waon Whang Vương Ong Ō |
168
|
|
|
|
|
|
|
Lǐ Li Lei Lee Ly Lí Lî Lý Ri Yi Rhee Dy Dee Sy |
169
|
|
|
|
|
|
|
Zhāng Chang Zoeng Cheung Cheong Chong Tiuⁿ Tioⁿ Teo Teoh Tio Chông Tong Thong Tsan Tzan Zan Trương Jang Chō Tiu Tiong Sutiono Tjong |
170
|
|
|
|
|
|
|
Liú Liu Lau Lao Lou Lưu Lâu Low Liù Liew Lew Lieu Lio Yu Yoo Ryū |
171
|
|
|
|
|
|
|
Chén Ch'en Can Chan Chun Chean Chin Tân Tan Tang Ting Chhìn Thín Thin Zen Tchen Trần Jin Tantoco Tanteksi |
172
|
|
|
|
|
|
|
Yáng Yang Joeng Yeung Yeong Ieong Young Iûⁿ Iôⁿ Yeoh Yeo Yo Nyo Yòng Yong Iōng Yan Ian Dương Yu Yung Yana Yongco Yuchengco Yō |
173
|
|
|
|
|
|
|
Huáng Huang Wong Wang Vong N̂g Ûiⁿ Ng Ung Ooi Uy Wee Vòng Bong Uōng Fong Waon Whang Hoàng Huỳnh Hwang Kō |
174
|
|
|
|
|
|
|
Zhào Chao Ziu Chiu Chu Chio Jiu Tiō Tiǒ Teo Teoh Chhau Chau Thèu Cheu Chew Zau Zo Triệu Jo Tio Chō |
175
|
|
|
|
|
|
|
Wú Wu Ng Ung Eng Gô͘ Ngô͘ Goh Ǹg Woo Ngô Oh Go Kure Ngo Gozon Gozum Cinco Gochian Gokongwei Gosiengfiao |
176
|
|
|
|
|
|
|
Zhōu Chou Zau Chow Chau Jao Chao Chiu Chew Jew Chiû Chiew Tiu Cheu Tseu Tzo Chu Châu Ju Shū Joe |
177
|
|
|
|
|
|
|
Xú Hsü Ceoi Tsui Choi Chui Tsua Chhî Sîr Chee Cher Cheu Swee Ji Jee Chhì Chi Chhié Zhi Zee Zi Từ Seo Sho Dharmadjie Christiadjie |
178
|
|
|
|
|
|
|
Sūn Sun Syun Suen Sng Suiⁿ Soon Sûn Sen Tôn Son Suan |
179
|
|
|
|
|
|
|
Mǎ Ma Maa Mah Mar Má Bé Bey Beh Baey Mâ Mo Mu Mã Mapua Ba |
180
|
|
|
|
|
|
|
Zhū Chu Zyu Chue Choo Chû Tu Tsy Tsyu Tzu Châu Ju Shu Gee |
181
|
|
|
|
|
|
|
Hú Hu Wu Woo Vu Ô͘ Oh Ow Aw Fù Foo Ū Hồ Ho Ko |
182
|
|
|
|
|
|
|
Guō Kuo Gwok Kwok Kuok Koeh Keh Kerh Kueh Koay Quay Kwek Quek Kwik Kok Koh Goh Koq Quách Gwak Kaku Que Cue Quezon Quison Ker Kho Kue |
183
|
|
|
|
|
|
|
Hé Hê Ho Hoe Hô Hor Hou Hò Hó Wu Woo Hà Ha Ka |
184
|
|
|
|
|
|
|
Lín Lin Lam Lum Lîm Lim Lìm Līm Ling Lâm Im Rim Rin Hayashi |
185
|
|
|
|
|
|
|
Gāo Kao Gou Ko Kou Go Ko͘ Kor Kô Kau Koo Gau Cao Kō Caw Co Gao |
186
|
|
|
|
|
|
|
Luó Lo Law Loh Lowe Lor Lô Lò Lō Lu Loo La Na Ra |
187
|
|
|
|
|
|
|
Zhèng Cheng Zeng Cheang Chiang Tēⁿ Tīⁿ Tìⁿ Tēeⁿ Tay Teh Chhang Chang Thàng Zen Zung Trịnh Jeong Tei Ty Tee |
188
|
|
|
|
|
|
|
Liáng Liang Loeng Leung Leong Lang Leng Niû Niô͘ Neo Liòng Liōng Lian Lương Yang Ryang Liong Niu Ryō |
189
|
|
|
|
|
|
|
Xiè Hsieh Ze Tse Che Chiā Siā Sià Chia Cheah Seah Tshia Chhià Zhia Zia Tạ Sa Sha Tsia Sia Saa Sese Shie |
190
|
|
|
|
|
|
|
Sòng Sung Sàng Song Soong Sūng Son Tống Sō Songco |
191
|
|
|
|
|
|
|
Táng T'ang Tong Tn̂g Tông Tng Tang Thòng Thong Thóng Daon Daan Đường Dang Teng Tō |
192
|
|
|
|
|
|
|
Xǔ Hsü Heoi Hui Hoi Khó͘ Koh Khoh Ko Hí Hee Hé Siu Syu Shiu Hái Hứa Heo Kyo Kho Co Kaw Cojuangco |
193
|
|
|
|
|
|
|
Dèng Teng Dang Tang Theng Tēng Tèng Then Ten Thèn Den Đặng Deung Tō Deang Tengco Tangco |
194
|
|
|
|
|
|
|
Hán Han Hon Hân Hang Hòn Hón Ghoe Reu Hàn Kan |
195
|
|
|
|
|
|
|
Féng Feng Fung Fong Pâng Pang Fùng Phùng Foong Fūng Von Vong Pung Hō Pangco |
196
|
|
|
|
|
|
|
Cáo Ts'ao Cou Cho Tso Chaw Chô Chô͘ Chow Tshò Tshàu Chhóu Zau Zo Tào Jo Sō |
197
|
|
|
|
|
|
|
Péng P'eng Pang Banh Phêⁿ Phîⁿ Phêeⁿ Peh Phe Phàng Phang Pháng Ban Bành Paeng Hō Beng Pangco Pay |
198
|
|
|
|
|
|
|
Zēng Tseng Zang Tsang Chang Dong Chan Tsên Chen Tsen Tzen Tsung Tăng Jeung Sō Tjan Tzeng |
199
|
|
|
|
|
|
|
Xiāo Hsiao Siu Shiu Sio Siau Seow Siow Siâu Siew Siaw Sieu Shio Tiêu So Siao Syaw Shau Shao Shaw Shō |
200
|
|
|
|
|
|
|
Tián T'ien Tin Chan Tiân Chang Thièn Thien Then Thién Di Dee Điền Jeon Tian Tien Ten |
201
|
|
|
|
|
|
|
Dǒng Tung Dung Tong Táng Tóng Túng Tûng Ton Toong Đổng Dong Tō |
202
|
|
|
|
|
|
|
Pān P'an Pun Poon Phoaⁿ Phua Phân Pan Phan Phon Phoe Poe Ban Han Pua |
203
|
|
|
|
|
|
|
Yuán Yüan Jyun Yuen Wan Oân Wang Yèn Yen Iōn Yoe Yoo Yeu Viên Won En Yan |
204
|
|
|
|
|
|
|
Cài Ts'ai Coi Choi Choy Tsoi Toy Chhoà Chua Chhai Chai Chhói Tsa Thái Sái Chae Sai Chuah Cua Choa Tsai Tsay |
205
|
|
|
|
|
|
|
Jiǎng Chiang Zoeng Tseung Cheung Chiúⁿ Chióⁿ Cheoh Chioh Tsiòng Cheong Chiông Cian Jian Tưởng Jang Shō Chio Chiu Chung |
206
|
|
|
|
|
|
|
Yú Yü Jyu Yu Yue U Yee Î Û Îr Ee Eu Yì Uī Dư Yeo Yo Ie Iman Oe |
207
|
|
|
|
|
|
|
Sū Su Sou So So͘ Soh Sû Soo Tô Solon |
208
|
|
|
|
|
|
|
Lǚ Lü Leoi Lui Loi Lū Lī Lǐr Lee Leu Ler Loo Lî Liê Li Lữ Lã Yeo Ryeo Ryo Lu Luy |
209
|
|
|
|
|
|
|
Dīng Ting Ding Teng Tén Ten Tiang Tin Đinh Jeong Tei |
210
|
|
|
|
|
|
|
Rén Jen Jam Yam Iam Yum Jîm Lîm Līm Jim Ngim Yim Nìm Nin Nying Nhiệm Nhậm Im Jin |
211
|
|
|
|
|
|
|
Lú Lu Lou Lo Lô͘ Loh Lù Loo Lū Lư Lô No Ro |
212
|
|
|
|
|
|
|
Yáo Yao Jiu Yiu Yeow Io Iu Iâu Yeo Yào Yow Iēu Yau Diêu Yo Yō |
213
|
|
|
|
|
|
|
Shěn Shen Sam Shum Sum Sham Sím Sim Shím Sen Sung Thẩm Trầm Shim Shin |
214
|
|
|
|
|
|
|
Zhōng Chung Zung Chong Chiong Cheng Chûng Tsung Tung Tson Tzon Jong Shō |
215
|
|
|
|
|
|
|
Jiāng Chiang Goeng Keung Geung Keong Khiang Khiong Khiuⁿ Kiang Kiông Kiong Cian Jian Khương Kang Kyō |
216
|
|
|
|
|
|
|
Cuī Ts'ui Ceoi Chui Choi Chhui Chwee Tshûi Chooi Chhoi Tsoe Tseu Thôi Sai Tseui |
217
|
|
|
|
|
|
|
Tán T'an Taam Tam Tom Ham Hom Thâm Tham Thàm Thóm De Dae Đàm Dam Tan |
218
|
|
|
|
|
|
|
Lù Lu Luk Lok Lio̍k Loke Lek Liu̍k Liuk Loh Loq Lục Yuk Ryuk Riku Diokno |
219
|
|
|
|
|
|
|
Fàn Fan Faan Hoān Hoǎn Hwan Huang Hoan Fam Ve Vae Phạm Beom Han Juan |
220
|
|
|
|
|
|
|
Wāng Wang Wong Ong Óng Vong Uong Waon Whang Uông Ō Ang |
221
|
|
|
|
|
|
|
Liào Liao Liu Lew Leow Liew Lio Liāu Liàu Liau Liow Lièu Liêu Liệu Ryo Ryō |
222
|
|
|
|
|
|
|
Shí Shih Sek Shek Seac Seak Chio̍h Chioh Cheoh Sha̍k Sak Shak Zah Zaq Thạch Seok Seki |
223
|
|
|
|
|
|
|
Jīn Chin Gam Kam Gum Kim Kîm Cin Jin Kin |
224
|
|
|
|
|
|
|
Wéi Wei Wai Vai Ûi Úi Wee Vúi Vì Wooi Uī We Vi Wi I Uy |
225
|
|
|
|
|
|
|
Jiǎ Chia Gaa Ka Ga Ká Kée Kia Kâ Cia Jia Giả Go |
226
|
|
|
|
|
|
|
Xià Hsia Haa Ha Hē Hā Hà Hēe Hah Hay Gho Ya Wo Hạ Ka |
227
|
|
|
|
|
|
|
Fù Fu Foo Pò͘ Poh Phó Bu Po |
228
|
|
|
|
|
|
|
Fāng Fang Fong Hong Png Puiⁿ Pung Fông Faon Faan Phương Bang Hō |
229
|
|
|
|
|
|
|
Zōu Tsou Zau Chau Chow Jao Cho͘ Cho Che Chou Choh Tsêu Chew Chiew Chiu Tseu Tzeu Châu Chu Shū |
230
|
|
|
|
|
|
|
Xióng Hsiung Hung Hong Hîm Him Yùng Yoong Hiūng Yon Hùng Ung Yū |
231
|
|
|
|
|
|
|
Bái Pai Baak Pak Bahk Pe̍h Pe̍k Peh Pha̍k Phak Bah Baq Bạch Baek Haku Bo |
232
|
|
|
|
|
|
|
Mèng Meng Maang Mang Bēng Bèng Men Màng Man Mạnh Maeng Mō |
233
|
|
|
|
|
|
|
Qín Ch'in Ceon Chun Tseun Tseon Chon Chîn Ching Tshìn Chin Chhín Zhin Zin Tần Jin Shin |
234
|
|
|
|
|
|
|
Qiū Ch'iu Jau Yau Iao Iau Khu Khoo Kho Khiû Hiû Hew Khew Khiu Chieu Khâu Gu Kyū Hiew Chiew Coo Chiou |
235
|
|
|
|
|
|
|
Hóu Hou Hau Hao Hô͘ Hâu Kâu Hoh Hèu Hew Héu Gheu Roe Hầu Hu Kō Caw Ho |
236
|
|
|
|
|
|
|
Jiāng Chiang Gong Kong Kang Kông Kaon Giang Gang Kō Kiang |
237
|
|
|
|
|
|
|
Yǐn Yin Wan Ún Ín Un Eun Eung Yún Yoon Doãn Yun In Unson |
238
|
|
|
|
|
|
|
Xuē Hsüeh Sit Sih Siet Set Siot Shih Siq Tiết Seol Setsu |
239
|
|
|
|
|
|
|
Yán Yen Jim Yim Im Giâm Ngiam Ngiàm Yam Iēm Ni Gni Nyi Diêm Yeom En |
240
|
|
|
|
|
|
|
Duàn Tuan Dyun Tuen Tun Toān Toàn Tng Teung Thon Ton Thòn Doe Deu Đoàn Dan |
241
|
|
|
|
|
|
|
Léi Lei Leoi Lui Loi Lûi Lùi Looi Lōi Le Lae Lôi Roe Noe Rai Luy Hoisan |
242
|
|
|
|
|
|
|
Lóng Lung Loong Long Lêng Liông Leng Liong Liùng Liūng Lon Yong Ryong Ryō Leong Wee |
243
|
|
|
|
|
|
|
Lí Li Lai Lê Loy Loi Lì Lài Lee Lī Yeo Ryeo Rei |
244
|
|
|
|
|
|
|
Shǐ Shih Si Sze Sú Sái Sír Ser Seu Sṳ́ Soo Sî Sy Sử Sa Shi |
245
|
|
|
|
|
|
|
Táo T'ao Tou To Tao Tow Tô Tô͘ Thô Thàu Thò Thóu Dau Do Đào Tō |
246
|
|
|
|
|
|
|
Hè Hê Ho Hō Hò Hor Fo Wu Woo Hạ Ha Ka |
247
|
|
|
|
|
|
|
Máo Mao Mou Mo Mô͘ Mor Mô Mâu Mōu Mau Bō |
248
|
|
|
|
|
|
|
Hǎo Hao Kok Hok Hak Khok Heh Heq Hác Kaku |
249
|
|
|
|
|
|
|
Gù Ku Gu Goo Khoo Kò͘ Koh Koo Kū Cố Go Ko Coo |
250
|
|
|
|
|
|
|
Gōng Kung Gung Kwong Kéng Kiong Kiûng Kong Kiung Cion Jiong Jun Cung Gong Kyō |
251
|
|
|
|
|
|
|
Shào Shao Siu Shiu Shaw Sio Siō Siāu Siàu Seow Sioh Shau Sau Sèu Zau Zo Thiệu So Shō Siao Syaw |
252
|
|
|
|
|
|
|
Wàn Wan Maan Man Meng Bān Bàn Buang Van Màn Vae Mae Ve Me Vạn Ban |
253
|
|
|
|
|
|
|
Tán Qín T'an Taam Tam Thâm Thàm Thóm Dae De Dam Tan |
254
|
|
|
|
|
|
|
Wǔ Wu Mou Mo Bú Boo Vú Moo Woo Mú Ghu Vũ Võ Mu Bu |
255
|
|
|
|
|
|
|
Qián Ch'ien Cin Chin Chee Chîⁿ Tshièn Chen Chhién Zhi Zee Tiền Jeon Sen Chi |
256
|
|
|
|
|
|
|
Dài Tai Daai Tè Tèr Thài Ta Da Đái Đới Dae Te |
257
|
|
|
|
|
|
|
Yán Yen Jim Yim Im Giâm Ngiam Ngiàm Yam Ngiēm Ni Gni Nyi Nghiêm Eom Gen Gan |
258
|
|
|
|
|
|
|
Ōu Ou Au Eu Ō |
259
|
|
|
|
|
|
|
Mò Mo Mok Bo̍h Bo̍k Mo̍k Moh Moq Mạc Baku |
260
|
|
|
|
|
|
|
Kǒng K'ung Hung Khóng Kong Khong Khúng Koong Khoong Khon Kung Khổng Kyō Consunji |
261
|
|
|
|
|
|
|
Xiàng Hsiang Hoeng Heung Hiòng Hiàng Hiang Hióng Shian Hian Hưởng Hyang 향 Kyō |
262
|
|
|
|
|
|
|
Cháng Ch'ang Soeng Sheung Siông Siâng Sioh Seoh Sòng Song Sōng Zan Thường Sang Shō Thōng |
263
|
|
|
|
|
|
|
Tāng T'ang Tong Thng Tng Teung Thông Thong Thaon Thaan Thang Tō Tang |
264
|
|
|
|
|
|
|
Kāng Kang Hong Khng Khang Không Khong Kong Khaon Khaan Gang Kō |
265
|
|
|
|
|
|
|
Yì Yi Yik E̍k Ia̍k Ek Yit Iak I Yih Yiq Dịch Yee Eki |
266
|
|
|
|
|
|
|
Qiáo Ch'iao Kiu Kiâu Keow Kiao Khiàu Kiew Khiew Khiéu Jiau Djio Jioh Kiều Kyo Kyō |
267
|
|
|
|
|
|
|
Kē kʻo O Ngo Koa Kho Ko Ker Quah Kwa Khô Ko´ Khu Koo Kha Ga Ka Cua Kua Co Coson |
268
|
|
|
|
|
|
|
Lài Lai Laai Lay Lōa Lòa Nai La Le Lae Lại Roe 뢰 Noe Rai |
269
|
|
|
|
|
|
|
Wén Wen Man Bûn Boon Vùn Voon Mūn Ven Vung Văn Moon Bun |
270
|
|
|
|
|
|
|
Shī Shih Si Xi Soa Sy Sua Sṳ̂ Sii´ Thí Shi I See Sze |
271
|
|
|
|
|
|
|
Hóng Hung Huhng Âng Hông Ang Hong Fùng Fung Ghon Won Ung Hồng Hòng Kō |
272
|
|
|
|
|
|
|
Xīn Hsin San Sen Sîn Sin Xin´ Sîng Shin Tân Sing Singson |
273
|
|
|
|
|
|
|
Zhuāng Chuang Zong Tsong Chong Jong Chng Cheng Chông Zong´ Tsaon Tsaan Tzaon Trang Đồ Dưa Chan Chang Jang Shō Sō Ching Chung |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
An Ang Ao Au Au_Yeung Ba Bai Ban Bao Bau Bi Bo Bu Cai Cao Cha Chai Cham Chan Chang Chao Chau Che |
276
|
|
|
|
|
|
|
Cheah Chee Chen Cheng Cheong Chern Cheung Chew Chi Chia Chiang Chiao Chien Chim Chin Ching Chiong |
277
|
|
|
|
|
|
|
Chiou Chiu Cho Choi Chong Choo Chou Chow Choy Chu Chua Chuang Chui Chun Chung Cong Cui Dai Dang |
278
|
|
|
|
|
|
|
Dea Deng Ding Do Dong Doo Du Duan Dung Eng Fan Fang Fei Feng Fok Fong Foo Fu Fung Gan Gang Gao |
279
|
|
|
|
|
|
|
Gau Ge Geng Go Goh Gong Gu Guan Guo Ha Hai Han Hang Hao Hau He Ho Hoh Hom Hon Hong Hoo Hou Hsi |
280
|
|
|
|
|
|
|
Hsia Hsiao Hsieh Hsiung Hsu Hsueh Hu Hua Huang Hui Huie Hum Hung Huo Hwang Hy Ing Ip Jan Jang |
281
|
|
|
|
|
|
|
Jen Jeng Jeung Jew Jia Jian Jiang Jiao Jim Jin Jing Jo Joe Jong Joo Jou Jow Ju Jue Jung Kam Kan |
282
|
|
|
|
|
|
|
Kang Kao Kau Ke Keng Kho Khoo Kiang King Ko Koh Kong Koo Kook Kou Ku Kuan Kuang Kuk Kung Kuo Kwan |
283
|
|
|
|
|
|
|
Kwock Kwok Kwon Kwong Lai Lam Lan Lang Lao Lau Lee Lei Leng Leong Leung Lew Li Lian Liang Liao Liaw |
284
|
|
|
|
|
|
|
Lien Liew Lim Lin Ling Liou Liu Lo Loh Lok Long Loo Lu Lua Lui Luk Lum Lung Luo Ma Mah Mai Mak Man |
285
|
|
|
|
|
|
|
Mao Mar Mau Mei Meng Miao Min Ming Miu Mo Mok Mon Mou Moy Mu Mui Na Ng Ngai Ngan Ngo Ni Nie Ning Niu |
286
|
|
|
|
|
|
|
On Ong Ou Ou_Yang Ow Owyang Pan Pang Pao Pau Pei Peng Pi Ping Po Pon Pong Poon Pu Pun Qi Qian Qiao |
287
|
|
|
|
|
|
|
Qin Qiu Qu Quan Que Rao Ren Rong Ruan San Sang Seto Sha Sham Shan Shang Shao Shaw Shek Shen Sheng |
288
|
|
|
|
|
|
|
Sheu Shi Shiau Shieh Shih Shing Shiu Shu Shum Shy Shyu Si Sieh Sin Sing Sit Situ Siu So Soh Song |
289
|
|
|
|
|
|
|
Soo Soo_Hoo Soon Soong Su Suen Sui Sum Sun Sung Sze Szeto Tai Tam Tan Tang Tao Tay Te Teh Teng Teo |
290
|
|
|
|
|
|
|
Tian Tien Tin Ting Tiu To Toh Tong Tsai Tsang Tsao Tsay Tse Tseng Tso Tsoi Tsou Tsu Tsui Tu Tuan |
291
|
|
|
|
|
|
|
Tung Tzeng U Un Ung Wah Wai Wan Wang Wee Wei Wen Weng Wing Wong Woo Woon Wu Xi Xia Xiang Xiao Xie |
292
|
|
|
|
|
|
|
Xin Xing Xiong Xu Xue Yam Yan Yang Yao Yap Yau Yaw Ye Yee Yeh Yen Yep Yeung Yi Yim Yin Ying Yip Yiu |
293
|
|
|
|
|
|
|
Yong Yoon You Young Yu Yuan Yue Yuen Yun Yung Zang Zeng Zha Zhan Zhang Zhao Zhen Zheng Zhong Zhou Zhu |
294
|
|
|
|
|
|
|
Zhuang Zhuo Zong Zou |
295
|
|
|
|
|
|
|
)); |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
my @family_names_korean = |
298
|
|
|
|
|
|
|
(qw( |
299
|
|
|
|
|
|
|
가 價 賈 |
300
|
|
|
|
|
|
|
간 簡 間 |
301
|
|
|
|
|
|
|
갈 葛 |
302
|
|
|
|
|
|
|
감 甘 |
303
|
|
|
|
|
|
|
강 姜 康 強 剛 江 㝩 |
304
|
|
|
|
|
|
|
견 堅 甄 |
305
|
|
|
|
|
|
|
경 京 慶 景 耿 |
306
|
|
|
|
|
|
|
계 季 桂 |
307
|
|
|
|
|
|
|
고 顧 高 |
308
|
|
|
|
|
|
|
곡 曲 谷 |
309
|
|
|
|
|
|
|
공 公 孔 |
310
|
|
|
|
|
|
|
곽 廓 槨 郭 |
311
|
|
|
|
|
|
|
관 管 關 |
312
|
|
|
|
|
|
|
교 喬 橋 |
313
|
|
|
|
|
|
|
구 丘 仇 具 邱 |
314
|
|
|
|
|
|
|
국 國 菊 鞠 鞫 麴 |
315
|
|
|
|
|
|
|
궁 宮 弓 |
316
|
|
|
|
|
|
|
궉 鴌 |
317
|
|
|
|
|
|
|
권 權 勸 㩲 券 |
318
|
|
|
|
|
|
|
근 斤 |
319
|
|
|
|
|
|
|
금 琴 禁 芩 金 |
320
|
|
|
|
|
|
|
기 奇 寄 箕 紀 |
321
|
|
|
|
|
|
|
길 吉 |
322
|
|
|
|
|
|
|
김 金 |
323
|
|
|
|
|
|
|
나 라 羅 蘿 邏 那 |
324
|
|
|
|
|
|
|
난 란 欒 |
325
|
|
|
|
|
|
|
남 南 男 |
326
|
|
|
|
|
|
|
남궁 南宫 南宮 |
327
|
|
|
|
|
|
|
낭 랑 浪 |
328
|
|
|
|
|
|
|
내 乃 奈 |
329
|
|
|
|
|
|
|
노 로 努 卢 盧 蘆 虜 路 魯 |
330
|
|
|
|
|
|
|
뇌 뢰 雷 |
331
|
|
|
|
|
|
|
다 多 |
332
|
|
|
|
|
|
|
단 單 段 端 |
333
|
|
|
|
|
|
|
담 譚 |
334
|
|
|
|
|
|
|
당 唐 |
335
|
|
|
|
|
|
|
대 代 大 戴 |
336
|
|
|
|
|
|
|
도 到 度 桃 覩 道 都 陶 |
337
|
|
|
|
|
|
|
독고 獨孤 |
338
|
|
|
|
|
|
|
돈 頓 |
339
|
|
|
|
|
|
|
동 東 童 董 蕫 薫 |
340
|
|
|
|
|
|
|
동방 東方 |
341
|
|
|
|
|
|
|
두 杜 |
342
|
|
|
|
|
|
|
등 滕 鄧 |
343
|
|
|
|
|
|
|
등정 藤井 |
344
|
|
|
|
|
|
|
라 羅 蘿 邏 |
345
|
|
|
|
|
|
|
란 欒 |
346
|
|
|
|
|
|
|
랑 浪 |
347
|
|
|
|
|
|
|
려 呂 |
348
|
|
|
|
|
|
|
로 盧 路 魯 |
349
|
|
|
|
|
|
|
뢰 雷 |
350
|
|
|
|
|
|
|
류유 㧕 劉 柳 |
351
|
|
|
|
|
|
|
리 李 |
352
|
|
|
|
|
|
|
림 林 |
353
|
|
|
|
|
|
|
마 馬 麻 |
354
|
|
|
|
|
|
|
만 |
355
|
|
|
|
|
|
|
망절 網切 |
356
|
|
|
|
|
|
|
매 梅 |
357
|
|
|
|
|
|
|
맹 孟 |
358
|
|
|
|
|
|
|
명 明 |
359
|
|
|
|
|
|
|
모 慕 毛 牟 |
360
|
|
|
|
|
|
|
목 睦 穆 |
361
|
|
|
|
|
|
|
묘 苗 |
362
|
|
|
|
|
|
|
무 武 |
363
|
|
|
|
|
|
|
무본 武本 |
364
|
|
|
|
|
|
|
묵 墨 |
365
|
|
|
|
|
|
|
문 文 門 |
366
|
|
|
|
|
|
|
미 米 |
367
|
|
|
|
|
|
|
민 悶 敏 旻 民 珉 閔 |
368
|
|
|
|
|
|
|
박 博 朴 |
369
|
|
|
|
|
|
|
반 潘 班 |
370
|
|
|
|
|
|
|
방 房 方 旁 芳 邦 防 龐 |
371
|
|
|
|
|
|
|
배 培 背 裵 輩 配 |
372
|
|
|
|
|
|
|
백 伯 柏 白 百 |
373
|
|
|
|
|
|
|
번 樊 |
374
|
|
|
|
|
|
|
범 範 范 |
375
|
|
|
|
|
|
|
변 卞 變 邊 |
376
|
|
|
|
|
|
|
보 保 寶 甫 |
377
|
|
|
|
|
|
|
복 卜 |
378
|
|
|
|
|
|
|
복호 卜扈 |
379
|
|
|
|
|
|
|
봉 奉 鳳 |
380
|
|
|
|
|
|
|
부 付 傅 夫 富 |
381
|
|
|
|
|
|
|
비 丕 |
382
|
|
|
|
|
|
|
빈 彬 濱 貧 賓 賔 |
383
|
|
|
|
|
|
|
빙 氷 |
384
|
|
|
|
|
|
|
부여 夫餘 |
385
|
|
|
|
|
|
|
사 史 司 沙 舍 謝 |
386
|
|
|
|
|
|
|
사공 司公 司空 |
387
|
|
|
|
|
|
|
산 山 |
388
|
|
|
|
|
|
|
삼 杉 森 |
389
|
|
|
|
|
|
|
상 商 尙 尚 常 |
390
|
|
|
|
|
|
|
서 俆 徐 書 緖 西 |
391
|
|
|
|
|
|
|
서문 西問 西門 |
392
|
|
|
|
|
|
|
석 席 昔 石 釋 |
393
|
|
|
|
|
|
|
선 善 宣 鮮 |
394
|
|
|
|
|
|
|
선우 蘚于 鮮于 鮮宇 鮮牛 |
395
|
|
|
|
|
|
|
설 偰 卨 楔 薛 辥 雪 |
396
|
|
|
|
|
|
|
섭 葉 |
397
|
|
|
|
|
|
|
성 城 宬 成 星 盛 |
398
|
|
|
|
|
|
|
소 卲 小 所 昭 簫 肖 蕭 蘇 邵 |
399
|
|
|
|
|
|
|
손 孫 損 蓀 遜 |
400
|
|
|
|
|
|
|
송 宋 松 送 |
401
|
|
|
|
|
|
|
수 水 洙 隋 |
402
|
|
|
|
|
|
|
순 淳 筍 舜 荀 順 旬 |
403
|
|
|
|
|
|
|
승 承 昇 |
404
|
|
|
|
|
|
|
시 施 時 柴 |
405
|
|
|
|
|
|
|
신 伸 信 愼 新 申 莘 辛 |
406
|
|
|
|
|
|
|
심 心 沁 沈 深 |
407
|
|
|
|
|
|
|
아 阿 |
408
|
|
|
|
|
|
|
안 安 案 顔 |
409
|
|
|
|
|
|
|
애 艾 |
410
|
|
|
|
|
|
|
야 夜 |
411
|
|
|
|
|
|
|
양 량 揚 梁 楊 樑 樣 洋 粱 陽 |
412
|
|
|
|
|
|
|
어 漁 魚 |
413
|
|
|
|
|
|
|
어금 魚金 |
414
|
|
|
|
|
|
|
엄 㘙 儼 嚴 |
415
|
|
|
|
|
|
|
여 려 余 呂 黎 予 |
416
|
|
|
|
|
|
|
연 련 延 涎 燕 連 |
417
|
|
|
|
|
|
|
염 렴 廉 簾 閻 |
418
|
|
|
|
|
|
|
엽 葉 |
419
|
|
|
|
|
|
|
영 影 榮 |
420
|
|
|
|
|
|
|
예 倪 禮 芮 藝 |
421
|
|
|
|
|
|
|
오 五 伍 吳 吾 晤 |
422
|
|
|
|
|
|
|
옥 玉 |
423
|
|
|
|
|
|
|
온 溫 |
424
|
|
|
|
|
|
|
옹 邕 雍 |
425
|
|
|
|
|
|
|
완 阮 |
426
|
|
|
|
|
|
|
왕 汪王 |
427
|
|
|
|
|
|
|
요 姚 |
428
|
|
|
|
|
|
|
용 룡 龍 |
429
|
|
|
|
|
|
|
우 于 偶 宇 寓 尤 愚 牛 禹 遇 |
430
|
|
|
|
|
|
|
운 芸 雲 |
431
|
|
|
|
|
|
|
원 元 原 圓 苑 袁 阮 院 |
432
|
|
|
|
|
|
|
위 偉 衛 韋 魏 |
433
|
|
|
|
|
|
|
유 류 兪 劉 庾 有 杻 枊 柳 楡 由 裕 |
434
|
|
|
|
|
|
|
육 륙 陸 |
435
|
|
|
|
|
|
|
윤 尹 允 潤 |
436
|
|
|
|
|
|
|
은 殷 恩 隱 銀 誾 |
437
|
|
|
|
|
|
|
음 陰 |
438
|
|
|
|
|
|
|
이 리 李 㛅 伊 利 怡 異 |
439
|
|
|
|
|
|
|
인 印 |
440
|
|
|
|
|
|
|
임 림 任 壬 恁 林 |
441
|
|
|
|
|
|
|
자 慈 |
442
|
|
|
|
|
|
|
장 張 場 壯 將 庄 漿 章 臧 莊 葬 蔣 藏 裝 長 |
443
|
|
|
|
|
|
|
전 全 戰 田 錢 |
444
|
|
|
|
|
|
|
점 佔 |
445
|
|
|
|
|
|
|
정 鄭 丁 定 情 政 桯 正 程 |
446
|
|
|
|
|
|
|
제 諸 齊 |
447
|
|
|
|
|
|
|
제갈 諸葛 諸曷 諸渴 |
448
|
|
|
|
|
|
|
조 趙 刁 曺 朝 調 造 曹 |
449
|
|
|
|
|
|
|
종 宗 鍾 |
450
|
|
|
|
|
|
|
좌 佐 左 |
451
|
|
|
|
|
|
|
주 主 周 朱 株 珠 |
452
|
|
|
|
|
|
|
증 增 曾 |
453
|
|
|
|
|
|
|
지 地 智 池 遲 |
454
|
|
|
|
|
|
|
진 䄅 晋 珍 眞 秦 蔯 進 陣 陳 |
455
|
|
|
|
|
|
|
차 車 次 |
456
|
|
|
|
|
|
|
창 倉 昌 |
457
|
|
|
|
|
|
|
채 菜 蔡 采 |
458
|
|
|
|
|
|
|
천 千 天 川 |
459
|
|
|
|
|
|
|
초 初 楚 |
460
|
|
|
|
|
|
|
최 催 寉 崔 最 |
461
|
|
|
|
|
|
|
추 秋 鄒 |
462
|
|
|
|
|
|
|
탁 卓 |
463
|
|
|
|
|
|
|
탄 彈 |
464
|
|
|
|
|
|
|
태 太 泰 |
465
|
|
|
|
|
|
|
판 判 |
466
|
|
|
|
|
|
|
팽 彭 |
467
|
|
|
|
|
|
|
편 片 |
468
|
|
|
|
|
|
|
평 平 |
469
|
|
|
|
|
|
|
포 包 |
470
|
|
|
|
|
|
|
표 俵 表 |
471
|
|
|
|
|
|
|
풍 馮 |
472
|
|
|
|
|
|
|
피 皮 |
473
|
|
|
|
|
|
|
필 弼 畢 |
474
|
|
|
|
|
|
|
하 何 夏 河 |
475
|
|
|
|
|
|
|
학 郝 |
476
|
|
|
|
|
|
|
한 恨 汗 漢 韓 |
477
|
|
|
|
|
|
|
함 咸 |
478
|
|
|
|
|
|
|
해 海 解 |
479
|
|
|
|
|
|
|
허 許 |
480
|
|
|
|
|
|
|
현 玄 賢 |
481
|
|
|
|
|
|
|
형 刑 形 邢 |
482
|
|
|
|
|
|
|
호 扈 湖 胡 虎 鎬 |
483
|
|
|
|
|
|
|
홍 㤨 䜤 哄 弘 洪 烘 紅 |
484
|
|
|
|
|
|
|
화 化 |
485
|
|
|
|
|
|
|
황 晃 潢 煌 皇 簧 荒 黃 |
486
|
|
|
|
|
|
|
황목 荒木 |
487
|
|
|
|
|
|
|
황보 皇甫 黃甫 |
488
|
|
|
|
|
|
|
후 侯 候 后 |
489
|
|
|
|
|
|
|
료 |
490
|
|
|
|
|
|
|
웅 |
491
|
|
|
|
|
|
|
)); |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
my @family_names_korean_roman = |
494
|
|
|
|
|
|
|
(qw( |
495
|
|
|
|
|
|
|
Ga Ka Kar Gar Kah Gah Ca Cah Car |
496
|
|
|
|
|
|
|
Gan Kan Gahn Kahn |
497
|
|
|
|
|
|
|
Gal Kal Karl Garl Gahl Kahl Cahl Carl Cal |
498
|
|
|
|
|
|
|
Gam Kam Kahm Gahm Cam |
499
|
|
|
|
|
|
|
Gang Kang Kahng Khang |
500
|
|
|
|
|
|
|
Gyeon Kyŏn Kyun Kyeon Kyoun Kyon |
501
|
|
|
|
|
|
|
Gyeong Kyŏng Kyung Kyoung Kyeong Kyong |
502
|
|
|
|
|
|
|
Gye Kye Kyeh Kay Kie Kae Gae |
503
|
|
|
|
|
|
|
Go Ko Koh Goh Kho Gho Kor Co |
504
|
|
|
|
|
|
|
Gok Kok Kog Gog Cock Gogh Cough |
505
|
|
|
|
|
|
|
Gong Kong Kohng Koung Goung Khong Cong |
506
|
|
|
|
|
|
|
Gwak Kwak Kwag Kwack Gwag Koak Kuark Quack Quark |
507
|
|
|
|
|
|
|
Gwan Kwan Quan Kuan Guan |
508
|
|
|
|
|
|
|
Gyo Kyo Kyoh Gyoh |
509
|
|
|
|
|
|
|
Gu Ku Koo Goo Kou Kuh Khoo Khu |
510
|
|
|
|
|
|
|
Guk Kuk Kook Gook Kug Gug Cook |
511
|
|
|
|
|
|
|
Gung Kung Koong Kwoong |
512
|
|
|
|
|
|
|
Gwok Kwŏk Kwog Gwog Quock |
513
|
|
|
|
|
|
|
Gwon Kwŏn Kwon Kweon Kwun |
514
|
|
|
|
|
|
|
Geun Kŭn Keun Kuen Guen |
515
|
|
|
|
|
|
|
Geum Kŭm Keum Kum Gum Guem Kuem |
516
|
|
|
|
|
|
|
Gi Ki Kee Key Gee Ky Khee Kie |
517
|
|
|
|
|
|
|
Gil Kil Gill Khil Keel Kihl Kiehl Kill |
518
|
|
|
|
|
|
|
Gim Kim Ghim Kym Keem Gym |
519
|
|
|
|
|
|
|
Na Ra Nah La Rha Rah Law |
520
|
|
|
|
|
|
|
Nan Ran Nahn Rahn Nhan Rhan Lan Lahn |
521
|
|
|
|
|
|
|
Nam Nahm Nham Narm |
522
|
|
|
|
|
|
|
Namgung Namkung Namgoong Namkoong Namkuhng Namguhng |
523
|
|
|
|
|
|
|
Nang Rang Nahng Lang |
524
|
|
|
|
|
|
|
Nae Nai Nay Nea |
525
|
|
|
|
|
|
|
No Ro Noh Roh Nau Rau |
526
|
|
|
|
|
|
|
Noe Roe Roi Noi |
527
|
|
|
|
|
|
|
Da Ta |
528
|
|
|
|
|
|
|
Dan Tan Dahn Than |
529
|
|
|
|
|
|
|
Dam Tam Tham Dham Dahm Tahm |
530
|
|
|
|
|
|
|
Dang Tang Dhang Thang |
531
|
|
|
|
|
|
|
Dae Tae Dai Dea Day Tai Tay Tea |
532
|
|
|
|
|
|
|
Do To Dho Doh Toe Doe Toh |
533
|
|
|
|
|
|
|
Dokgo Tokko Dokko Toko Doko Dockko Dogko Togko Tokgo |
534
|
|
|
|
|
|
|
Don Ton Dohn Tohn |
535
|
|
|
|
|
|
|
Dong Tong Dhong Thong |
536
|
|
|
|
|
|
|
Dongbang Tongbang Tongpang Dongpang |
537
|
|
|
|
|
|
|
Du Tu Doo Do Dou Tou To Too |
538
|
|
|
|
|
|
|
Deung |
539
|
|
|
|
|
|
|
Deungjeong |
540
|
|
|
|
|
|
|
Ra Rah |
541
|
|
|
|
|
|
|
Ran Rahn |
542
|
|
|
|
|
|
|
Rang |
543
|
|
|
|
|
|
|
Ryeo Ryuh |
544
|
|
|
|
|
|
|
Roh |
545
|
|
|
|
|
|
|
Roe Roi |
546
|
|
|
|
|
|
|
Ryu Ryou Rou Ryoo Yu Yoo You Yuh |
547
|
|
|
|
|
|
|
Ree |
548
|
|
|
|
|
|
|
Rim Leem |
549
|
|
|
|
|
|
|
Ma Mah Mar |
550
|
|
|
|
|
|
|
Man Mann Mahn |
551
|
|
|
|
|
|
|
Mangjeol Mangjŏl Mangjul Mangjuhl Mangjoul |
552
|
|
|
|
|
|
|
Mae May Mea Mai |
553
|
|
|
|
|
|
|
Maeng Maing Meang |
554
|
|
|
|
|
|
|
Myeong Myŏng Myung Myoung Myong |
555
|
|
|
|
|
|
|
Mo Moh Moe |
556
|
|
|
|
|
|
|
Mok Mock Mog Mork |
557
|
|
|
|
|
|
|
Myo Myoh Mio |
558
|
|
|
|
|
|
|
Mu Moo |
559
|
|
|
|
|
|
|
Mubon |
560
|
|
|
|
|
|
|
Muk Mook |
561
|
|
|
|
|
|
|
Mun Moon Muhn |
562
|
|
|
|
|
|
|
Mi Mee Mih Meeh Me |
563
|
|
|
|
|
|
|
Min Minn Mihn Mean |
564
|
|
|
|
|
|
|
Bak Pak Park Back Bahk Pahk |
565
|
|
|
|
|
|
|
Ban Pan Bahn Pahn Bhan Van |
566
|
|
|
|
|
|
|
Bang Pang Bhang Bahng Pahng Phang |
567
|
|
|
|
|
|
|
Bae Pae Bai Bea Pai Bay Pay |
568
|
|
|
|
|
|
|
Baek Paek Baik Back Paik Pack Beak |
569
|
|
|
|
|
|
|
Beon Bun Burn |
570
|
|
|
|
|
|
|
Beom Pŏm Bum Bom Peom Pum Puhm Buhm |
571
|
|
|
|
|
|
|
Byeon Pyŏn Byun Byon Pyun Byoun Pyon Pyoun Pyeon |
572
|
|
|
|
|
|
|
Bo Po Boh Poh |
573
|
|
|
|
|
|
|
Bok Pok Pock Bog Pog Bock |
574
|
|
|
|
|
|
|
Bokho Pokho Pockhoh Boghoh Poghoh Bockhoh |
575
|
|
|
|
|
|
|
Bong Pong Bhong Bohng Pohng Vong |
576
|
|
|
|
|
|
|
Bu Pu Boo Bou Poo Booh Buh Pou Pooh |
577
|
|
|
|
|
|
|
Bi Pi Bee Pee Bih Bhi Pih Phi |
578
|
|
|
|
|
|
|
Bin Pin Been Pihn Phin Bean Bihn Pean |
579
|
|
|
|
|
|
|
Bing Ping |
580
|
|
|
|
|
|
|
Buyeo Puyŏ |
581
|
|
|
|
|
|
|
Sa Sah Sar |
582
|
|
|
|
|
|
|
Sagong Sakong Sagoung Sakoung |
583
|
|
|
|
|
|
|
San Sahn Sarn |
584
|
|
|
|
|
|
|
Sam Sahm Sarm |
585
|
|
|
|
|
|
|
Sang Sahng |
586
|
|
|
|
|
|
|
Seo Sŏ Suh Surh Su Sur So Seoh |
587
|
|
|
|
|
|
|
Seomun Sŏmun Suhmun Suhmoon Seomoon Somoon |
588
|
|
|
|
|
|
|
Seok Sŏk Suk Sok Suck Sek Such |
589
|
|
|
|
|
|
|
Seon Sŏn Sun Son Suhn Sen |
590
|
|
|
|
|
|
|
Seonu Sŏnu Sunwoo Seonwoo Sonu Sunoo Sunwou Seonwu Sonwu |
591
|
|
|
|
|
|
|
Seol Sŏl Sul Seul Sol Sull |
592
|
|
|
|
|
|
|
Seob Sub Subb Sup Seop |
593
|
|
|
|
|
|
|
Seong Sŏng Sung Soung Song Shèng |
594
|
|
|
|
|
|
|
So Soh Sou Sow |
595
|
|
|
|
|
|
|
Son Sohn Soun |
596
|
|
|
|
|
|
|
Song Soung |
597
|
|
|
|
|
|
|
Su Soo Sooh |
598
|
|
|
|
|
|
|
Sun Soon |
599
|
|
|
|
|
|
|
Seung Sŭng Sung |
600
|
|
|
|
|
|
|
Si Shi Shie Shee Sie Sea See |
601
|
|
|
|
|
|
|
Sin Shin Shinn Sheen Seen Sinn Cynn |
602
|
|
|
|
|
|
|
Sim Shim Seem Sheem Sihm |
603
|
|
|
|
|
|
|
A Ah Ar |
604
|
|
|
|
|
|
|
An Ahn Arn Aan |
605
|
|
|
|
|
|
|
Ae Ay Ai Ea |
606
|
|
|
|
|
|
|
Ya Yah Yar |
607
|
|
|
|
|
|
|
Yang Ryang Lyang |
608
|
|
|
|
|
|
|
Eo Ŏ Uh Urh Eoh |
609
|
|
|
|
|
|
|
Eogeum Ŏgŭm Eokeum Okeum Okum Ukeum Ugeum Ukum Uhgeum Uhkuem |
610
|
|
|
|
|
|
|
Eom Ŏm Um Uhm Oum Ohm |
611
|
|
|
|
|
|
|
Yeo Ryeo Yŏ Ryŏ Yu Yo Yeu Yuh Yoh |
612
|
|
|
|
|
|
|
Yeon Ryeon Yŏn Ryŏn Youn Yun Yon Yeun Yeoun Yuhn |
613
|
|
|
|
|
|
|
Yeom Ryeom Yŏm Ryŏm Yum Youm Yeum Yom Yeoum |
614
|
|
|
|
|
|
|
Yeop Yŏp Yeob Youb Yub Yup Yob |
615
|
|
|
|
|
|
|
Yeong Yŏng Young Yung |
616
|
|
|
|
|
|
|
Ye Yeh |
617
|
|
|
|
|
|
|
O Oh Oe Au Ou Awh |
618
|
|
|
|
|
|
|
Ok Ock Ohk Oak Og Ohg Oag Ogh |
619
|
|
|
|
|
|
|
On Ohn Ohnn |
620
|
|
|
|
|
|
|
Ong Ohng Oung |
621
|
|
|
|
|
|
|
Wan Warn |
622
|
|
|
|
|
|
|
Wang |
623
|
|
|
|
|
|
|
Yo You |
624
|
|
|
|
|
|
|
Yong Ryong Lyong |
625
|
|
|
|
|
|
|
U Woo Wu Ou Wo Uh |
626
|
|
|
|
|
|
|
Un Woon Wun Whun Wuhn |
627
|
|
|
|
|
|
|
Won Wŏn Weon Woen Wone Wun One Worn Warn |
628
|
|
|
|
|
|
|
Wi Wee We Wie |
629
|
|
|
|
|
|
|
Yu Ryu Yoo You |
630
|
|
|
|
|
|
|
Yuk Ryuk Yook Youk Yug Yuck |
631
|
|
|
|
|
|
|
Yun Yoon Youn Yune Yeun |
632
|
|
|
|
|
|
|
Eun Ŭn Ehn Enn Unn En Un |
633
|
|
|
|
|
|
|
Eum Ŭm Um Em Yeum Uem |
634
|
|
|
|
|
|
|
I Ri Yi Lee Rhee Ree Reeh Ee Rie Rhie |
635
|
|
|
|
|
|
|
In Ihn Yin Inn Lin Ean |
636
|
|
|
|
|
|
|
Im Rim Lim Yim Leem Rhim Eam |
637
|
|
|
|
|
|
|
Ja Cha Jar |
638
|
|
|
|
|
|
|
Jang Chang Jahng Jhang Zang |
639
|
|
|
|
|
|
|
Jeon Chŏn Jun Chun Chon Cheon |
640
|
|
|
|
|
|
|
Jeom Chŏm Jum |
641
|
|
|
|
|
|
|
Jeong Chŏng Chung Jung Joung Chong Cheong Choung |
642
|
|
|
|
|
|
|
Je Che Jae Jea Jei Jhe |
643
|
|
|
|
|
|
|
Jegal Chegal Jaegal Jekal Jeagal Jikal Chekal |
644
|
|
|
|
|
|
|
Jo Cho Joe Joh Jou |
645
|
|
|
|
|
|
|
Jong Chong |
646
|
|
|
|
|
|
|
Jwa Chwa Joa Choa |
647
|
|
|
|
|
|
|
Ju Chu Joo Choo Chow Jou Zoo Jew Zu |
648
|
|
|
|
|
|
|
Jeung Chŭng Jung Cheung Chung |
649
|
|
|
|
|
|
|
Ji Chi Jee Gi Chee Gee Jhi |
650
|
|
|
|
|
|
|
Jin Chin Jeen Gin |
651
|
|
|
|
|
|
|
Cha Ch'a Char Chah |
652
|
|
|
|
|
|
|
Chang Ch'ang Chahng |
653
|
|
|
|
|
|
|
Chae Ch'ae Chai Che Chea Chay |
654
|
|
|
|
|
|
|
Cheon Ch'ŏn Chun Chon Choun |
655
|
|
|
|
|
|
|
Cho Ch'o Chu Chou Choh |
656
|
|
|
|
|
|
|
Choe Ch'oe Choi Che Choy Chwe Chey |
657
|
|
|
|
|
|
|
Chu Ch'u Choo Chou Chyu |
658
|
|
|
|
|
|
|
Tak T'ak Tark Tag Tack Tahk |
659
|
|
|
|
|
|
|
Tan T'an Tahn Tann |
660
|
|
|
|
|
|
|
Tae T'ae Tai Tay Tea Thae |
661
|
|
|
|
|
|
|
Pan P'an Pahn Phan Parn Pann |
662
|
|
|
|
|
|
|
Paeng P'aeng Pang Paing Peng Peang |
663
|
|
|
|
|
|
|
Pyeon P'yŏn Pyun Pyon Pyoun Pyen |
664
|
|
|
|
|
|
|
Pyeong P'yŏng Pyung Pyong Pyoung Pyeng |
665
|
|
|
|
|
|
|
Po P'o Pho Poh Paul For Four |
666
|
|
|
|
|
|
|
Pyo P'yo Phyo Pio Peo Pyoh Pyou |
667
|
|
|
|
|
|
|
Pung P'ung Poong Puhng Poohng |
668
|
|
|
|
|
|
|
Pi P'i Pee Phee Phi Phy Pih Fee |
669
|
|
|
|
|
|
|
Pil P'il Phil Peel Fill Feel |
670
|
|
|
|
|
|
|
Ha Hah Har |
671
|
|
|
|
|
|
|
Hak Hag Hahk Hahg Hack |
672
|
|
|
|
|
|
|
Han Hahn Hann Hanh |
673
|
|
|
|
|
|
|
Ham Hahm Hamm Haam Harm |
674
|
|
|
|
|
|
|
Hae Hay Hai Hea |
675
|
|
|
|
|
|
|
Heo Hŏ Hur Huh Her Hu Ho Hoh Heoh |
676
|
|
|
|
|
|
|
Hyeon Hyŏn Hyun Hyon Hyoun |
677
|
|
|
|
|
|
|
Hyeong Hyŏng Hyung Hyoung Hyong Hyeung |
678
|
|
|
|
|
|
|
Ho Hoh |
679
|
|
|
|
|
|
|
Hong Houng Hoong Hung |
680
|
|
|
|
|
|
|
Hwa Howa Hoa Wha Hua |
681
|
|
|
|
|
|
|
Hwang Whang Whong |
682
|
|
|
|
|
|
|
Hwangmok Whangmock Wangmok |
683
|
|
|
|
|
|
|
Hwangbo Hwangpo Whangpoh |
684
|
|
|
|
|
|
|
Hu Hoo Hooh Huh |
685
|
|
|
|
|
|
|
)); |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
my @family_names_vietnamese = |
688
|
|
|
|
|
|
|
(qw( |
689
|
|
|
|
|
|
|
Nguyễn Nguyen Trần Tran Lê Le Phạm Hoàng Hoang Huỳnh Huynh Vũ Võ Vu Vo Phan Trương Truong |
690
|
|
|
|
|
|
|
Bùi Bui Đặng Dang Đỗ Do Ngô Ngo Hồ Dương Duong Đinh Dinh Ái An Ân Bạch Bành Bao Biên Biện |
691
|
|
|
|
|
|
|
Cam Cảnh Cảnh Cao Cái Cát Chân Châu Chiêm Chu Chung Chử Cổ Cù Cung Cung Củng Cừu Dịch Diệp |
692
|
|
|
|
|
|
|
Doãn Dũ Dung Dư Dữu Đái Đàm Đào Đậu Điền Đoàn Đồ Đồng Đổng Đường Giả Giải Gia_Cát Giản Giang |
693
|
|
|
|
|
|
|
Giáp Hà Hạ Hậ Hác Hàn Hầu Hình Hoa Hoắc Hoạn Hồng Hứa Hướng Hy Kha Khâu Khổng Khuất Kiều Kim |
694
|
|
|
|
|
|
|
Kỳ Kỷ La Lạc Lại Lam Lăng Lãnh Lâm Lận Lệ Liên Liêu Liễu Long Lôi Lục Lư Lữ Lương Lưu Mã Mạc |
695
|
|
|
|
|
|
|
Mạch Mai Mạnh Mao Mẫn Miêu Minh Mông Ngân Nghê Nghiêm Ngư Ngưu Nhạc Nhan Nhâm Nhiếp Nhiều |
696
|
|
|
|
|
|
|
Nhung Ninh Nông Ôn Ổn Ông Phí Phó Phong Phòng Phù Phùng Phương Quách Quan Quản Quang Quảng |
697
|
|
|
|
|
|
|
Quế Quyền Sài Sầm Sử Tạ Tào Tăng Tân Tần Tất Tề Thạch Thai Thái Thang Thành Thảo Thân Thi Thích |
698
|
|
|
|
|
|
|
Thiện Thiệu Thôi Thủy Thư Thường Tiền Tiết Tiêu Tiêu Tô Tôn Tôn_Thất Tông Tống Trác Trạch Trại |
699
|
|
|
|
|
|
|
Trang Trầm Trâu Trì Triệu Trịnh Từ Tư_Mã Tưởng Úc Ứng Vạn Văn Vân Vi Vĩnh Vũ_Văn Vương Vưu Xà |
700
|
|
|
|
|
|
|
Xầm Xế Yên Yến |
701
|
|
|
|
|
|
|
)); |
702
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
my %split_starter; |
704
|
|
|
|
|
|
|
my $split_starter_re; |
705
|
|
|
|
|
|
|
my $kcben = kc('ben'); |
706
|
|
|
|
|
|
|
my $kcbean = kc('bean'); |
707
|
|
|
|
|
|
|
my @split_starter = |
708
|
|
|
|
|
|
|
(qw( |
709
|
|
|
|
|
|
|
de de’ de' del dels dela della delle dal dalla degli di da du do dos das |
710
|
|
|
|
|
|
|
le la li lo y i |
711
|
|
|
|
|
|
|
van von zu der ter den af av til |
712
|
|
|
|
|
|
|
el al ibn bin ben bat bint binti binte mibeit mimishpachat |
713
|
|
|
|
|
|
|
of o ó ni ní mac nic ua bean ui uí mhic ap ab ferch verch |
714
|
|
|
|
|
|
|
san santa santos st st. ste ste. |
715
|
|
|
|
|
|
|
ka te |
716
|
|
|
|
|
|
|
)); |
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
# Non-individual case exception replacements need a long regex that needs to |
719
|
|
|
|
|
|
|
# be constructed, and can change. But probably not often. And sometimes a |
720
|
|
|
|
|
|
|
# lot at once. Regex construction is cached lazily when needed for use. |
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
my $need_case_update = 1; |
723
|
|
|
|
|
|
|
my $keys_namecase_exceptions; |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
# Return the supplied full/given/family name with the case fixed |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
sub namecase |
728
|
|
|
|
|
|
|
{ |
729
|
8633
|
100
|
|
8633
|
1
|
641019
|
my $name = (@_) ? shift : $_; |
730
|
8633
|
100
|
|
|
|
18252
|
my $mode = (@_) ? shift : 'full'; |
731
|
8633
|
|
|
|
|
14280
|
my $given_names = shift; |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
# Without a name, do nothing |
734
|
8633
|
100
|
|
|
|
18878
|
return undef unless defined $name; |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
# Uppercase at start of word (after space, apostrophe, or hyphen) |
737
|
8627
|
|
|
|
|
16330
|
$name = lc(nametrim($name)); |
738
|
8627
|
|
|
|
|
79154
|
$name =~ s/\b(\w)/\U$1/g; |
739
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
# Lowercase after apostrophes that follow more than 1 letter (e.g. Oso'ese but not O'Brien) |
741
|
8627
|
|
|
|
|
37428
|
$name =~ s/(?<=\w{2}|$apostrophe\w)($apostrophe\w)/\L$1/g; |
742
|
8627
|
|
|
|
|
26380
|
$name =~ s/(?<=\b[YS])($apostrophe\w)/\L$1/g; |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
# Uppercase after "Mc" and "Fitz" ("Mac" is done selectively with built-in exceptions) |
745
|
8627
|
|
|
|
|
25587
|
$name =~ s/\b(Mc|Fitz)(\w)/$1\U$2/g; |
746
|
|
|
|
|
|
|
|
747
|
|
|
|
|
|
|
# Lowercase some grammatical/aristocratic/patronymic prefixes. |
748
|
|
|
|
|
|
|
# Note: This should only be done for family names because |
749
|
|
|
|
|
|
|
# "Van" is also a Vietnamese given name which is fixed below. |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
# Family name prefixes |
752
|
|
|
|
|
|
|
|
753
|
8627
|
100
|
|
|
|
19935
|
if ($mode ne 'given') |
754
|
|
|
|
|
|
|
{ |
755
|
|
|
|
|
|
|
# French/Italian/Spanish/Portuguese: d', dall', dell', de', de, de la, |
756
|
|
|
|
|
|
|
# del, dela, dels, della, delle, dal, dalla, degli, |
757
|
|
|
|
|
|
|
# di, du, da, do, dos, das |
758
|
|
|
|
|
|
|
# Spanish/Catalan/Portuguese: y, i, e (conjunctions) |
759
|
|
|
|
|
|
|
# German/Dutch: von, zu, von und zu, van, der, ter, den, van de, |
760
|
|
|
|
|
|
|
# van der, van den, van het, tot, 'sSomething, 'tSomething |
761
|
|
|
|
|
|
|
# Danish/Swedish/Norwegian: af, av, til |
762
|
|
|
|
|
|
|
# Welsh: ap, ab, ferch, verch |
763
|
|
|
|
|
|
|
# Arabic/Hebrew/Malaysian: ibn, bin, bint, binti, binte, ben[1], bat, |
764
|
|
|
|
|
|
|
# mibeit, mimishpachat, el-, al-, ut-, ha-, v' |
765
|
|
|
|
|
|
|
# Zulu: ka |
766
|
|
|
|
|
|
|
# English/Scottish: of |
767
|
|
|
|
|
|
|
# Irish: Prefix case normal except: Ó hUiginn, Ó hAodha |
768
|
|
|
|
|
|
|
# Note1: "ben" is only detected when unambiguous |
769
|
|
|
|
|
|
|
|
770
|
7743
|
|
|
|
|
57521
|
$name =~ s/\b(d$apostrophe|(?:de(?: la|$apostrophe)?|del|dela|dels|della|delle|dal|dalla|degli|di|du|da|do|dos|das|y|i|e|von und zu|von|zu|van het|van|der|ter|den|tot|af|av|til|ap|ab|ferch|verch|ibn|bin|bint|binti|binte|bat|mibeit|mimishpachat|ka|of)\s)/\L$1/ig; |
771
|
7743
|
|
|
|
|
32770
|
$name =~ s/\b(dall|dell)($apostrophe)(\w)/\L$1\E$2\U$3/ig; # Italian: dall'Agnese |
772
|
7743
|
|
|
|
|
38165
|
$name =~ s/((?:^|\s)${apostrophe})([st])(\w)/$1\L$2\U$3/ig; # Dutch: 'sGravesande |
773
|
7743
|
|
|
|
|
24762
|
$name =~ s/\b([OÓ] )(h)([aeiouáéíóú])/$1\L$2\U$3/ig; # Irish: Ó hUiginn |
774
|
7743
|
|
|
|
|
33294
|
$name =~ s/\b(el|al|ut|ha)(?=$hyphen)/\L$1/ig; # Arabic/Hebrew: el- al- ut- ha- |
775
|
7743
|
|
|
|
|
30759
|
$name =~ s/\b(v)(?=$apostrophe)/\L$1/ig; # Hebrew: v'Rachel |
776
|
7743
|
100
|
100
|
|
|
36353
|
$name =~ s/^(ben\s)/\L$1/i if $mode eq 'family' || index($name, ',') != -1; # Hebrew: ben if family |
777
|
7743
|
100
|
|
|
|
41416
|
$name =~ s/(?<=\s)\b(ben)\b(?=\s)/\L$1/i if $name =~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/; # Hebrew: ben if v' or ha- |
778
|
|
|
|
|
|
|
|
779
|
7743
|
100
|
100
|
|
|
26604
|
if ($mode eq 'full' && %namecase_exceptions_full) |
780
|
|
|
|
|
|
|
{ |
781
|
583
|
|
|
|
|
1152
|
my $kcfull = kc($name); |
782
|
583
|
100
|
|
|
|
2019
|
$name = $namecase_exceptions_full{$kcfull} if exists $namecase_exceptions_full{$kcfull}; |
783
|
|
|
|
|
|
|
} |
784
|
|
|
|
|
|
|
|
785
|
7743
|
100
|
100
|
|
|
31019
|
if ($mode eq 'family' && defined $given_names && %fnamecase_exceptions_full) |
|
|
|
100
|
|
|
|
|
786
|
|
|
|
|
|
|
{ |
787
|
108
|
|
|
|
|
291
|
my $kcfull = kc($name . ', ' . $given_names); |
788
|
108
|
100
|
|
|
|
420
|
$name = $fnamecase_exceptions_full{$kcfull} if exists $fnamecase_exceptions_full{$kcfull}; |
789
|
|
|
|
|
|
|
} |
790
|
|
|
|
|
|
|
} |
791
|
|
|
|
|
|
|
|
792
|
|
|
|
|
|
|
# If this is a full name, the given name is either after a comma |
793
|
|
|
|
|
|
|
# or at the start. Fix "van" there. |
794
|
|
|
|
|
|
|
|
795
|
8627
|
100
|
|
|
|
16175
|
if ($mode eq 'full') |
796
|
|
|
|
|
|
|
{ |
797
|
5831
|
|
|
|
|
11484
|
my $has_comma = (index($name, ',') != -1); |
798
|
5831
|
100
|
|
|
|
13766
|
$name =~ s/, van\b/, Van/ if $has_comma; |
799
|
5831
|
100
|
|
|
|
12499
|
$name =~ s/^van\b/Van/ if !$has_comma; |
800
|
|
|
|
|
|
|
} |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
# With some exceptions (builtin ones and user-supplied ones) |
803
|
|
|
|
|
|
|
|
804
|
8627
|
100
|
|
|
|
16728
|
if ($need_case_update) |
805
|
|
|
|
|
|
|
{ |
806
|
36
|
|
|
|
|
3836
|
$keys_namecase_exceptions = join '|', keys %namecase_exceptions; |
807
|
36
|
|
|
|
|
751
|
$need_case_update = 0; |
808
|
|
|
|
|
|
|
} |
809
|
|
|
|
|
|
|
|
810
|
8627
|
|
|
|
|
83705
|
$name =~ s/\b($keys_namecase_exceptions)\b/$namecase_exceptions{kc($1)}/ieg; |
|
344
|
|
|
|
|
921
|
|
811
|
|
|
|
|
|
|
|
812
|
8627
|
|
|
|
|
72546
|
return $name; |
813
|
|
|
|
|
|
|
} |
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
# Return the supplied given name(s) with the case fixed |
816
|
|
|
|
|
|
|
|
817
|
|
|
|
|
|
|
sub gnamecase |
818
|
|
|
|
|
|
|
{ |
819
|
886
|
100
|
|
886
|
1
|
2553
|
my $given_names = (@_) ? shift : $_; |
820
|
|
|
|
|
|
|
|
821
|
886
|
|
|
|
|
1969
|
return namecase($given_names, 'given') |
822
|
|
|
|
|
|
|
} |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
# Return the supplied family name with the case fixed |
825
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
sub fnamecase |
827
|
|
|
|
|
|
|
{ |
828
|
1826
|
100
|
|
1826
|
1
|
5424
|
my $family_name = (@_) ? shift : $_; |
829
|
1826
|
|
|
|
|
2928
|
my $given_names = shift; |
830
|
|
|
|
|
|
|
|
831
|
1826
|
|
|
|
|
3854
|
return namecase($family_name, 'family', $given_names); |
832
|
|
|
|
|
|
|
} |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
# Add a case exception (family-wide or individual) |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
sub namecase_exception |
837
|
|
|
|
|
|
|
{ |
838
|
40
|
|
|
40
|
1
|
4502
|
my $name = shift; |
839
|
40
|
100
|
|
|
|
112
|
return 0 unless defined $name; |
840
|
|
|
|
|
|
|
|
841
|
36
|
|
|
|
|
79
|
$name = nametrim($name); |
842
|
36
|
100
|
|
|
|
131
|
return 0 unless length $name; |
843
|
|
|
|
|
|
|
|
844
|
34
|
|
|
|
|
92
|
my $has_comma = (index($name, ',') != -1); |
845
|
34
|
|
|
|
|
78
|
my $kcname = kc($name); |
846
|
|
|
|
|
|
|
|
847
|
34
|
100
|
|
|
|
87
|
if ($has_comma) # Individual exception |
848
|
|
|
|
|
|
|
{ |
849
|
26
|
|
|
|
|
101
|
my ($f, $g) = split /, /, $name; |
850
|
26
|
|
|
|
|
79
|
my $kcnatural = kc("$g $f"); |
851
|
|
|
|
|
|
|
|
852
|
26
|
|
|
|
|
96
|
$namecase_exceptions_full{$kcname} = $name; |
853
|
26
|
|
|
|
|
75
|
$namecase_exceptions_full{$kcnatural} = $name; |
854
|
|
|
|
|
|
|
|
855
|
26
|
|
|
|
|
63
|
$fnamecase_exceptions_full{$kcname} = $f; |
856
|
|
|
|
|
|
|
} |
857
|
|
|
|
|
|
|
else # Family-wide exception |
858
|
|
|
|
|
|
|
{ |
859
|
8
|
|
|
|
|
28
|
$namecase_exceptions{$kcname} = $name; |
860
|
|
|
|
|
|
|
} |
861
|
|
|
|
|
|
|
|
862
|
34
|
|
|
|
|
56
|
$need_case_update = 1; |
863
|
34
|
|
|
|
|
130
|
return 1; |
864
|
|
|
|
|
|
|
} |
865
|
|
|
|
|
|
|
|
866
|
|
|
|
|
|
|
# Split exceptions hash. Keys are foldcase full names in |
867
|
|
|
|
|
|
|
# ambiguous form ("Given Family"). Values are unambiguous. |
868
|
|
|
|
|
|
|
|
869
|
|
|
|
|
|
|
my %namesplit_exceptions; |
870
|
|
|
|
|
|
|
|
871
|
|
|
|
|
|
|
# Return the supplied full name as "family_name, given_names", guessing if |
872
|
|
|
|
|
|
|
# necessary, which part of the supplied full name is the family name, and |
873
|
|
|
|
|
|
|
# which part is the given name or names. It's reasonably good at identifying |
874
|
|
|
|
|
|
|
# family names containing grammatical constructions (i.e., |
875
|
|
|
|
|
|
|
# aristocratic/patronymic) in various languages, but if that doesn't work, |
876
|
|
|
|
|
|
|
# trickier names that can't be programmatically determined can be added to |
877
|
|
|
|
|
|
|
# the namesplit_exceptions hash to specify the correct name splitting for |
878
|
|
|
|
|
|
|
# specific individual names. Many names require this. The letter case of the |
879
|
|
|
|
|
|
|
# result is also corrected via namecase(). |
880
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
my $ja_loaded = 0; |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
sub namesplit |
884
|
|
|
|
|
|
|
{ |
885
|
3869
|
100
|
|
3869
|
1
|
112009
|
my $name = (@_) ? shift : $_; |
886
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
# Without a name, do nothing |
888
|
|
|
|
|
|
|
|
889
|
3869
|
100
|
|
|
|
8968
|
return undef unless defined $name; |
890
|
3867
|
100
|
|
|
|
9645
|
return '' unless length $name; |
891
|
|
|
|
|
|
|
|
892
|
|
|
|
|
|
|
# Prepare the name for matching (any normalization must have already been done) |
893
|
|
|
|
|
|
|
|
894
|
3861
|
|
|
|
|
7830
|
$name = nametrim($name); |
895
|
3861
|
|
|
|
|
11061
|
my $kcname = kc($name); |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
# Lookup exceptions first |
898
|
|
|
|
|
|
|
|
899
|
3861
|
100
|
|
|
|
12512
|
$name = $namesplit_exceptions{$kcname} if exists $namesplit_exceptions{$kcname}; |
900
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
# Accept existing commas |
902
|
|
|
|
|
|
|
|
903
|
3861
|
100
|
|
|
|
11496
|
return namecase($name) if index($name, ',') != -1; |
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
# Load hash of family name starter words |
906
|
|
|
|
|
|
|
|
907
|
2036
|
100
|
|
|
|
4534
|
%split_starter = map { kc($_) => 1 } @split_starter unless %split_starter; |
|
136
|
|
|
|
|
13249
|
|
908
|
2036
|
100
|
|
|
|
4641
|
$split_starter_re = qr/(?:@{[join '|', keys %split_starter]})/i unless $split_starter_re; |
|
2
|
|
|
|
|
3571
|
|
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
# Load family name hashes/regexes for Chinese, Korean, Vietnamese |
911
|
|
|
|
|
|
|
|
912
|
2036
|
100
|
|
|
|
4036
|
if (!scalar %family_names_ck) |
913
|
|
|
|
|
|
|
{ |
914
|
|
|
|
|
|
|
%family_names_ck = |
915
|
1302
|
|
|
|
|
2462
|
map { $_ => 1 } |
916
|
|
|
|
|
|
|
@family_names_chinese, |
917
|
2
|
|
|
|
|
15
|
grep { /\p{Hangul}/ } @family_names_korean; |
|
1454
|
|
|
|
|
2666
|
|
918
|
2
|
|
|
|
|
72
|
$family_names_ck_re = qr/(?:@{[join '|', keys %family_names_ck]})/; |
|
2
|
|
|
|
|
5174
|
|
919
|
|
|
|
|
|
|
} |
920
|
|
|
|
|
|
|
|
921
|
2036
|
100
|
|
|
|
4046
|
if (!scalar %family_names_ck_roman) |
922
|
|
|
|
|
|
|
{ |
923
|
|
|
|
|
|
|
%family_names_ck_roman = |
924
|
6070
|
|
|
|
|
9762
|
map { kc($_) => 1 } |
925
|
2
|
|
|
|
|
113
|
grep { !/^$split_starter_re$/ } |
|
6170
|
|
|
|
|
20983
|
|
926
|
|
|
|
|
|
|
@family_names_chinese_roman, |
927
|
|
|
|
|
|
|
@family_names_korean_roman; |
928
|
2
|
|
|
|
|
365
|
$family_names_ck_roman_re = qr/(?:@{[join '|', keys %family_names_ck_roman]})/i; |
|
2
|
|
|
|
|
11784
|
|
929
|
|
|
|
|
|
|
} |
930
|
|
|
|
|
|
|
|
931
|
2036
|
100
|
|
|
|
3956
|
if (!scalar %family_names_v_roman) |
932
|
|
|
|
|
|
|
{ |
933
|
2
|
|
|
|
|
13
|
%family_names_v_roman = map { kc($_) => 1 } @family_names_vietnamese; |
|
444
|
|
|
|
|
707
|
|
934
|
2
|
|
|
|
|
36
|
$family_names_v_roman_re = qr/(?:@{[join '|', keys %family_names_v_roman]})/i; |
|
2
|
|
|
|
|
1714
|
|
935
|
|
|
|
|
|
|
} |
936
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
# Identify Vietnamese names (before Dutch names) |
938
|
|
|
|
|
|
|
|
939
|
2036
|
|
|
|
|
19036
|
my ($f, $g) = $name =~ /^($family_names_v_roman_re) (.+)$/; |
940
|
2036
|
100
|
|
|
|
5219
|
return namecase("$f, $g") if defined $g; |
941
|
|
|
|
|
|
|
|
942
|
1980
|
|
|
|
|
13696
|
($g, $f) = $name =~ /^(.+) ($family_names_v_roman_re)$/; |
943
|
1980
|
100
|
|
|
|
4540
|
return namecase("$f, $g") if defined $g; |
944
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
# Identify plausible multi-word family names (in Latin scripts) |
946
|
|
|
|
|
|
|
|
947
|
1964
|
|
|
|
|
6211
|
my @words = split / /, $name; |
948
|
1964
|
100
|
100
|
|
|
6673
|
return namecase($name) if @words < 2 && $name !~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/; |
949
|
|
|
|
|
|
|
|
950
|
1868
|
|
|
|
|
5603
|
for my $i (1..$#words) |
951
|
|
|
|
|
|
|
{ |
952
|
2080
|
|
|
|
|
4922
|
my $kcstarter = kc($words[$i]); |
953
|
2080
|
100
|
|
|
|
6033
|
next unless exists $split_starter{$kcstarter}; |
954
|
1378
|
100
|
100
|
|
|
4604
|
next if $kcstarter eq $kcben && $name !~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/i; # Hebrew |
955
|
1354
|
100
|
100
|
|
|
3612
|
next if $kcstarter eq $kcbean && $name !~ /\b$kcbean (?:Uí|Ui|Mhic)\b/i; # Irish |
956
|
1342
|
100
|
|
|
|
2750
|
next if $i == $#words; |
957
|
|
|
|
|
|
|
|
958
|
1330
|
100
|
100
|
|
|
3394
|
--$i if $i > 1 && $kcstarter =~ /^[yi]$/i; # Spanish/Catalan |
959
|
1330
|
|
|
|
|
6851
|
return namecase(join(' ', @words[$i..$#words]) . ', ' . join(' ', @words[0..$i - 1])) |
960
|
|
|
|
|
|
|
} |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
# Identify Chinese, Korean, and Vietnamese family names (and some misidentified Japanese names) :-( |
963
|
|
|
|
|
|
|
# Note: When romanized, these family names can appear first or last |
964
|
|
|
|
|
|
|
|
965
|
538
|
|
|
|
|
7918
|
($f, $g) = $name =~ /^($family_names_ck_re)(.+)$/; |
966
|
538
|
100
|
|
|
|
1751
|
return "$f, $g" if defined $g; |
967
|
|
|
|
|
|
|
|
968
|
|
|
|
|
|
|
# Note: Family names can appear first or last. Luckily, for Chinese, |
969
|
|
|
|
|
|
|
# the two given name characters are usually romanized as a single word, |
970
|
|
|
|
|
|
|
# so there's less chance of misinterpreting a given name as a family |
971
|
|
|
|
|
|
|
# name. Unfortunately, Korean names are romanized as separate names, |
972
|
|
|
|
|
|
|
# all of which might look like a family name, so it's likely that the |
973
|
|
|
|
|
|
|
# name that appears first will be recognized as a family name, even |
974
|
|
|
|
|
|
|
# if the real family name is at the end (in English-speaking places). |
975
|
|
|
|
|
|
|
# This can only be fixed with split exceptions (or by encouraging |
976
|
|
|
|
|
|
|
# Koreans to not put their family name last). |
977
|
|
|
|
|
|
|
|
978
|
494
|
|
|
|
|
21174
|
($f, $g) = $name =~ /^($family_names_ck_roman_re) (.+)$/; |
979
|
494
|
100
|
|
|
|
1554
|
return namecase("$f, $g") if defined $g; |
980
|
|
|
|
|
|
|
|
981
|
466
|
|
|
|
|
14359
|
($g, $f) = $name =~ /^(.+) ($family_names_ck_roman_re)$/; |
982
|
466
|
100
|
|
|
|
1198
|
return namecase("$f, $g") if defined $g; |
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
# Identify Japanese names |
985
|
|
|
|
|
|
|
|
986
|
454
|
100
|
|
|
|
1427
|
if ($name =~ /^[\p{Han}\p{Hiragana}\p{Katakana}]+$/) |
987
|
|
|
|
|
|
|
{ |
988
|
34
|
100
|
|
|
|
86
|
if (!$ja_loaded) |
989
|
|
|
|
|
|
|
{ |
990
|
1
|
|
|
|
|
740
|
require Lingua::JA::Name::Splitter; |
991
|
1
|
|
|
|
|
36257
|
$ja_loaded = 1; |
992
|
|
|
|
|
|
|
} |
993
|
|
|
|
|
|
|
|
994
|
34
|
|
|
2
|
|
240
|
local $SIG{__WARN__} = sub {}; # Avoid warnings for 々 (kanji repeater symbol) |
995
|
34
|
|
|
|
|
119
|
($f, $g) = Lingua::JA::Name::Splitter::split_kanji_name($name); |
996
|
34
|
|
|
|
|
5220
|
return "$f, $g"; |
997
|
|
|
|
|
|
|
} |
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
# Assume a single-word family name |
1000
|
|
|
|
|
|
|
# Note: Non-hyphenated multi-name family names must be handled via split exceptions |
1001
|
|
|
|
|
|
|
|
1002
|
420
|
|
|
|
|
2285
|
return namecase($words[-1] . ', ' . join(' ', @words[0..$#words - 1])); |
1003
|
|
|
|
|
|
|
} |
1004
|
|
|
|
|
|
|
|
1005
|
|
|
|
|
|
|
# Add a split exception |
1006
|
|
|
|
|
|
|
|
1007
|
|
|
|
|
|
|
sub namesplit_exception |
1008
|
|
|
|
|
|
|
{ |
1009
|
47
|
|
|
47
|
1
|
9903
|
my $name = shift; |
1010
|
47
|
100
|
|
|
|
129
|
return 0 unless defined $name; |
1011
|
|
|
|
|
|
|
|
1012
|
43
|
|
|
|
|
93
|
$name = nametrim($name); |
1013
|
43
|
100
|
|
|
|
148
|
return 0 unless length $name; |
1014
|
|
|
|
|
|
|
|
1015
|
41
|
|
|
|
|
113
|
my $has_comma = (index($name, ',') != -1); |
1016
|
41
|
100
|
|
|
|
96
|
return 0 unless $has_comma; |
1017
|
|
|
|
|
|
|
|
1018
|
39
|
|
|
|
|
182
|
my ($f, $g) = split /, ?/, $name; |
1019
|
|
|
|
|
|
|
|
1020
|
39
|
100
|
|
|
|
190
|
if ("$f$g" =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/) |
1021
|
|
|
|
|
|
|
{ |
1022
|
7
|
|
|
|
|
20
|
my $natural = "$f$g"; |
1023
|
|
|
|
|
|
|
|
1024
|
7
|
|
|
|
|
22
|
$namesplit_exceptions{$name} = $name; |
1025
|
7
|
|
|
|
|
21
|
$namesplit_exceptions{$natural} = $name; |
1026
|
|
|
|
|
|
|
} |
1027
|
|
|
|
|
|
|
else |
1028
|
|
|
|
|
|
|
{ |
1029
|
32
|
|
|
|
|
73
|
my $kcname = kc($name); |
1030
|
32
|
|
|
|
|
105
|
my $kcnatural = kc("$g $f"); |
1031
|
|
|
|
|
|
|
|
1032
|
32
|
|
|
|
|
107
|
$namesplit_exceptions{$kcname} = $name; |
1033
|
32
|
|
|
|
|
120
|
$namesplit_exceptions{$kcnatural} = $name; |
1034
|
|
|
|
|
|
|
} |
1035
|
|
|
|
|
|
|
|
1036
|
39
|
|
|
|
|
92
|
return 1; |
1037
|
|
|
|
|
|
|
} |
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
# Like namesplit() but returns the name as a list containing |
1040
|
|
|
|
|
|
|
# two items: the family name followed by the given names. |
1041
|
|
|
|
|
|
|
|
1042
|
|
|
|
|
|
|
sub nameparts |
1043
|
|
|
|
|
|
|
{ |
1044
|
1771
|
100
|
|
1771
|
1
|
1223950
|
my $name = (@_) ? shift : $_; |
1045
|
|
|
|
|
|
|
|
1046
|
1771
|
100
|
100
|
|
|
8516
|
return () unless defined $name and length $name; |
1047
|
|
|
|
|
|
|
|
1048
|
1763
|
|
|
|
|
4078
|
return split /, ?/, namesplit($name), 2; |
1049
|
|
|
|
|
|
|
} |
1050
|
|
|
|
|
|
|
|
1051
|
|
|
|
|
|
|
# Trim the supplied name |
1052
|
|
|
|
|
|
|
|
1053
|
|
|
|
|
|
|
sub nametrim |
1054
|
|
|
|
|
|
|
{ |
1055
|
12587
|
100
|
|
12587
|
1
|
37364
|
my $name = (@_) ? shift : $_; |
1056
|
|
|
|
|
|
|
|
1057
|
12587
|
100
|
|
|
|
26228
|
return undef unless defined $name; |
1058
|
|
|
|
|
|
|
|
1059
|
12585
|
|
|
|
|
170923
|
return $name |
1060
|
|
|
|
|
|
|
=~ s/^\s+//r # Remove leading spaces |
1061
|
|
|
|
|
|
|
=~ s/\s+$//r # Remove trailing spaces |
1062
|
|
|
|
|
|
|
=~ s/\s+/ /gr # Squash multiple spaces |
1063
|
|
|
|
|
|
|
=~ s/($hyphen) /$1/gr # Remove space after hyphen |
1064
|
|
|
|
|
|
|
=~ s/ (,|$hyphen)/$1/gr # Remove space before comma and hyphen |
1065
|
|
|
|
|
|
|
=~ s/,(?! )/, /gr; # Add space after - if missing |
1066
|
|
|
|
|
|
|
} |
1067
|
|
|
|
|
|
|
|
1068
|
|
|
|
|
|
|
# Normalise internal hash keys and data with the supplied normalization function |
1069
|
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
sub normalize |
1071
|
|
|
|
|
|
|
{ |
1072
|
11
|
|
|
11
|
1
|
4142
|
my $func = shift; |
1073
|
|
|
|
|
|
|
|
1074
|
11
|
|
|
|
|
104
|
$apostrophe = $func->($apostrophe); |
1075
|
11
|
|
|
|
|
81
|
$hyphen = $func->($hyphen); |
1076
|
11
|
|
|
|
|
838
|
%namecase_exceptions = map { $func->($_) => $func->($namecase_exceptions{$_}) } keys %namecase_exceptions; |
|
4803
|
|
|
|
|
24581
|
|
1077
|
11
|
|
|
|
|
616
|
%namecase_exceptions_full = map { $func->($_) => $func->($namecase_exceptions_full{$_}) } keys %namecase_exceptions_full; |
|
146
|
|
|
|
|
1076
|
|
1078
|
11
|
|
|
|
|
110
|
%fnamecase_exceptions_full = map { $func->($_) => $func->($fnamecase_exceptions_full{$_}) } keys %fnamecase_exceptions_full; |
|
73
|
|
|
|
|
464
|
|
1079
|
11
|
100
|
|
|
|
2695
|
$keys_namecase_exceptions = $func->($keys_namecase_exceptions) if defined $keys_namecase_exceptions; |
1080
|
11
|
|
|
|
|
116
|
%namesplit_exceptions = map { $func->($_) => $func->($namesplit_exceptions{$_}) } keys %namesplit_exceptions; |
|
254
|
|
|
|
|
1773
|
|
1081
|
11
|
|
|
|
|
180
|
%split_starter = map { $func->($_) => 1 } keys %split_starter; |
|
603
|
|
|
|
|
1694
|
|
1082
|
11
|
|
|
|
|
106
|
$kcben = $func->($kcben); |
1083
|
11
|
|
|
|
|
41
|
$kcbean = $func->($kcbean); |
1084
|
|
|
|
|
|
|
|
1085
|
11
|
|
|
|
|
586
|
%family_names_ck = map { $func->($_) => 1 } keys %family_names_ck; |
|
5787
|
|
|
|
|
14250
|
|
1086
|
11
|
|
|
|
|
620
|
$family_names_ck_re = qr/(?:@{[join '|', keys %family_names_ck]})/; |
|
11
|
|
|
|
|
19616
|
|
1087
|
11
|
|
|
|
|
3754
|
%family_names_ck_roman = map { $func->($_) => 1 } keys %family_names_ck_roman; |
|
18288
|
|
|
|
|
57135
|
|
1088
|
11
|
|
|
|
|
2401
|
$family_names_ck_roman_re = qr/(?:@{[join '|', keys %family_names_ck_roman]})/i; |
|
11
|
|
|
|
|
49612
|
|
1089
|
11
|
|
|
|
|
1278
|
%family_names_v_roman = map { $func->($_) => 1 } keys %family_names_v_roman; |
|
1971
|
|
|
|
|
5914
|
|
1090
|
11
|
|
|
|
|
270
|
$family_names_v_roman_re = qr/(?:@{[join '|', keys %family_names_v_roman]})/i; |
|
11
|
|
|
|
|
9472
|
|
1091
|
|
|
|
|
|
|
|
1092
|
11
|
|
|
|
|
237
|
@family_names_chinese = map { $func->($_) } @family_names_chinese; |
|
4895
|
|
|
|
|
10616
|
|
1093
|
11
|
|
|
|
|
177
|
@family_names_chinese_roman = map { $func->($_) } @family_names_chinese_roman; |
|
23320
|
|
|
|
|
58735
|
|
1094
|
11
|
|
|
|
|
165
|
@family_names_korean = map { $func->($_) } @family_names_korean; |
|
7997
|
|
|
|
|
17941
|
|
1095
|
11
|
|
|
|
|
86
|
@family_names_korean_roman = map { $func->($_) } @family_names_korean_roman; |
|
10615
|
|
|
|
|
25410
|
|
1096
|
11
|
|
|
|
|
82
|
@family_names_vietnamese = map { $func->($_) } @family_names_vietnamese; |
|
2442
|
|
|
|
|
6485
|
|
1097
|
|
|
|
|
|
|
} |
1098
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
1; |