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
7 changes: 6 additions & 1 deletion docs/design/decisions/generational-words.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Closes #661. 31 spelled-out generational words join SUFFIX_WORDS, and one predic

Elsewhere: the run start that lets any unambiguous suffix word of two or more letters begin the credential run, whatever its script (`Antonio Pavlović mlađi Jones` reads suffix 'mlađi Jones', as does `Pieter Bruegel stariji Jones` with 'stariji Jones'), is decisions/S8's 2026-10-14 (Derek), #679 entry, which retracted this file's #602 run-start bullet; the glued peel of 二世 is decisions/W2's 2026-10-17 #707 entry.

Open: #684 (locale packs for `Alexandre Dumas fils` and `Jiří Dienstbier ml.`, the generational words that collide outside their language).
- pt `júnior`, the accented spelling of `junior`, ships beside it with `same_as = "jr"` and inherits its vetting and its accepted collisions rather than being re-vetted under the two tests above (Junior is a borne surname, 2,146 US Census bearers, where `senior` was refused for 3,864): `José Silva Júnior` reads family 'Silva', suffix 'Júnior', as `José Silva Junior` does — 2026-10-23 (Derek), #843.
- The Brazilian agnomens `Filho`, `Neto`, `Netto`, `Sobrinho` and their feminines are not suffix vocabulary, and nothing refuses them either: `Pedro Alves Filho` reads family 'Filho', middle 'Alves', as 1.4.0 and 2.5.0 did — 2026-10-23 (Derek), #843.

Open: #684 (locale packs for `Alexandre Dumas fils` and `Jiří Dienstbier ml.`, the generational words that collide outside their language); #843 (whether the Brazilian agnomens read as suffixes, as a family name that takes the word before it, or stay the family name, with their abbreviations FH, FO, NT and SB).

## Log

Expand All @@ -30,3 +33,5 @@ Open: #684 (locale packs for `Alexandre Dumas fils` and `Jiří Dienstbier ml.`,

- 2026-10-21 #762 (Derek) — 二世 IS A GENERATION WORD, SPACED AND GLUED. "yea i think 二世 is fine as a generational word that also peels." #679 left zh 二世 out of the roster as "regnal, and glued"; #671 (2026-10-17, decisions/W2) then added it to `SUFFIX_WORDS` as the generational numeral, spaced (a `generation` reading since #737), and #707 (2026-10-17, decisions/W2) let it peel glued, and the reading stands: the `ja.toml` and `zh.toml` entries carry `issue = 671` and `attached` with `issue = 707`. Found when the Standing block for this file was written (#803), where W2's "does not reverse" sentence about #679 contradicted the vocabulary.
SUPERSEDES: 2026-10-14 #679's refusal of zh 二世 only; its other refusals stand.

- **2026-10-23 #843 (Derek) — JÚNIOR SHIPS; THE AGNOMENS WAIT.** "Suffix, Júnior only for now." `júnior` joins `pt.toml` as a generation reading with `same_as = "jr"`: the standard Portuguese spelling, which `José Silva Júnior` read as family 'Júnior', middle 'Silva' in 1.4.0 and 2.5.0 (checked against both wheels) while `José Silva Junior` read suffix 'Junior'. Its collisions are `junior`'s, already accepted: a given name (Wikidata 37+ as Júnior, 43,182+ US SSA births as Junior), where the suffix claim does not act (`Júnior Silva` keeps given 'Júnior'), and family bearers (Wikidata 49+, US Census 2,146 as JUNIOR), which a suffix word costs its surname wherever it ends a name (`Pedro Júnior` reads given 'Pedro', suffix 'Júnior', as `Pedro Junior` does), counts from `tools/name_usage.py` on 2026-10-23. In the local corpus `tse-donors` (fetched 2026-10-22), 1,071 of its 854,531 records write it anywhere in the name (`tools/name_usage.py`), 991 distinct filed names end in it, and 983 records end in it, in either case, where the tax registry's name for the same donor ends `JUNIOR` (last words compared after `str.upper()`). The accented spelling reads as the unaccented one in all 120 pairs of a grid of 20 shapes (comma shapes, an empty head, a title, a particle, a trailing title, a nickname, a maiden clause, a credential and a name word behind it, both one-case spellings) under all three orders, composed and decomposed, comparing fields, ambiguity kinds and `initials()`; with `júnior` removed from the lexicon (`Lexicon.default().remove(suffix_words={'júnior'})`), 108 of the 120 pairs differ, and the 12 that do not hold Júnior where no suffix reading reaches it (`Júnior Silva`, and `Júnior, José`, before a family comma). Measured 2026-10-23 on `tse-donors` against the tree before this change (`snapshot.py --local tse-donors`, baseline recorded with `--tree`): 993 of 848,351 filed names move, 990 ending in Júnior and gaining it as the suffix out of the family name (3 of them two-word names, `RONALDO JÚNIOR`, left with no family as `RONALDO JUNIOR` is), and 3 with Júnior inside the name, where it starts a credential run (decisions/S8) that takes the surnames behind it, `JORGE ANTÔNIO JÚNIOR BARBOSA SILVA` reading family 'ANTÔNIO', suffix 'JÚNIOR BARBOSA SILVA' as the JUNIOR spelling already did; and `local_corpora.py pairs tse-donors --agreement` stops listing JÚNIOR / JUNIOR (866 accents-only pairs read with two surnames before, none after). The agnomens (distinct filed names ending in them: `Filho` 10,979, `Neto` 8,439, `Sobrinho` 955, `Netto` 432) stay family names for now. They are legally part of the surname, and `Neto` is a borne surname and given name alone (Wikidata 276+ family, 12+ given), which a suffix reading would leave with no family, as `Pedro Junior` has none. No exclusion records them, because nothing was refused: the question is open on #843.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"John Smith Jr." → suffix="Jr."
"Antonio Pavlović mlađi" → family="Pavlović"
"Antonio Pavlović mlađi" → suffix="mlađi"
"José Silva Júnior" → suffix="Júnior"
"Pedro Alves Filho" → family="Filho" · boundary
"Агриппина Младшая" → suffix="Младшая"
"جورج بوش الابن" → suffix="الابن"
"ロバート・ダウニー・ジュニア" → suffix="ジュニア"
Expand Down
1 change: 1 addition & 0 deletions docs/release_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Release Log
- **Add Cllr as a title.** ``Cllr John Smith`` gives title ``Cllr``, first ``John``, last ``Smith``, where 1.4.0 through 2.5.0 gave first ``Cllr``, middle ``John``. A bare ``Cllr`` after the name is still a name word. :issue:`847`
- **Fix case repair lowering a capital after a full stop or an ayn.** ``j.r.r. tolkien`` repairs to ``J.R.R. Tolkien`` and ``AHMAD IBN-ʿALĪ`` to ``Ahmad ibn-ʿAlī``, where 1.4.0 through 2.5.0 gave ``J.r.r.`` and ``ʿalī``. A joined word is written the same way (``st.john`` gives ``St.John``), so an unlisted abbreviation's ending is capitalized too: ``dr.philol.`` gives ``Dr.Philol.``. :issue:`838`
- **Add the Italian abbreviated salutations such as Sig.ra and Dott.ssa as titles.** ``Dott.ssa Anna Bianchi`` gives title ``Dott.ssa``, first ``Anna``, where 1.4.0 through 2.5.0 gave first ``Dott.ssa``, middle ``Anna``, and ``SIG.RA MARIA ROSSI`` repairs to ``Sig.ra Maria Rossi``. A bare ``Sig`` or ``Ing`` is still read as a first name. :issue:`840`
- **Add Júnior as a suffix.** ``José Silva Júnior`` gives last ``Silva``, suffix ``Júnior``, as ``José Silva Junior`` does, where 1.4.0 through 2.5.0 gave middle ``Silva``, last ``Júnior``. ``Filho``, ``Neto`` and ``Sobrinho`` still read as the last name. :issue:`843`

* 2.5.0 - October 19, 2026

Expand Down
1 change: 1 addition & 0 deletions nameparser/config/_compiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@
'jnr',
'jr',
'junior',
'júnior',
'mladšia',
'mladší',
'mlajša',
Expand Down
7 changes: 7 additions & 0 deletions nameparser/vocab/pt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ salutation = { gender = "f" }
text = "dra"
academic = { gender = "f", expands = "Doctora, Doutora" }

[[word]]
text = "júnior"
[word.generation]
same_as = "jr"
issue = 843
note = "the standard Portuguese spelling of Junior: tse-donors (2026-10-22) has 991 distinct filed names ending in it, 983 records ending in it where the tax registry's name ends JUNIOR. Its collisions are junior's: a given name (Wikidata 37+ as Júnior, 2026-10-23) where the suffix claim does not act, and 49+ Wikidata family bearers"

[[word]]
text = "da"
preposition = { may_be_given = true, expands = "of the, fem. sg." }
Expand Down
12 changes: 12 additions & 0 deletions tests/v2/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,18 @@ def _check_cjk_shape_purity(self) -> None:
{"given": "Antonio", "family": "Pavlović", "suffix": "mlađi"},
classification="fix(#661)",
notes="1.4.0 and 2.4.2 read middle 'mlađi'"),
Case("an_accented_spelling_of_junior", "José Silva Júnior",
{"given": "José", "family": "Silva", "suffix": "Júnior"},
classification="fix(#843)",
notes="the Portuguese spelling reads as 'José Silva Junior' "
"does. 1.4.0 and 2.5.0 read middle 'Silva', family "
"'Júnior'"),
Case("an_agnomen_stays_the_family_name", "Pedro Alves Filho",
{"given": "Pedro", "middle": "Alves", "family": "Filho"},
classification="parity",
notes="Filho, Neto and Sobrinho are not suffix vocabulary: "
"whether they read as suffixes is open on #843. The "
"contrast row for the one above"),
Case("a_feminine_generational_word_in_cyrillic", "Агриппина Младшая",
{"given": "Агриппина", "suffix": "Младшая"},
classification="fix(#661)",
Expand Down
19 changes: 11 additions & 8 deletions tests/v2/test_local_corpora.py
Original file line number Diff line number Diff line change
Expand Up @@ -2892,17 +2892,20 @@ def test_the_pairs_view_counts_the_pairs_whose_spellings_share_a_surname() -> No


def test_the_pairs_view_lists_the_accents_only_pairs_read_with_two_surnames() -> None:
# JUNIOR is a suffix and JÚNIOR is not, so the readings part; the
# accent on JOSÉ moves nothing. Fewer than ten: not listed.
found = local.pair_counts(_paired(*[("JOSE SILVA JÚNIOR", "JOSÉ SILVA JUNIOR")] * 10,
# SA is a credential and SÁ is not, so the readings part; JÚNIOR and
# JUNIOR are both suffixes (#843), and the accent on JOSÉ moves
# nothing. Fewer than ten: not listed.
found = local.pair_counts(_paired(*[("ANA SÁ", "ANA SA")] * 10,
*[("JOSE SILVA JÚNIOR", "JOSÉ SILVA JUNIOR")] * 10,
*[("JOSE SILVA", "JOSÉ SILVA")] * 10,
*[("ANA SÁ", "ANA SA")] * 9), agreement=True)
assert found.agreement == {"accents only": (10, 29)}
assert found.accent_splits == {"JÚNIOR / JUNIOR": 10, "SÁ / SA": 9}
*[("JOSE SILVA MÁ", "JOSÉ SILVA MA")] * 9),
agreement=True)
assert found.agreement == {"accents only": (20, 39)}
assert found.accent_splits == {"SÁ / SA": 10, "MÁ / MA": 9}
report = local.format_pairs(found, top=15)
assert ("accents-only pairs read with two surnames, by their last words: "
"JÚNIOR / JUNIOR 10") in report
assert "SÁ / SA" not in report
"SÁ / SA 10") in report
assert "MÁ / MA" not in report


def test_the_pairs_view_refuses_a_source_with_no_reference_name(
Expand Down
2 changes: 2 additions & 0 deletions tools/differential/corpus_rules.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@
"Josep Carod i Rovira"
"Josep Lluis Carod i III"
"Josep i Rovira"
"José Silva Júnior"
"Jr."
"Juan & Garcia"
"Juan McDonald"
Expand Down Expand Up @@ -432,6 +433,7 @@
"Ortega y Gasset, Dr."
"Ortega y Gasset, Ed"
"Pavlović, Antonio mlađi"
"Pedro Alves Filho"
"Ph. D. Van Johnson"
"Ph. D., John"
"Pieter Bruegel stariji Jones"
Expand Down
2 changes: 2 additions & 0 deletions tools/differential/snapshot.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,7 @@
{"name": "José Mataix Monllor", "given": "José", "middle": "Mataix", "family": "Monllor", "initials": "J. M. M."}
{"name": "José Perianes Carro", "given": "José", "middle": "Perianes", "family": "Carro", "initials": "J. P. C."}
{"name": "José Robles Pazos", "given": "José", "middle": "Robles", "family": "Pazos", "initials": "J. R. P."}
{"name": "José Silva Júnior", "given": "José", "family": "Silva", "suffix": "Júnior", "initials": "J. S."}
{"name": "José Vilató Ruiz", "given": "José", "middle": "Vilató", "family": "Ruiz", "initials": "J. V. R."}
{"name": "Jovan Dragan Popović", "given": "Jovan", "middle": "Dragan", "family": "Popović", "initials": "J. D. P."}
{"name": "Joybert, Marc de", "given": "Marc", "family": "de Joybert", "initials": "M. J."}
Expand Down Expand Up @@ -2506,6 +2507,7 @@
{"name": "Pavlović, Antonio mlađi", "given": "Antonio", "family": "Pavlović", "suffix": "mlađi", "initials": "A. P.", "capitalized_force": "Antonio Pavlović Mlađi"}
{"name": "Pedro", "given": "Pedro", "ambiguities": ["GIVEN_OR_FAMILY"], "initials": "P."}
{"name": "Pedro", "order": "FAMILY_FIRST", "family": "Pedro", "ambiguities": ["GIVEN_OR_FAMILY"], "initials": "P."}
{"name": "Pedro Alves Filho", "given": "Pedro", "middle": "Alves", "family": "Filho", "initials": "P. A. F."}
{"name": "Pedro Cañas Serrano", "given": "Pedro", "middle": "Cañas", "family": "Serrano", "initials": "P. C. S."}
{"name": "Pedro Galindo Galarza", "given": "Pedro", "middle": "Galindo", "family": "Galarza", "initials": "P. G. G."}
{"name": "Pedro Infante Torrentera", "given": "Pedro", "middle": "Infante", "family": "Torrentera", "initials": "P. I. T."}
Expand Down
Loading