Project

hypocorism

0.0
No commit activity in last 3 years
No release in over 3 years
A tool for matching English first names with their shortened version.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Hypocorism

http://en.wikipedia.org/wiki/Hypocorism

A tool for matching English first names with their shortened version.

Usage

To determine if a one version of a person's first name matches another version, use Hypocorism.match:

Hypocorism.match('Robert', 'Rob') == true
Hypocorism.match('Dave', 'David') == true
Hypocorism.match('Rob', 'David') == false

To find the names that match a given first name, use Hypocorism.variations_of:

Hypocorism.variations_of('Aaron') == ["Aaron", "Ron", "Ronni", "Ronnie", "Ronny", "Ronney", "Erin", "Ronald"]

However, note that some short names are used across a number of names. So

Hypocorism.variations_of('Ron')

Will return:

[
  "Aaron", "Ron", "Ronni", "Ronnie", "Ronny", "Ronney", "Erin", "Ronald",
  "Cameron", "Cam", "Naldo", "Ronaldo", "Roland", "Reginald", "Veronica",
  "Franki", "Frankie", "Franky", "Frankey", "Ronna", "Vonni", "Vonnie",
  "Vonny", "Vonney", "Froni", "Fronie", "Frony", "Froney", "Vicki", "Vickie",
  "Vicky", "Vickey"
]

Source data

This tool uses data from this source:

http://cpansearch.perl.org/src/BRIANL/Lingua-EN-Nickname-1.17/nicknames.txt