https://github.com/tylerrick/nick_names
A database of first names and common substitute names (nick names) for each
https://github.com/tylerrick/nick_names
Last synced: 9 months ago
JSON representation
A database of first names and common substitute names (nick names) for each
- Host: GitHub
- URL: https://github.com/tylerrick/nick_names
- Owner: TylerRick
- License: mit
- Created: 2008-06-19T10:46:02.000Z (about 18 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T20:12:00.000Z (about 7 years ago)
- Last Synced: 2025-05-05T16:44:43.330Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: Readme
- License: License
Awesome Lists containing this project
README
NickNames
=========
This is a database of first name equivalence classes. Given a common first name, this class will return an array of possible substitute names (nick names).
This list of names can then be used to build a search in Rails that, for example, return all Bobs, if you search for Robert, and vice versa.
Example
=======
NickNames['bob'] == ["bill", "billy", "bob", "bobby", "rob", "robby", "robert"]
To build a nickname-insensitive
conditions = []
first_names_cond_sql = (["first_name SOUNDS LIKE ?"]*first_names.size).join(' OR ')
conditions << "((#{first_names_cond_sql}) AND last_name SOUNDS LIKE ?) AND (people.listed = ? AND users.state = ?)"
Credits
=======
Source of data: http://deron.meranda.us/data/nicknames.txt
Prepared by Deron Meranda
Based upon 1990 US Census Data and other various sources
Some data also from http://www.censusdiggins.com/
Plugin is copyright (c) 2008 Tyler Rick, released under the MIT license
The latest version can always be found at:
http://github.com/TylerRick/nick_names/tree/master
git://github.com/TylerRick/nick_names.git