A name parsing library
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fixtures
lib
spec
.gitignore
CHANGELOG.md
Gemfile
LICENSE
README.md
Rakefile
human_name_parser.gemspec

README.md

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"