whatsername
Figure out what someone's name actually is.
whatsername is a deterministic Python parser that splits a raw author-name
string into structured components — title, first, middle, last, suffix,
nickname — across Latin, Chinese, Japanese, Korean, Cyrillic, and Arabic /
Persian scripts. It's the name parser extracted from the
OpenAlex author entity resolution pipeline.
It is deterministic and fast (no network, no model weights), and every parse comes with a confidence score so you can route the hard cases to a human or an LLM.
from whatsername import parse_name
parse_name("John Maynard Smith")
# {'first': 'john', 'middle': 'maynard', 'last': 'smith', 'confidence': 'medium', ...}
# (3 tokens, no surname prefix -> the boundary is a guess, hence 'medium')
parse_name("Smith, John M.") # comma form -> surname is explicit
# {'first': 'john', 'middle': 'm.', 'last': 'smith', 'confidence': 'high', ...}
parse_name("John M. Harris Jr MD") # post-nominal credentials removed
# {'first': 'john', 'middle': 'm.', 'last': 'harris', 'suffix': 'jr', ...}
parse_name("张伟") # Chinese: surname-first
# {'first': 'wei', 'last': 'zhang', 'confidence': 'medium', ...}
Install
pip install whatsername
For better romanization of Japanese, Korean, and Cyrillic names, install the optional extra (the parser still works without it, at lower confidence):
pip install "whatsername[cjk]"
What you get back
parse_name(s) returns a dict. All string values are lowercase ASCII (diacritics
removed, apostrophes dropped, hyphens and initials' periods preserved), or None.
| key | example | notes |
|---|---|---|
title |
dr. |
recognized academic/professional titles |
first |
john |
given name |
middle |
maynard |
middle name(s) / patronymic |
last |
smith |
family name (compound prefixes like van der kept) |
suffix |
jr., phd |
generational + post-nominal credentials |
nickname |
jack |
text found in (...) / [...] |
confidence |
high |
high | medium | low — threshold on this |
Confidence is the whole point of routing:
high— comma-delimited (Last, First), a clear compound surname prefix, or a simple 1–2 token Latin name.medium— 3+ token Latin with no prefix (surname boundary is a guess), or a CJK/Korean name resolved via the surname tables.low— Arabic/Persian (short vowels aren't written), ambiguous CJK, or Cyrillic transliteration. Good candidates to send to an LLM.
The OpenAlex-internal form
parse_human_name(s) returns the exact 6-field form OpenAlex uses for author
matching: empty strings instead of None, surname particles stripped from
last (so "de Oliveira" and "Oliveira" match), and a
nameparser HumanName fallback for
low-confidence Latin names.
Accuracy
Benchmarked against the public human-name-parser-gold-standard (15,309 OpenAlex author names):
| metric | accuracy |
|---|---|
| Full match (all 6 fields exact) | 88.8% |
last (family name) |
90.6% |
last (surname particles stripped, i.e. matching-relevant) |
91.4% |
first |
94.3% |
middle |
94.7% |
title / suffix / nickname |
≥99.5% |
Run it yourself:
pip install pytest
pytest tests/test_benchmark.py -s
The largest error sources are inherent and hard: compound-surname boundaries,
name-order disambiguation in romanized CJK names, and unusual scripts. That's
what the confidence field is for.
About the benchmark. The gold standard is LLM-annotated — each name was parsed by Claude Opus 4.6, not labeled by hand. It's a strong reference set but not infallible, especially on the same hard cases the parser struggles with (compound surnames, CJK name order, rare scripts). Treat the accuracy numbers as indicative, not gospel.
Why is this GPL-licensed?
whatsername depends on Unidecode for
transliteration (Chinese pinyin, Cyrillic, Arabic fallback), and Unidecode is
licensed under the GPL. A project that depends on a GPL library must itself
be GPL-compatible, so whatsername is released under the GPL-3.0-or-later.
If you need a permissively-licensed name parser, you'll want a different library
(or one that doesn't transliterate non-Latin scripts).
Credits
Built by OpenAlex / OurResearch as part of the author entity resolution (AER) work. The deterministic parser and its surname gazetteers come from the OpenAlex data pipeline; the benchmark was generated with Claude Opus 4.6. See the gold standard repo for the labeling protocol and reproduction harness.
License
GPL-3.0-or-later. See LICENSE.
Metadata
Release files for whatsername 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| whatsername-0.1.0.tar.gz | 782.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whatsername-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 831.6 kB
Release files / whatsername-0.1.0.tar.gz
| Download URL | whatsername-0.1.0.tar.gz |
|---|---|
| Size | 782.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b79b5cf4ff5a9342efc4b78a2aae4dbd16e159fe61fef75f5f543429f2037935
|
|
BLAKE2b-256 checksum How to use checksums |
fcf7f7501f3f8f8552284c98f44f891f4f2f7e5d82385eb2796b48096b94700d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / whatsername-0.1.0-py3-none-any.whl
| Download URL | whatsername-0.1.0-py3-none-any.whl |
|---|---|
| Size | 48.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eea9b849a9233aae7249170996734243b6c194105820625cc28583bbe3384deb
|
|
BLAKE2b-256 checksum How to use checksums |
46e26055f86c4c4880f2cc1e03296584caca6fe218c18cd8887f9a189358ea8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for whatsername 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.