Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/design/decisions/H8-salutation-ending-the-given-part.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Open: [#877](https://github.com/derek73/python-nameparser/issues/877) (whether a

## Log

- 2026-10-27, #766 — `heren` is no salutation: the plural never stands before one person's name, so its title reading was refused and with it its `after_given` mark (decisions/vocabulary-model's entry of this date). `Doe, Jan Heren` reads middle 'Heren' again, as 1.4.0 through 2.5.0 read it; the vetting below, which kept it on its small counts, is the record of 2026-10-24. `herren`, which that vetting excluded from `after_given`, left the titles too.

- 2026-10-24, #835 — A BARE SALUTATION ENDING A FAMILY COMMA'S GIVEN PART IS THE TITLE. `Doe, Jane Mrs` read middle 'Mrs' while `Doe, Jane Mrs.` (H5) and `Doe, John Jr Mr` (the salutation behind a post-nominal) read title, and `Doe, John Mr Jr` read middle 'Mr'; 1.4.0 and 2.5.0 read the first as middle 'Mrs' too (wheels checked 2026-10-24). The FEC's itemized contributions write `FAMILY, GIVEN MIDDLE SALUTATION` in capitals, the period often left off: on #834's `fec-individuals` corpus (file dated 2026-10-18, measured 2026-10-22, figures in #835) 13,243 names ended in a bare title word read as a middle name, `MR` 8,483 of them.
THE REASON H5's BARE-WORD CLAUSE DOES NOT REACH HERE. H5 keeps a bare title word at the end of a name as a name word because TITLES holds ordinary surnames (`Mary Jane King`). After a family comma the surname's place is marked, so only the middle-name reading is left against the title, and of the title kinds (#750) the salutation is the one that is a form of address and not something a person is named after. So the rule is keyed on that kind, and narrower than the kind: the property marks the salutations not borne as names.
THE VOCABULARY. A behavioral title property, `after_given = true`, allowed on a `salutation` reading only (a build check), compiles into `AFTER_GIVEN_TITLES` and the new `Lexicon.after_given_titles`; v1's `Constants` has no attribute for it, and `_snapshot()` intersects it with the titles, so deleting the title is the v1 knob. Considered and not taken: keying the rule on the `salutation` kind itself, with exclusions for the borne words — it makes a kind compile into a behavior, where every behavior so far is a property (decisions/vocabulary-model).
Expand Down
6 changes: 4 additions & 2 deletions docs/design/decisions/vocabulary-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ The vocabulary was a set of base sets plus marker subsets (`particles` and `part
- The titles take ten kinds beside the generic one, `academic` and `occupation` divided by function rather than subject, and the title keep-outs are exclusions — 2026-10-19 #750, title kinds; 2026-10-19 #750, the rest of the titles.
- `wm` is no title: William's abbreviation reads as the given name it is (`Wm Smith` → given 'Wm'), and its title reading is refused in en.toml — 2026-10-22 #789. The dotted `Wm.` opening the given part reads given too, by the reading below — 2026-10-26 #789.
- A given name written short is a `given` reading whose `same_as` is the full name, normalized and naming no entry, a `family` reading taking none; the word compiles into `GIVEN_NAME_ABBREVIATIONS` (`Lexicon.given_name_abbreviations`), which outranks rules/H2's shape and nothing else (decisions/H2). The traditional English abbreviations in en.toml (`chas`, `wm`) and the Filipino `ma` and `jo` in fil.toml carry one — 2026-10-23 #752; 2026-10-26 #789, phase 2k.
- A particle or salutation reading with no attested use in a person's name is refused rather than kept, its counts as name readings: `bon` and `dí` (und.toml) and `heer` (nl.toml) are no particles, and the plural salutations `herren` (de.toml) and `heren` (nl.toml) no titles, a plural never standing before one person's name — 2026-10-27 #766.
- Abbreviations and full words spelled alike across European languages (`dr`, `prof`, `doctor`, `professor`, `docent`) are in `mul.toml`; a credential goes to a file only on evidence that names in that language carry it, so none is in `mul.toml` — 2026-10-19 #750, the rest of the titles; 2026-10-20 #751, the credentials.
- `und.toml` holds only `bon` and `dí`, particles of unrecorded origin; every other word, the credentials, conjunctions, bound given names and birth markers included, is in a language file or in `mul.toml` — 2026-10-19 #749; 2026-10-20 #751, the conjunctions.
- `und.toml` holds only `bon` and `dí`, of unrecorded origin, their particle readings refused (below) and their name readings kept; every other word, the credentials, conjunctions, bound given names and birth markers included, is in a language file or in `mul.toml` — 2026-10-19 #749; 2026-10-20 #751, the conjunctions.

Not standing: the plans the classifications carried out, phase 1's mechanical conversion of the unclassified categories into `und.toml` (2026-10-18 #737) and the shared readings left in place until their categories were classified (2026-10-19 #749), both done by 2026-10-20 #751, the conjunctions; and #747's reason for exempting `und.toml`, its entries keeping the Python lists' order for its vetting comments to point along (2026-10-19 #747), overtaken once it held two entries and no such comment.

Open: #913 (the title words phase 2j left, read as titles though borne as names), #753 (phase 3, language packs), #754 (phase 4, order, shapes and the output model), #766 (whether `bon`, `dí` and three other words stay in the vocabulary).
Open: #913 (the title words phase 2j left, read as titles though borne as names), #753 (phase 3, language packs), #754 (phase 4, order, shapes and the output model).

## Log

Expand Down Expand Up @@ -218,6 +219,7 @@ Open: #913 (the title words phase 2j left, read as titles though borne as names)
- `dean`, `justice` and `major` gain an office or military reading beside a dated `given` one; `justice`'s exclusion (#606) is replaced by the reading. The batches of 2j declare the rest.
Adding the four fields changes `Lexicon`'s pickle layout, as phase 2h did.
- **2026-10-26 #752, phase 2i (Derek) — `attaches` MAY NAME A TITLE WORD AS WELL AS A KIND, AND `grace` AND `marshal` JOIN THE CONTESTED TITLES.** Amends the `attaches` bullet of the 2026-10-25 #752, phase 2i entry: a kind reaches every word that later joins it, and once `marshal` became a contested military word the military kind made `Sgt Marshal Smith` a title phrase. A list entry that is no kind must be a word with a title reading (a build check, its mutation in tests/v2/test_vocab.py). `major` attaches to `general` and `sergeant` and `sgt` to `major`. `grace` (style) and `marshal` (military, its #606 exclusion replaced) carry dated `given` readings. The measurement and Derek's answers are decisions/H9's entry of this date.
- **2026-10-27 #766 — FIVE UNATTESTED READINGS REFUSED: `bon`, `dí` and `heer` are no particles, `herren` and `heren` no titles.** Each reading is replaced by an exclusion quoting the evidence, and each word keeps or gains its name readings with dated counts (`heer`: Census 2010 surname 2,007, Wikidata family 113, beside its SSA given count; `herren` and `heren` re-counted unchanged). None had a recorded source: `bon` and `dí` came with the 2011 and 2012 prefix lists and #749 found no particle use; `heer`'s only source was #18's `Johan de heer Van Kampen`, two real names run together; `herren` and `heren` came unvetted with #99's honorifics, and a plural addresses several people. `PARTICLES` loses three words and `TITLES` two, `heren` leaving `AFTER_GIVEN_TITLES` with it. As name words they read as any other: `Marie Bon Durand` → middle 'Bon', family 'Durand' (was family 'Bon Durand'); `Herren Hans` → given 'Herren' (was title 'Herren'); `Doe, Jan Heren` → middle 'Heren', 1.4.0's reading, where 2.6.0 read title 'Heren' (decisions/H8); and a leading `Bon` or `Heer` no longer reports `particle-or-given`. Measured 2026-10-27 against 6ae585f3 with `tools/differential/measure.py`: no committed corpus name moves (`tests/v2/test_snapshot.py`, the CLDR and GND records). The local corpora moved 79 entries (ctgov-officials 14, fec-individuals 9, jrc-names 30, psc-individuals 20, tse-donors 6; nepal-candidates, tw-donors and ukec-individuals none), of four shapes: a surname of a real particle and the word (`de Heer`, `le Bon`, `van Bon`), whose base is now the word, so `initials()` no longer counts the particle and case repair writes the particle as it writes any other; the word between the given name and the surname, now a middle name, where psc-individuals' filers typed it (4 records now agree with their boxes, none newly disagree); a leading `Bon` or `Heer` given name losing its `particle-or-given` report; and `Herren` or `Heren` opening a name, now the given name. The accepted cost is a compound surname written with `Bon` as its own first word (`Bon Valsassina`, the stage name `Bon Jovi`), now middle 'Bon', as any double surname reads by position (`Policy(two_family_names=True)` is the opt-in). jrc-names reads 5 more persons' spellings alike. Recompute: `uv run python tools/differential/measure.py --base <a checkout of 6ae585f3>`, and the refusals with `uv run python tools/vocab/query.py --excluded particle` and `--excluded salutation`. `und.toml` keeps both words, so it is not empty.
- **2026-10-27 #752, phase 2j, `sheikh` and its spellings (Derek) — THE NINTH AND LAST TITLE BATCH: `sheikh`, `sheik`, `shekh`, `shaik` and `cheikh` have dated `given` readings**, so each is a title only inside a title phrase; `shaykh` stays a title. `Sheikh Ahmed Khan`, `Mr Sheikh Ahmed` and `Cheikh Anta Diop` read the given name; a ruler written with the bare title does too (`Sheikh Mohammed bin Rashid`), the cost Derek accepted on 2026-10-27. With it every word item 12's measurement named has its reading. The measurement is decisions/H9's entry of this date.
- **2026-10-27 #752, phase 2j, `prince` and `princess` (Derek) — THE EIGHTH TITLE BATCH: both have a dated `given` reading**, so each is a title only inside a title phrase. `Prince Fielder`, `Mr Prince Smith` and `Smith, Princess` read the given name; a royal written with the bare title does too (`Prince Harry`), the class accepted for `king`, `sultan` and `shaikh`, accepted by Derek on 2026-10-27. `His Royal Highness Prince Harry` and `Prince of Wales` keep the title. The measurement is decisions/H9's entry of this date.
- **2026-10-26 #752, phase 2j, `shaikh` (Derek) — THE SEVENTH TITLE BATCH: `shaikh` has a dated `given` reading**, so the style is a title only inside a title phrase. `Shaikh Ahmed Khan` and `Mr Shaikh Ahmed` read given 'Shaikh'; a ruler written with the bare title does too (`Shaikh Hamad bin Isa`), the class accepted for `king` and `sultan`, the larger share of rulers Derek accepted on 2026-10-27. `sheikh` keeps its own batch. The measurement is decisions/H9's entry of this date.
Expand Down
9 changes: 6 additions & 3 deletions docs/migrate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ in tokenization rather than by policy, so a name written with either
still divides at the dot, and still renders with a space, whatever
those two fields are set to.

Changed in 2.3, 2.4, 2.5 and 2.6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Changed in 2.3 through 2.7
~~~~~~~~~~~~~~~~~~~~~~~~~~

Later releases moved more 1.4 readings, and these reach ``HumanName``
as well; 2.1 and 2.2 read every one of them as 1.4 did. The release
log's 2.3, 2.4, 2.5 and 2.6 sections carry the reasoning; these are the shapes to
log's 2.3 to 2.7 sections carry the reasoning; these are the shapes to
grep your fixtures for, with what 1.4 read:

- ``"Her Majesty Queen Elizabeth"``, ``"His Royal Highness Prince Harry"`` (2.3) — a lone
Expand Down Expand Up @@ -741,6 +741,9 @@ grep your fixtures for, with what 1.4 read:
- ``"Jane Smith, Dr. / MD"`` (2.7) — a hyphen or slash standing alone
between post-nominals reads as a comma: 1.4 read first ``/``, last
``Jane Smith``.
- ``"Marie Bon Durand"`` and ``"Herren Hans"`` (2.7) — ``Bon``, ``Dí``
and ``Heer`` are no longer particles, nor ``Herren`` and ``Heren``
titles: 1.4 read last ``Bon Durand`` and title ``Herren``.
- ``"Mr Md Karim Uddin"`` and ``"Wm Smith"`` (2.6) — ``Md`` and ``Wm``
are the given names they abbreviate: 1.4 read title ``Mr Md`` and
``Wm``.
Expand Down
1 change: 1 addition & 0 deletions docs/release_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Release Log
- **Read Chas., Wm. and the other given names written short as given names rather than titles.** ``Chas. Smith`` and ``Ma. Cristina Reyes`` give first ``Chas.`` and ``Ma.``, where 1.4.0 through 2.6.0 gave title ``Chas.`` and ``Ma.``; ``Thos.``, ``Jas.``, ``Geo.``, ``Robt.``, ``Benj.``, ``Jno.``, ``Saml.``, ``Edw.``, ``Richd.``, ``Wm.`` and the Filipino ``Jo.`` read the same way, behind a title too (``Mrs Ma. Liza Cruz`` gives title ``Mrs``, first ``Ma.``). An unlisted abbreviation in front is still a title (``Insp. Jane Morse``), and ``Lexicon.given_name_abbreviations`` lists the words. :issue:`789`, :issue:`752`
- **Read a bracketed credential that is also a name as a suffix where its writing settles it.** ``John Smith (MA)`` and ``John Smith (M.A)`` give suffix ``MA`` and ``M.A``, as 1.4.0 did, where 2.0.0 through 2.6.0 gave nickname ``MA`` and ``M.A``; ``Andrew Perkins (JD)`` gives suffix ``JD``, where 1.4.0 through 2.6.0 gave nickname ``JD``. Only capitals in a mixed-case name or a period inside the word settle it, and only after the name, so ``John Smith (Ed)``, ``JOHN SMITH (MA)`` and ``Jeffrey (JD) Bricken`` keep the nickname and report a ``suffix-or-nickname`` ambiguity. :issue:`810`, :issue:`752`
- **Read a hyphen or a slash standing alone between post-nominals as a comma.** ``Jane Smith, Dr. / MD`` gives first ``Jane``, last ``Smith``, where 1.4.0 through 2.6.0 gave first ``/``, last ``Jane Smith``; ``John Smith, MD - PhD`` gives suffix ``MD, PhD``, where 1.4.0 through 2.5.0 gave first ``-``, last ``John Smith`` and 2.6.0 gave suffix ``MD - PhD``. It counts only after a whole name and its comma, or after a second comma, and only with a space on each side, so ``Smith - Jones, John`` and ``John Smith, MD- PhD`` read as before; ``extra_suffix_delimiters`` still declares any other separator. :issue:`889`, :issue:`156`
- **Fix Bon, Dí and Heer joining the next word into the last name, and Herren and Heren reading as titles.** ``Marie Bon Durand`` gives middle ``Bon``, last ``Durand``, where 1.4.0 through 2.6.0 gave last ``Bon Durand``; ``Li Dí Wang`` and ``Jan Heer Smit`` read the same. ``Herren Hans`` gives first ``Herren``, where 1.4.0 through 2.6.0 gave title ``Herren``; ``Heren Jan`` reads the same, and ``Doe, Jan Heren`` gives middle ``Heren`` again, where 2.6.0 gave title ``Heren``. :issue:`766`
- **A Lexicon or Parser pickled by an earlier release no longer loads.** Loading one raises ``ValueError`` naming the new fields (``suffix_words_ambiguous``, ``agnomens``, ``titles_ambiguous``, ``title_modifiers``, ``title_styles``, ``title_phrases``, ``given_name_abbreviations``); re-pickle after upgrading. ``ParsedName`` and ``HumanName`` pickles still load. :issue:`752`

* 2.6.0 - October 25, 2026
Expand Down
6 changes: 0 additions & 6 deletions nameparser/config/_compiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,8 @@
'heiress',
'her',
'hereditary',
'heren',
'herr',
'herra',
'herren',
'herrn',
'herzog',
'high',
Expand Down Expand Up @@ -881,7 +879,6 @@
'gospodin',
'gospođa',
'gospođica',
'heren',
'herrn',
'juffrouw',
'kalbatoni',
Expand Down Expand Up @@ -1426,7 +1423,6 @@
'bint',
'binte',
'binti',
'bon',
"d'",
'da',
'dal',
Expand All @@ -1451,7 +1447,6 @@
'do',
'dos',
'du',
'dí',
'd’',
'ed-',
'edh-',
Expand All @@ -1465,7 +1460,6 @@
'ez-',
'freiherr',
'freiherrin',
'heer',
'het',
'ibn',
"l'",
Expand Down
4 changes: 2 additions & 2 deletions nameparser/vocab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A file is named for a BCP 47 language tag in canonical case: `fr.toml`, `pt-BR.t

Two tags are not languages:

- **`und`** (undetermined) holds the words no language file fits: two particles of unrecorded origin, `bon` and `dí` (since 2026-10-20, when #751 finished what #749 and #750 began, giving every other word its languages). The comment at the top of the file says why they are there; a word whose language is found moves to that language's file.
- **`und`** (undetermined) holds the words no language file fits: `bon` and `dí`, particles of unrecorded origin until #766 refused their particle readings, now name readings and those exclusions (since 2026-10-20, when #751 finished what #749 and #750 began, giving every other word its languages). The comment at the top of the file says why they are there; a word whose language is found moves to that language's file.
- **`mul`** (multiple) holds words shared on purpose, such as the Roman numerals.

The script is read from the word, not from the file: `sr.toml` holds `mlađi` and `млађи` side by side. A script subtag (`zh-Hant`) is for a difference the text cannot show.
Expand Down Expand Up @@ -158,7 +158,7 @@ The particle kinds say what the word does in the names of the file's language:
- `patronymic`: "son of" or "daughter of", where the word after it is a parent's name (`bin`, `binti`, `ibn`, `بن`, `בן`);
- `teknonymic`: "father of", naming the bearer by a child (`abu`, `أبو`);
- `clan`: a lineage prefix, where the word after it is a family name shared by the lineage rather than a parent's name (`mac`, `mc`, `ó`, `ní`, `آل`);
- `rank`: a former rank written inside the surname (`freiherr`, `heer`);
- `rank`: a former rank written inside the surname (`freiherr`, `freiherrin`);
- `saint`: "Saint" opening a surname (`san`, `santa`, `st`, `ste`);
- `alias`: a word joining two surnames of one person (`vel`).

Expand Down
4 changes: 2 additions & 2 deletions nameparser/vocab/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ salutation = { gender = "m", same_as = "herr", excluded = { after_given = "endin

[[word]]
text = "herren"
salutation = { gender = "m", expands = "the plural of Herr", excluded = { after_given = "a surname (Census 2010 HERREN), and middle names are drawn from surnames" } }
family = { us_census_2010 = 4466, wikidata = 37, as_of = 2026-10-24 }
family = { us_census_2010 = 4466, wikidata = 37, as_of = 2026-10-27, note = "Wikidata bearers by citizenship: Switzerland 9, the United States 5, Germany 4" }
excluded = { salutation = { reason = "the plural of Herr: a plural addresses several people (Herren Müller und Schmidt) and never stands before one person's name, so as a title it only took the first word of a surname-first name (Herren Hans read title 'Herren', family 'Hans'); borne as a surname by more than any word shipped under the graf class, decisions/salutation-titles (the counts on its family reading)", issue = 766 } }

[[word]]
text = "dipl.-ing"
Expand Down
Loading
Loading