hypocorism 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +40 -0
- data/data/nicknames.txt +563 -0
- data/lib/hypocorism.rb +39 -0
- data/test/hypocorism_test.rb +25 -0
- metadata +49 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzliMzEyN2VjN2NmODU5ODZhNjMyMDE4NmY4ZmNhNzU3NWY4ODVhNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NmZmZGI1ZjFlMTIxNmVkM2M0YWFmZTMwYTQ4MTliY2Y3YmUwMDU2NQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTJiNTYyNzkyOTFkNmViMjVkMTZhMTZkMDcyYjMwOTdjN2FjYTdkNzczNzA5
|
10
|
+
YTRhZmYyMmJiMmZlYTEwNDFhMDAzYjA3Y2YxNzM5YWZjNTYzMDI1MTZlMWZk
|
11
|
+
YWJmM2Y2NDkxNGEyOGU0OTcyZjcwM2Y3YzZhNTllNjNkMTIwOWE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTk4ODRiMGQyYWZmMWY1YzA2NTAwOTg5ZWM5ZGRjY2E2MzA4NjJiMDNmZmYx
|
14
|
+
OTNjNGJkN2M5NzU5MGEwNzVlNDgwODliODg5YjI1OTJmMTMwMzg3ZTkzMDI1
|
15
|
+
ZGVkODZjNDk4YWFlZDZkYjI2NzZiMjUzNzBlNjQzNmM2NjgxNTU=
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 Rob Nichols and Worcestershire County Council
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
Hypocorism
|
2
|
+
==========
|
3
|
+
|
4
|
+
http://en.wikipedia.org/wiki/Hypocorism
|
5
|
+
|
6
|
+
A tool for matching English first names with their shortened version.
|
7
|
+
|
8
|
+
Usage
|
9
|
+
-----
|
10
|
+
To determine if a one version of a person's first name matches another
|
11
|
+
version, use Hypocorism.match:
|
12
|
+
|
13
|
+
Hypocorism.match('Robert', 'Rob') == true
|
14
|
+
Hypocorism.match('Dave', 'David') == true
|
15
|
+
Hypocorism.match('Rob', 'David') == false
|
16
|
+
|
17
|
+
|
18
|
+
To find the names that match a given first name, use Hypocorism.variations_of:
|
19
|
+
|
20
|
+
Hypocorism.variations_of('Aaron') == ["Aaron", "Ron", "Ronni", "Ronnie", "Ronny", "Ronney", "Erin", "Ronald"]
|
21
|
+
|
22
|
+
However, note that some short names are used across a number of names. So
|
23
|
+
|
24
|
+
Hypocorism.variations_of('Ron')
|
25
|
+
|
26
|
+
Will return:
|
27
|
+
|
28
|
+
[
|
29
|
+
"Aaron", "Ron", "Ronni", "Ronnie", "Ronny", "Ronney", "Erin", "Ronald",
|
30
|
+
"Cameron", "Cam", "Naldo", "Ronaldo", "Roland", "Reginald", "Veronica",
|
31
|
+
"Franki", "Frankie", "Franky", "Frankey", "Ronna", "Vonni", "Vonnie",
|
32
|
+
"Vonny", "Vonney", "Froni", "Fronie", "Frony", "Froney", "Vicki", "Vickie",
|
33
|
+
"Vicky", "Vickey"
|
34
|
+
]
|
35
|
+
|
36
|
+
Source data
|
37
|
+
-----------
|
38
|
+
This tool use data from this source:
|
39
|
+
|
40
|
+
http://cpansearch.perl.org/src/BRIANL/Lingua-EN-Nickname-1.17/nicknames.txt
|
data/data/nicknames.txt
ADDED
@@ -0,0 +1,563 @@
|
|
1
|
+
Aaron Ron RonnE Erin Ronald
|
2
|
+
Abel Abe Ab Eb EbbE
|
3
|
+
Abiel Biel Ab
|
4
|
+
Abigail Ab AbbE Gail NabbE Tabitha
|
5
|
+
Abijah Ab Bige Abiah Ab Biah
|
6
|
+
Abner Ab AbbE
|
7
|
+
Abraham Abe Abram
|
8
|
+
Absalom Ab AbbE
|
9
|
+
Adaline Ada Adela Aline Edith AddE Dell Delia Lena Adelaide
|
10
|
+
Adam Ade EdE Ad
|
11
|
+
Adelaide AddE Adela Adaline Adeline Della Heide Adele Dell HeidE Adeliza Liza Adelia Elizabeth
|
12
|
+
Adelbert Albert Del Delbert Bert Ad Ade Elbert
|
13
|
+
Adelphia Adele AddE Dell Delphina PhillE Adeline
|
14
|
+
Agatha AddE Ag AggE Agnes
|
15
|
+
Agnes AggE Ann NancE NessE Inez Nessa
|
16
|
+
Aileen Helen AllE Lena Eileen Eileen Helen
|
17
|
+
Alanson Al Lanson Alan Lonson
|
18
|
+
Albert Al Bert Bird Elbert Adelbert
|
19
|
+
Alberta Abertina Albertine AllE Bert BertE Elbert
|
20
|
+
Alderick Al Rich RichE
|
21
|
+
Aleva Leve LevE
|
22
|
+
Alexander Alec Alex Alexey Alexei AndE Ec SandE Al Eleck Sasha
|
23
|
+
Alexandria Alla EllE Elic Sandra Alexandra Lexa Xan Alex SandE Sasha Cassandra Cass CassE
|
24
|
+
Alfred Al Alf AlfE Fred FreddE
|
25
|
+
Alfreda AlfE Frieda FreddE Freda
|
26
|
+
Alice Alicia Elicia ElsE AllE Lisa Alison AlE ElE Alisha Elisha Lish Ellis Elicia
|
27
|
+
Almena AllE Mena
|
28
|
+
Almina MinnE
|
29
|
+
Almira Myra
|
30
|
+
Alonzo Al Alphonzo Lon Lonzo
|
31
|
+
Alphinias Alphus Aphinius Phineas Finnius
|
32
|
+
Althea Thea
|
33
|
+
Amalia AmE MollE
|
34
|
+
Amanda Armanda Manda MandE
|
35
|
+
Amelia AmE EmilE Mel Melia MillE MollE Parmelia MellE Permelia Mildred
|
36
|
+
Amos Moses
|
37
|
+
Anastasia Ana StacE
|
38
|
+
Anderson Ander AndE SonnE Ance Andre
|
39
|
+
Andrea Andria AndE
|
40
|
+
Andrew AndE Drew Andrei Andrey Andreas
|
41
|
+
Angela Angelica Angelina Angeline AngE Jane Lena
|
42
|
+
Anna Ann Anne AnnE Hannah Nan NannE NancE Nana Susanna Annette Maryanne Christina Antoinette Roseanne Hannah
|
43
|
+
Anselm Anse Ance Ansel
|
44
|
+
Anthony TonE Antonio Antoine
|
45
|
+
Antoinette Antonia Net NettE Ann TonE Netta
|
46
|
+
Aphrodite Dite Ditus Dyce Dyche Eppa Epaphroditus Epaphroditius
|
47
|
+
Appoline AppE
|
48
|
+
Aquilla Quil QuillE Acuilla Quilla
|
49
|
+
Arabella Ara Bella Belle Arabelle Anabelle Bell ArrE Isabella Mehitabel
|
50
|
+
Archibald ArchE BaldE Baldo Arch Archelous
|
51
|
+
Ardeshir ArdE
|
52
|
+
Arielle ArE
|
53
|
+
Aristotle TellE
|
54
|
+
Arlene Lena ArlE
|
55
|
+
Armena ArrE Mena
|
56
|
+
Armilda MillE
|
57
|
+
Arminda MindE
|
58
|
+
Arnold ArnE Ronald
|
59
|
+
Arthur Art
|
60
|
+
Arzada ZaddE
|
61
|
+
Asaph Asa Asahel
|
62
|
+
Asenath Assene Sene NattE
|
63
|
+
Aubrey Bree
|
64
|
+
Audrey Dee
|
65
|
+
Augusta Augustina AggE AugE GusE GussE Tina Gus August Augusta
|
66
|
+
Augustus Augustine Gus Gustus GatsE GatsbE GussE August
|
67
|
+
Aurelia Aurilla Orilla Ora RillE
|
68
|
+
Aurilla Ora RillE Orilla
|
69
|
+
Avarilla Rilla
|
70
|
+
Azariah Aze Riah Azarich Tiah
|
71
|
+
Azubah Zubiah
|
72
|
+
Barbara Babs Barb BarbE BobbE Bab BabbE BarbarE BarberE Bar
|
73
|
+
Barnabas BarnE Barnard Bernard BernE
|
74
|
+
Barry BerrE Bar Bear
|
75
|
+
Bartholomew Bart Bartel Barth Bat Mees Meus
|
76
|
+
Bazaleel Basil
|
77
|
+
Beatrice Bea Trisha TrissE TrixE Trix
|
78
|
+
Bedelia Delia Bridgit Fidelia Phidelia Delia Cordelia Adelaide
|
79
|
+
Belinda Bell Belle Linda Lynne Lyn Melinda Linda Philinda
|
80
|
+
Benedict Bennett Ben BennE
|
81
|
+
Benjamin Ben BenjE BennE JamE
|
82
|
+
Bertha BertE BridE Bert
|
83
|
+
Bertram Bert
|
84
|
+
Beverly BeverlE Bev
|
85
|
+
Blanche Bea
|
86
|
+
Boetius Bo
|
87
|
+
Bonita BonnE
|
88
|
+
Bradford Brad Ford BradlE
|
89
|
+
Brian Bryan Bryant Ryan Rian
|
90
|
+
Bridget BiddE BridE BrE Delia BridgE
|
91
|
+
Broderick RickE BradE BrodE Richard
|
92
|
+
Caldonia CallE Dona
|
93
|
+
Caleb Cal
|
94
|
+
California CallE
|
95
|
+
Calista KissE
|
96
|
+
Calpurnia CallE
|
97
|
+
Calvin Cal Vin VinnE
|
98
|
+
Cameron Cam RonnE Ron
|
99
|
+
Camille CammE MillE
|
100
|
+
Campbell Cam
|
101
|
+
Candace CandE DacE
|
102
|
+
Carlotta LottE
|
103
|
+
Carmellia Mellia
|
104
|
+
Caroline CaddE Carol Carole CarrE CassE Lynn Carolyn CallE Carolina Lena Orolia KerE KarE
|
105
|
+
Carthaette Etta EttE
|
106
|
+
Casey KasE KC
|
107
|
+
Caswell Cass
|
108
|
+
Cecilia Celia CissE CecilE Cilla CecelE
|
109
|
+
Cedrick Ced Rick RickE
|
110
|
+
Celeste Celia LessE
|
111
|
+
Celinda Linda LindE Lynn
|
112
|
+
Charity Chat
|
113
|
+
Charles Buck Carl Chad CharlE Chick Chuck Karl Karel Chip
|
114
|
+
Charlotte Car Carlotta LettE Lotta LottE Char SherrE LollE
|
115
|
+
Chauncy Chan
|
116
|
+
Chesley CheslE Chet
|
117
|
+
Chloe Clo
|
118
|
+
Christian Chris Christopher Kit
|
119
|
+
Christiana Christine Chris CrissE ChristE Tina Xina Christina Kris KerstE Xena Cristina Cris KristE Kristine
|
120
|
+
Christopher Chris Christian Kester Kit
|
121
|
+
Clarence Clair Clare
|
122
|
+
Clarissa Clarinda Clarice Clair Clara Clare CissE Claire Belinda Melinda Philinda
|
123
|
+
Cleatus Cleat
|
124
|
+
Clement Clem
|
125
|
+
Clementine Clem
|
126
|
+
Clifford Cliff Ford
|
127
|
+
Clifton Cliff TonE
|
128
|
+
Columbus Lum Clum
|
129
|
+
Conrad Con ConnE
|
130
|
+
Constance ConnE
|
131
|
+
Content TentE
|
132
|
+
Cordelia CordE Delia Adelaide Bedelia Fedelia
|
133
|
+
Corinne Cora
|
134
|
+
Cornelia CornE NeelE Nelle NellE Nelia
|
135
|
+
Cornelius Neil NeelE Cono ConnE Niel Neal
|
136
|
+
Courtney Court Curt
|
137
|
+
Curtis Curt Kurtis Kurt
|
138
|
+
Cynthia CindE Lucinda Cinthia
|
139
|
+
Cyrenius Cene Cy Renius Serene Swene
|
140
|
+
Cyrus Cy Si
|
141
|
+
Dalton Dahl Dal
|
142
|
+
Daniel Dan DannE Danial
|
143
|
+
Danielle DanE Danelle
|
144
|
+
Daphne Daph DaphE
|
145
|
+
Darlene Lena DarrE
|
146
|
+
Darwin DarE
|
147
|
+
David DavE Dave Day
|
148
|
+
Deborah Deb DebbE Debora Debbe Debi Debra
|
149
|
+
Deidre DeeDee
|
150
|
+
Delbert Bert Del Dilbert
|
151
|
+
Delilah Dell Della Lil Lila
|
152
|
+
Deliverance Della DellE DillE
|
153
|
+
Delores Dee DodE Lola Dell LollE Della
|
154
|
+
Demerias Demaris Maris Dimmis Damaris
|
155
|
+
Democrates Mock
|
156
|
+
Denise Denys Denyse
|
157
|
+
Dennis DennE Dennison
|
158
|
+
Derrick Eric Rick RichE Dirch
|
159
|
+
Desiree DesE Desree DesrE DesirE
|
160
|
+
Diana Diane Di DicE
|
161
|
+
Dominic Dom Nick
|
162
|
+
Donald Don DonnE
|
163
|
+
Dorothy Dee DollE Dot Dotha DottE Dode DodE Dortha Doda Dora Dorothea Dorinda Doris Medora
|
164
|
+
Douglas Doug
|
165
|
+
Drusilla Silla
|
166
|
+
Duane Dewayne Dwayne Dwane
|
167
|
+
Duncan Dunk
|
168
|
+
Earnest Ernest ErnE
|
169
|
+
Ebenezer Eb Eben EbbE
|
170
|
+
Edith DicE EdE Edna EdnE
|
171
|
+
Edmund Ed Ned Ted Edward Sigismund
|
172
|
+
Edward Ed Ned Ted Edgar Edmund EddE TeddE
|
173
|
+
Edwin Ed Ned Win Edward
|
174
|
+
Edwina WinnE Edward
|
175
|
+
Egbert Bert Burt
|
176
|
+
Elaine Helen LainE Alaina Elaina Eleanor
|
177
|
+
Elbertson Elbert Bert
|
178
|
+
Eleanor Elaine Ella Ellen Helen Lanna Leonora Nell NellE Nora EllE Elenora Elinamifia Elnora Honora
|
179
|
+
Eleazer Lazar
|
180
|
+
Electra Electa Lecta
|
181
|
+
Elias ElE Lee Lias
|
182
|
+
Elijah ElE Lige Lig
|
183
|
+
Eliphalet Left Eliphal FallE
|
184
|
+
Elizabeth Bess BessE Beth BettE Elis Elissa ElsE LibbE Liz Liza Lizabeth LizzE Tess BitsE Eliza LiddE Lisa Lise Lib BetsE Bethia BaisE BaissE Alice Alisha
|
185
|
+
Elmira Mira Myra EllE
|
186
|
+
Elsie Alice Elizabeth Elizabeth
|
187
|
+
Elwood Ells EllE WoodE
|
188
|
+
Emanuel MannE Manuel Immanuel
|
189
|
+
Emeline Emmer EmmE Lina MillE Em Emma Emeline Emiline Erma Emm EmilE Amelia
|
190
|
+
Enedina Nina
|
191
|
+
Ephraim Eph
|
192
|
+
Eric Rick RickE Derrick
|
193
|
+
Ernestine Erna Tina
|
194
|
+
Eseneth SenE
|
195
|
+
Estella EssE Stella Estelle
|
196
|
+
Eudora Dora Dorothy
|
197
|
+
Eudoris DosE DossE
|
198
|
+
Eugene Gene
|
199
|
+
Eugenia Euy Gene GenE JennE
|
200
|
+
Euphemia EffE
|
201
|
+
Euphrosina Fenee Fena RosE
|
202
|
+
Eurydice DicE
|
203
|
+
Eustacia Stacia StacE
|
204
|
+
Evaline Eva Eve Lena
|
205
|
+
Evangeline VangE
|
206
|
+
Evelyn Ev Eve Evelina Evelyn
|
207
|
+
Experience PeddE
|
208
|
+
Ezekiel Ez Zeke
|
209
|
+
Ezra Ez
|
210
|
+
Faith Fay
|
211
|
+
Felicity Flick Tick Felicia
|
212
|
+
Ferdinand FerdE
|
213
|
+
Fidelia Phidelia Delia Delia Cordelia Adelaide
|
214
|
+
Florence Flo Flora Floss FlossE
|
215
|
+
Floyd Lloyd
|
216
|
+
Frances Fan FannE Fran Sis CissE
|
217
|
+
Francis Frank FrankE Frankisek Franklin Franz
|
218
|
+
Frederica Fredricka Freda FreddE Ricka Frieda
|
219
|
+
Frederick Fred Fredric Frederik Fredrik FreddE Frish Fritz Frits
|
220
|
+
Fredonia Donia Donna
|
221
|
+
Gabriel Gabe GabbE
|
222
|
+
Gabrielle Ella GabbE Gabriella
|
223
|
+
Gabrilla Rilla Gabrielle
|
224
|
+
Gary Garry
|
225
|
+
Genevieve GencE JinsE JennE Eve Jean Gen Neva Jane Virginia
|
226
|
+
George Jorge
|
227
|
+
Georgia Georgiana Gee
|
228
|
+
Gerald JerrE GerrE Jeremiah
|
229
|
+
Geraldine Dina GerrE JerrE DeannE GerE
|
230
|
+
Gerhardt Gay
|
231
|
+
Gertrude GattE GertE TrudE Gert
|
232
|
+
Gilbert Bert Gib Gil Wilber
|
233
|
+
Gloria GlorE
|
234
|
+
Greenberry BerrE Green
|
235
|
+
Gregory Greg Gregg
|
236
|
+
Gretchen Margaret
|
237
|
+
Griselda Grissel
|
238
|
+
Gwendolyn Gwen WendE
|
239
|
+
Hamilton Ham Hamp
|
240
|
+
Hannah Anna Nan NannE Susannah Joanna Susannah Anna
|
241
|
+
Harold Hal HarrE Hank Henry
|
242
|
+
Harriet HattE
|
243
|
+
Helena Helen Aileen Eileen Elaine Eleanor Ellen Lena Nell NellE Helene Ella Elena Ellender Eleanor
|
244
|
+
Hendrick Henk Henry
|
245
|
+
Henrietta Etta Hank HettE NettE Retta EttE
|
246
|
+
Henry Hal Hank HarrE Hen Hence Harold
|
247
|
+
Hepsabah HepsE Hepsibah Hephsibah Hebsabeth Hepsabel Elizabeth Rosabella
|
248
|
+
Herbert Bert Herb
|
249
|
+
Herman Harman
|
250
|
+
Hermione Hermoine HermE
|
251
|
+
Hester Esther HessE HettE EssE
|
252
|
+
Hezekiah Hez Ky Hy Kiah
|
253
|
+
Hiram Hy HilE
|
254
|
+
Honora HonE Nora Norah NorrE Eleanor
|
255
|
+
Hopkins Hop Hopp
|
256
|
+
Horace Horatio HorrE
|
257
|
+
Hortense TensE
|
258
|
+
Hosea HosE
|
259
|
+
Howard Hal HowE
|
260
|
+
Hubert Hugh Hugo Bert Hub
|
261
|
+
Ignatius IggE Nace Nate Natius
|
262
|
+
India IndE
|
263
|
+
Iona OnnE
|
264
|
+
Irene Rena RennE ReenE
|
265
|
+
Irvin Irving
|
266
|
+
Irwin Erwin
|
267
|
+
Isaac Ike Zeke
|
268
|
+
Isabella Isabelle Bella Belle Elizabeth Ib IssE Nib Sabe Sabra TibbE Isabel Rosabella NibbE Arabella Rosabella
|
269
|
+
Isaiah ZadE Zay
|
270
|
+
Isidora Dora IssE
|
271
|
+
Isidore IzzE
|
272
|
+
Jacob Jake Jaap Jay Jacobus
|
273
|
+
Jacqueline JackE JakE Jacque Jaclyn Jacklyn Jaclin Jacklin
|
274
|
+
James JamE Jim Jameson Jem JimmE
|
275
|
+
Jane Janet JanE JessE JennE Joan Joanna Virginia Janette Jean JincE JinsE Jeanne NettE Jan Janett Janice Janyce Jayce Jc Janiece Genevieve Virginia Joanna
|
276
|
+
Jasper Casper
|
277
|
+
Jedediah Diah Dyer Jed Jedidiah
|
278
|
+
Jefferson Jeff SonnE JeffrE GeoffrE Geoff Jeffery
|
279
|
+
Jehiel Hiel
|
280
|
+
Jehu Jayhugh Gee Hugh John
|
281
|
+
Jemima Jemma MimE Mima
|
282
|
+
Jennet JessE
|
283
|
+
Jennifer Winifred JennE Winifred
|
284
|
+
Jeremiah JeremE JerrE Jereme
|
285
|
+
Jerita Rita Margarita Rosarita
|
286
|
+
Jessica Jess Jesse JessE Jane Virginia
|
287
|
+
Joanna Jane Jean Joan JodE Johanna NonE Joannah Johannah Hannah Joann Joanne Anna Hannah Suzannah
|
288
|
+
John Hans Ian Ivan Jack Jan Jean Jaques Jock JackE JohnnE Jackson Johnathan
|
289
|
+
Jonathan John JohnnE Jonathan Nathan Nathaniel John
|
290
|
+
Joseph Joe Joey Jos JodE Josefa
|
291
|
+
Josephine Josepha PhenE Jo Joey JosE Fina JodE
|
292
|
+
Joshua Josh Jos
|
293
|
+
Josiah Jos Si Joseph
|
294
|
+
Joyce Joy
|
295
|
+
Juanita Nita NettE
|
296
|
+
Judah JudE
|
297
|
+
Judith JudE
|
298
|
+
Judson Jud SonnE
|
299
|
+
Julia Jill JulE Juliet
|
300
|
+
Julias Julius Julian Jule
|
301
|
+
Junior Jr June JunE
|
302
|
+
Justin Justus
|
303
|
+
Karonhappuck CarrE Karen Karon HappE
|
304
|
+
Katherine Katarina Kathleen CathE Kat KitsE KittE Kate KatE KathE Kit Kay Trina Tina Lena Cathleen Catherine CassE Karen Kathryn Katherina Kathe
|
305
|
+
Kendra Kenj KenjE
|
306
|
+
Kenneth Ken KennE Kendall Kendrick Kent
|
307
|
+
Keziah KezzE Kizza Kid
|
308
|
+
Kimberly KimberlE KymberlE Kim Kym KimmE
|
309
|
+
King Kingston KingslE
|
310
|
+
Lafayette Fate Left LeffE LaffE
|
311
|
+
Lamont MontE
|
312
|
+
Laodicia DicE Cenia
|
313
|
+
Laurinda Lorinda Laura
|
314
|
+
Lauryn LaurE LorrE
|
315
|
+
Laverne Verna
|
316
|
+
Lavinia VinE Wyncha Lavina Ina Vina VinnE Louvina Louvinia
|
317
|
+
Lawrence LarrE Lars Laurence LawrE Lon LorrE LonnE Lorne
|
318
|
+
Lecurgus Curg
|
319
|
+
Lemuel Lem
|
320
|
+
Leonard Leo Leon Len LennE Lineau Lenhart
|
321
|
+
Leonidas Leonida Leon Leo
|
322
|
+
Leonora Loenore Elenor Nora Lee Eleanor
|
323
|
+
Leroy Lee Roy LR
|
324
|
+
Leslie Les Lester
|
325
|
+
Lester Les
|
326
|
+
Letitia LettE Lettice Titia Tish
|
327
|
+
Levi Lee
|
328
|
+
Lewvisa VicE
|
329
|
+
Libuse Liba LibbE
|
330
|
+
Lillian Lil LilE LillE LollE Lillah
|
331
|
+
Lincoln Link
|
332
|
+
Linda LindE Lynn LyndE Lynette Linette LydE Lidia LyddE LiddE Belinda Melinda Philinda
|
333
|
+
Lionel Leon
|
334
|
+
Littleberry BerrE Lb Little
|
335
|
+
Lois Heloise Louise
|
336
|
+
Lorenzo Loren
|
337
|
+
Loretta Etta Laura LorrE Retta
|
338
|
+
Loretta Retta Lorraine
|
339
|
+
Lorraine LorrE Rana
|
340
|
+
Lotta LottE Charlotte Charlotta
|
341
|
+
Luann Luanne Louanne Louann Lulu Lou Ann Anne AnnE Anna Louise
|
342
|
+
Louis Lewis Lou Louie
|
343
|
+
Lousie Eloise Elouise Louise Heloise Eliza Lois Lou Lulu Louisa Louetta Loretta
|
344
|
+
Luciana Lucia LucE CindE Lucinda Cynthia
|
345
|
+
Lucias Lucas Luke
|
346
|
+
Lucille Ceall Cille LucE Lu Lou
|
347
|
+
Lucinda CindE LucE Lu Lou Cynthia
|
348
|
+
Lucretia CreasE Crese Crece
|
349
|
+
Luella Ella Lu Lula
|
350
|
+
Lurana Lura
|
351
|
+
Luthor Luke
|
352
|
+
Lyndon Lynn LyndE LindE
|
353
|
+
Madeline Lena MaddE Madge MaggE Maud MiddE Magda Maida Madeleine Magdalena
|
354
|
+
Magdelina Lena Madge Magda Magdalen Maida Madeline
|
355
|
+
Mahalla HallE
|
356
|
+
Malcolm Mac Mal MalachE
|
357
|
+
Manerva Minerva Nerva NervE
|
358
|
+
Manoah Noah
|
359
|
+
Manuel Emanuel MannE
|
360
|
+
Marcus Mark Marc
|
361
|
+
Margaret DaisE Greta Madge MaggE MaisE Marge Margo Peg Meg Metta Midge PeggE Margaretha Meta Gretta Rita MargerE MarjorE MargE Margaretta Megan Mary Margarita
|
362
|
+
Margarita Rita Margauerite Rosarita
|
363
|
+
Marianna Marian Ann Marianne Anne MarE Maria Mia Mary Anne
|
364
|
+
Marylou MarE Lulu Lou Mary Louise
|
365
|
+
Martha Mart MartE Mat MattE PatsE PattE MollE Patricia
|
366
|
+
Martin MartE
|
367
|
+
Marvin Marv Merv Mervyn
|
368
|
+
Mary Mae MamE Marietta Marion Maureen May MercE MinnE MitzE MollE PollE Moll MimE Mate Maura Moira Marilyn Maria Mariah Marian MarE Marcia Marica Maryanne Martha Margaret
|
369
|
+
Maryanne Marianne Maryanna Marianna MarE Ann Anne AnnE Mary Anna
|
370
|
+
Matilda Mat Tilda PattE TillE MattE Maud Mathilda
|
371
|
+
Matthew Matt Matthias Thias Thys
|
372
|
+
Maureen MarE ReenE Rena Mary
|
373
|
+
Maurice MaurE Morris MossE MorE
|
374
|
+
Mavine MaverE Mave
|
375
|
+
Maximillian Max
|
376
|
+
Maxine Max
|
377
|
+
Mehitabel HettE Mabel MittE HittE Bella Mehetable Mehitable Mehetabel Amabel
|
378
|
+
Melchizedek Dick Zadock
|
379
|
+
Melinda Linda LindE Mel MindE Lynne MellE Belinda Linda Philinda
|
380
|
+
Melissa Lisa Mel MillE MissE Lissa
|
381
|
+
Melody LodE
|
382
|
+
Melvina Vina
|
383
|
+
Mercedes MercE
|
384
|
+
Merlin Merlyn Merle
|
385
|
+
Mervyn Merv
|
386
|
+
Micajah Cager
|
387
|
+
Michael MickE Mike Mitchell Micah Mick
|
388
|
+
Michelle MickE ShellE
|
389
|
+
Mildred Mell MillE MimE
|
390
|
+
Millicent MillE MissE
|
391
|
+
Mindwell Mina Wilhelmina Minerva
|
392
|
+
Minerva Mina MinnE Nerva NervE
|
393
|
+
Miranda MandE Mira RandE
|
394
|
+
Miriam MarE MitzE MimE
|
395
|
+
Mitchell Michael Mitch
|
396
|
+
Mitzi MarE
|
397
|
+
Montgomery Gum MontE Montesque Lamont
|
398
|
+
Mortimer Mort
|
399
|
+
Moses Amos Mose Moss
|
400
|
+
Muriel Mur
|
401
|
+
Myrtle Mert Myrt MyrtE
|
402
|
+
Nadezhda Nadia
|
403
|
+
Nadine DeeDee Nada
|
404
|
+
Nancy Agnes Ann Nan Nance NannE Ann
|
405
|
+
Napoleon Leon Nap PonE NappE
|
406
|
+
Natalie NettE NattE TallE
|
407
|
+
Nathaniel Jonathan Nat NattE Nathan Nate Than FannnE Johnathan
|
408
|
+
Nelson Nels
|
409
|
+
Newton Newt
|
410
|
+
Nikolai Nicolay Nicholas
|
411
|
+
Nicholas Nick NickE Nicolas Claas Claes Nicodemus
|
412
|
+
Nicolena Nicole NikkE NickE Nicolene Nicolina
|
413
|
+
Ninell NettE
|
414
|
+
Noel Nowell Knowell
|
415
|
+
Norbert Bert NorbE
|
416
|
+
Norman Norm
|
417
|
+
Obadiah Diah Dyer Obe Obed ObE Jedediah
|
418
|
+
Obedience BiddE Obed Bede BeedE
|
419
|
+
Oberon Obe ObE
|
420
|
+
Octavia Tave Tavia
|
421
|
+
Odell Odo
|
422
|
+
Oliver OllE
|
423
|
+
Olivia Livia Olive OllE NollE LivE
|
424
|
+
Orlando Roland
|
425
|
+
Ophelia Phelia Orphelia
|
426
|
+
Oswald OssE Waldo OzzE
|
427
|
+
Othello Otis Ote
|
428
|
+
Pamela Pam
|
429
|
+
Pandora Dora
|
430
|
+
Parthenia ParsunE PasoonE PhenE PattE ThenE
|
431
|
+
Patience Pat PattE Patricia
|
432
|
+
Patricia Pat PatsE PattE Tricia TrixE Trish Tish
|
433
|
+
Patrick PaddE Pat PatsE Peter Patricia Pate Peter
|
434
|
+
Paulina Paula PollE Lina Pauline
|
435
|
+
Pelegrine PerrE
|
436
|
+
Penelope NeppE PennE
|
437
|
+
Percival Perce PercE
|
438
|
+
Permelia MellE MillE
|
439
|
+
Pernetta NettE
|
440
|
+
Peter Pete Pate
|
441
|
+
Pharaba FerbE Pherbia Pheriba
|
442
|
+
Pheney Josephine
|
443
|
+
Philadelphia Delphia Delpha Puss
|
444
|
+
Philetus Leet Phil
|
445
|
+
Philinda Linda Phyllis Belinda Linda Philinda
|
446
|
+
Philip Phil Pip
|
447
|
+
Philipina Phoebe PenE Phililpa
|
448
|
+
Philomena Mena
|
449
|
+
Phineas FinnE
|
450
|
+
Pleasant Ples Pleas
|
451
|
+
Pocahontas PokE
|
452
|
+
Posthuma HumE
|
453
|
+
Prescott Pres Scott ScottE
|
454
|
+
Priscilla Cil Cilla Ciller PrissE CissE Silla
|
455
|
+
Prudence DensE PrudE Prue Pru Puss
|
456
|
+
Quince Quint Quinn
|
457
|
+
Rachel Rae Ray Raech ShellE
|
458
|
+
Ramona Mona
|
459
|
+
Randolph Dolph Randall RandE
|
460
|
+
Raphael Raff Ralph
|
461
|
+
Raymond Ray
|
462
|
+
Rebecca BeckE Reba Becca Beck
|
463
|
+
Regina Gina Ray ReggE
|
464
|
+
Reginald Reg ReggE Reynold Renaldo Naldo RennE
|
465
|
+
Relief Leafa LeafE
|
466
|
+
Reuben Rube RubE
|
467
|
+
Rhodella Rhoda RhodE Dell Della
|
468
|
+
Richard Dick Rich Rick RichE Dickon Dickson RickE Ricardo
|
469
|
+
Robert Dob Dobbin Bob BobbE Roberto Rob Robin Rupert Hob Hobkin RobbE
|
470
|
+
Roberta Bert BobbE RobbE BertE BirdE
|
471
|
+
Rodney Rod RoddE Roger Reginald Ronald
|
472
|
+
Roger Hodge Hodgekin Rodger Roge Rod Rodney
|
473
|
+
Roland Orlando Rowland LannE Rollo RollE Roland Orlando Reginald
|
474
|
+
Ronald Ron RonnE Naldo Ronaldo Roland Reginald
|
475
|
+
Rosabella Rosable Belle Rosa Rose Roz Isabella Roseanne Rosarita Rosalyn
|
476
|
+
Rosalyn Rosalinda Rosa Rose Linda Roz Rose Linda Rosabella Roseanne Rosarita
|
477
|
+
Roseanne Roseann Rose Ann Roz RosE Roseanna Rox RoxE Roxanne Roxanna Roxane Rosabella Rosalyn Rosarita Anna
|
478
|
+
Rudolphus Adoph Adolf Dolf Dolph Rolf Rollo RudE Rudolph Olph Adolphus Ad Ado
|
479
|
+
Rufina Refina Fina
|
480
|
+
Russell Russ RustE
|
481
|
+
Sabrina Brina Sybrina ReenE Rena Serena Selina Serilla
|
482
|
+
Salvador Sal
|
483
|
+
Sampson Samson Sam
|
484
|
+
Samuel Sam SammE Samantha Samson
|
485
|
+
Sarah SadE Sal SallE Sara SurrE SukE
|
486
|
+
Selina Celina Lena Sabrina
|
487
|
+
Serilla Rilla
|
488
|
+
Seymour MorE MorrE Seymore
|
489
|
+
Sharon Sharyn SharrE Shar SharE SherE Sheron Sheryn Sheryl Cheryl
|
490
|
+
Shaun Sean Shawn Shane Shayne
|
491
|
+
Sheila Cecilia
|
492
|
+
Sheldon ShellE TonE Shelton Shel
|
493
|
+
Sheridan Dan DannE Sher
|
494
|
+
Shirley Lee SherrE Shirl
|
495
|
+
Sibbilla Sibyl Cibyl SibbE Sibbell
|
496
|
+
Sidney Sid SydnE Syd
|
497
|
+
Sigismund Sigmund Sig
|
498
|
+
Silas Si
|
499
|
+
Simeon Sim Simon Si Sion
|
500
|
+
Smith SmittE
|
501
|
+
Solomon Sal Salmon Sol SollE ZollE Saul
|
502
|
+
Sophronia Frona Fronia Sophia FronE SophE
|
503
|
+
Stephen Steve Steven Steph
|
504
|
+
Submit MittE
|
505
|
+
Sullivan SullE Van
|
506
|
+
Susannah Hannah Sue Susan SusE Suzanne SuchE Susanna SukE SuzE
|
507
|
+
Sylvester Si Sy Syl SlE Vet Vest Vester VessE Silvester Sylvanus Silver
|
508
|
+
Tabitha TabbE
|
509
|
+
Tamara TammE Temera Tamarra
|
510
|
+
Tasha Tash TashE
|
511
|
+
Temperance TempE TillE
|
512
|
+
Tennessee TennE
|
513
|
+
Terrence Terrance Terence TerrE
|
514
|
+
Thaddeus Tad Thad
|
515
|
+
Theodore Ted Theodrick Theodorick Tad Theo TeddE
|
516
|
+
Theodosia Dosia Theo Theodora Dora Theodore
|
517
|
+
Theophilus OphE Theo
|
518
|
+
Theresa Therese TerrE Tess TessE Thursa TicE TracE TrissE Thriza Teresa Thirsa Tessa
|
519
|
+
Thomas Thom Tom TommE
|
520
|
+
Thomasine Thomasa Tamzine
|
521
|
+
Tilford TillE Ford
|
522
|
+
Timothy Tim TimmE
|
523
|
+
Tipton TippE TipsE
|
524
|
+
Tobias Tobe TobE Bias
|
525
|
+
Tryphena Phena PhoenE PhenE Pheobe Tryphosia
|
526
|
+
Tryphosia PhosE Tryphenia
|
527
|
+
Uriah Riah
|
528
|
+
Valentina Val VallE ValerE Valeda
|
529
|
+
Vanessa Nessa Van VannE Vanna Essa
|
530
|
+
Vernisee NicE
|
531
|
+
Veronica FrankE RonnE Ronna VonnE FronE Ron VickE
|
532
|
+
Victor Vic Vick
|
533
|
+
Victoria TorrE TorE VickE
|
534
|
+
Vincent Vin Vince VinnE Vinson
|
535
|
+
Violet Viola Vi
|
536
|
+
Virgil Virg
|
537
|
+
Virginia Ginger GinnE Jane JennE JinE VirgE Gen VergE Gina Jane Genevieve
|
538
|
+
Vivian Vi
|
539
|
+
Vladimir Volodia
|
540
|
+
Waitstill WaitE
|
541
|
+
Waldo Oswald
|
542
|
+
Wallace WallE
|
543
|
+
Walter Wat Walt
|
544
|
+
Webster Webb
|
545
|
+
Wesley Wes
|
546
|
+
Wilber Wib Will Wilbur Gilbert
|
547
|
+
Wilda WillE
|
548
|
+
Wilfred Fred WillE Will
|
549
|
+
Wilhelmina HelmE Mina MinnE WillE Wilma
|
550
|
+
William Bill Will WillE BillE Bell Bela WilE Wilhelm Willis
|
551
|
+
Winfield Field Win WinnE Winifred
|
552
|
+
Winifred FreddE WinnE Winnet Wenefred Fred
|
553
|
+
Winton Wint
|
554
|
+
Woodrow Wood Drew WoodE
|
555
|
+
Yolanda Yolonda
|
556
|
+
Yulan Lan Yul
|
557
|
+
Zachariah Zach Zacharias ZacharE Zeke ZachE Rye
|
558
|
+
Zadock Dick Dock Melchizedek Zed
|
559
|
+
Zebedee Zeb
|
560
|
+
Zebulon Lon Zeb
|
561
|
+
Zedediah Zed Diah Dyer Jedediah Obediah
|
562
|
+
Zelphia Zel Zella ZelphE
|
563
|
+
Zepaniah Zeph
|
data/lib/hypocorism.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Hypocorism
|
2
|
+
|
3
|
+
VERSION = '0.0.1'
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def source_path
|
7
|
+
File.expand_path('../data/nicknames.txt', File.dirname(__FILE__))
|
8
|
+
end
|
9
|
+
|
10
|
+
def source
|
11
|
+
File.read(source_path).lines.collect &:split
|
12
|
+
end
|
13
|
+
|
14
|
+
def names
|
15
|
+
@names ||= source_with_e_varients
|
16
|
+
end
|
17
|
+
|
18
|
+
def match(name, another)
|
19
|
+
variations_of(name).include?(another)
|
20
|
+
end
|
21
|
+
|
22
|
+
def variations_of(name)
|
23
|
+
names.select{|n| n.include? name}.flatten.uniq
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
def source_with_e_varients
|
28
|
+
source.collect! do |line|
|
29
|
+
line.collect!{|m| /(.*)E$/ =~ m ? e_varients_of($1) : m}
|
30
|
+
line.flatten
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def e_varients_of(string)
|
36
|
+
%w{i ie y ey}.collect{|v| string + v}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','lib')
|
2
|
+
|
3
|
+
require "minitest/autorun"
|
4
|
+
require 'hypocorism'
|
5
|
+
|
6
|
+
class HypocorismTest < MiniTest::Unit::TestCase
|
7
|
+
def test_match
|
8
|
+
{
|
9
|
+
'Robert' => true,
|
10
|
+
'Bob' => true,
|
11
|
+
'Bobby' => true,
|
12
|
+
'Rob' => true,
|
13
|
+
'Dave' => false,
|
14
|
+
'Harry' => false,
|
15
|
+
'Mary' => false
|
16
|
+
}.each do |name, result|
|
17
|
+
assert_equal result, Hypocorism.match('Robert', name), "#{name} should#{' not' unless result} match Robert"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_variations_of
|
22
|
+
name_data = Hypocorism.names.first
|
23
|
+
assert_equal name_data, Hypocorism.variations_of(name_data.first)
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hypocorism
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rob Nichols
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A tool for matching English first names with their shortened version.
|
14
|
+
email: rob@undervale.co.uk
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/hypocorism.rb
|
20
|
+
- MIT-LICENSE
|
21
|
+
- README.md
|
22
|
+
- data/nicknames.txt
|
23
|
+
- test/hypocorism_test.rb
|
24
|
+
homepage: https://github.com/reggieb/hypocorism
|
25
|
+
licenses:
|
26
|
+
- MIT-LICENSE
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 2.1.10
|
45
|
+
signing_key:
|
46
|
+
specification_version: 4
|
47
|
+
summary: Allows Rob to be matched with Robert, Bobby and Bob
|
48
|
+
test_files:
|
49
|
+
- test/hypocorism_test.rb
|