Skip to content

abachman/human_name_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attempt to parse and categorize the parts of names. Almost entirely focused on "western" style names.

With code borrowed from:

Built for use in Tixato by Figure 53.

Install

gem install human_name_parser

Usage

require 'rubygems'
require 'human_name_parser'

name = HumanNameParser.parse 'George W. Bush Jr.'
name.first    # => 'George'
name.last     # => 'Bush'
name.initials # => 'GWB'
name.suffix   # => 'Jr.'
name.to_s     # => 'George W. Bush Jr.'

Development

~/ $ git clone ... && cd human_name_parser
~/ $ bundle install
~/ $ rake

TODO

Handle nicknames

Handle strangely placed commas

Handle multiple last names. e.g., "Björn Charles O'Malley y Muñoz"

Handle multiple first names. e.g., "Mary Joe Francis Smith"