Skip to contents

Parse names

Top-level entry points for turning raw names into structured components.

parse_name()
Parse a Full Name into Components
parse_names()
Parse a Vector of Names

Prepare & clean

Sanitize and normalize raw name strings before parsing.

sanitize_input()
Sanitize Raw Name Input
prep_name()
Prep a Name for Parsing
de_clutter()
Remove Nuisance Text From a Name
trim_spaces()
Collapse and Trim Whitespace
remove_punctuation()
Remove Punctuation
fix_locative_surnames()
Fix Locative or Compound Surnames by Adding Dashes
remove_elements()
Remove Character Elements From a Vector
extract_component()
Extract Specific Name Components

Name types and run-together names

Set aside organisations, placeholders and couples, and split names written as one word.

classify_names()
Classify Names as People, Organisations or Placeholders
split_run_together()
Split a Surname and Given Name Written as One Word

Census-based inference

Resolve name ordering, surnames, and gender from census frequencies.

get_census_data()
Look Up Census Name-Frequency Data for a Character Vector
check_if_surname()
Check Whether Tokens Read as Surnames
determine_gender()
Infer Gender from a Census Name Matrix
determine_surname()
Determine the Surname (Last Name) Position
assign_names()
Parse Core Name Components and Gender
resolve_middle_name()
Resolve Middle Names as Potential Surnames

Nicknames and canonical first names

Formal names, nicknames, spelling variants and one canonical form per first name.

nickname_lookup()
Look up nicknames, formal names and a canonical form for first names
canonical_first_name()
Canonical first name
first_name_variants()
All variants in a first name's family
get_formal_names()
Formal names of a nickname
get_nicknames()
Nicknames of a formal first name
first_name_pairs
First-name variants: nicknames, spellings, cognates and compounds.

Reference data

Bundled datasets and lookup tables.

census.names
U.S. Census first-name and surname frequencies.
known_titles()
Known Titles and Abbreviations
prx
Known Prefix (Salutation / Title) Strings
sfx
Known Suffix Strings
names_100
Sample of 100 Names for Testing
names_1000
Sample of 1,000 Names for Testing
get_example_names()
Build a test sample of names from IRS 990s