Skip to content

Read Portugal's own given names behind a particle under locales.PT_PT (#1189) - #1493

Merged
derek73 merged 6 commits into
masterfrom
fix/issue-1189-pt-pt-given-names
Nov 20, 2026
Merged

derek73 merged 6 commits into
masterfrom
fix/issue-1189-pt-pt-given-names

Conversation

@derek73

@derek73 derek73 commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Closes #1189

What changes

Portugal gets its own compound given names written behind a particle (rules/P10), read under locales.PT_PT alone:

Maria da Conceição Pinto   → locales.PT_PT: middle 'da Conceição', family 'Pinto'
                              locales.PT, locales.PT_BR and the default: family 'da Conceição Pinto', as before

The name is invented, of the shape read.

  • The readings. rosário, carmo, conceição and luz are given readings written after_particle, default = false, in nameparser/vocab/pt-PT.toml. Until now that file held only its [rules] table.
    • PT_BR chooses pt-BR, which does not select pt-PT, so Brazil's pack never reads them.
    • Each word is listed with its spelling without accents too (rosario, conceicao).
  • rosario. It is marked with rosário but not scored: es.toml's rosario reading is already on by default and in every plain choice. The entry here keeps the reading under a strict choice of Portugal, which compiles no es.toml (parser_for(locales.PT_PT, strict=True) read Maria do Rosario Carneiro as family 'do Rosario Carneiro' on master).
  • Not marked:
    • jesus: 40 fixed to 17 broken on Portugal's names (70%), under the bar.
    • Too few names to judge: nazaré 5/0, assunção, anjos, dores, mercês, belém, penha.
    • ó is outside this, being an Irish particle in ga.toml.
  • Nothing for Brazil. Every word fails there, as the table below shows.
  • Behind a particle only. A name ending with the phrase keeps it as the family (Maria da Luz), and a family comma reads as before.

How the words were chosen (decided 2026-11-19)

P10's Standing bar is 75% of the names a reading moves fixed, ten names or more, over the whole ORCID extract. Each word was scored that way, a word at a time, over the country's records, under the country's pack with and without the reading.

The words were first picked on ORCID's capped corpus (20,000 records a country). There jesus passed and conceição (10/4) and luz (2/0) did not. The whole extract holds about five times Portugal's records and reverses all three. The whole extract decides, being the population the bar names, so the capped choice is superseded. decisions/P10's entry gives both tables.

Population (fixed / broken) rosário carmo conceição luz jesus (left out)
ORCID Portugal, whole extract, under PT_PT 41 / 2 48 / 7 53 / 11 12 / 2 40 / 17
ORCID Brazil, whole extract, under PT_BR 15 / 29 173 / 201 132 / 226 20 / 83 248 / 784
ORCID Portugal, capped (superseded) 15 / 1 9 / 2 10 / 4 2 / 0 16 / 1
PSC, Portuguese (5,333) 0 / 0 4 / 0 6 / 1 0 / 0 7 / 2
PatentsView Portugal (3,576) 2 / 1 0 / 0 2 / 2 0 / 0 3 / 1
  • Brazil's nearest word is nazaré at 35 / 14 (71%).
  • The four together: PSC Portuguese 10 / 1, PatentsView Portugal 4 / 3.
  • Portugal's parliament (pt_parliament, 2,256 spellings): 13 move, each putting the phrase in the given part, where the issue found Portugal's deputies keep it.
  • Held-out ORCID records (config_diff.py score --cap 3000): PT_PT reads them 0.1 point below PT_BR (Portugal 89.6% against 89.7%, Brazil 79.7% against 79.8%). PSC's Portuguese filers read 62.9% under PT_PT and 62.8% under PT_BR; PatentsView Portugal reads 66.1% under both.

Also changed

  • Tests that assumed pt-PT.toml holds no word. test_reading_index.py now plants a region file holding no reading, so the path where a region's file holding only a [rules] table is chosen plainly through its language keeps a test with no shipped witness. test_config_diff.py and test_locales.py are updated.
  • New tests:
    • A test of the strict choices of PT_PT, PT_BR and PT. It fails if the rosario entry is deleted, which I checked by deleting it.
    • _ROTATORS["pt_pt"] rows for each word.
    • cases.py rows: each word under pt_pt, a suffix comma, one word after the phrase, no word after, and jesus left out under pt_pt and pt_br.
  • rules/P10: the language-alone bullet gains a country tier with examples.
  • decisions/P10: a Standing line and the 2026-11-19 Should Portugal read Maria da Conceição as a given name, where the pooled P10 bar leaves it out? (Maria da Conceição Caldeira gives family da Conceição Caldeira) #1189 entry, with a recompute recipe.
  • Other prose:
    • decisions/O6 and decisions/vocabulary-model, the Standing lines that said pt-PT.toml holds no word.
    • nameparser/vocab/README.md and AGENTS.md.
    • docs/locales.rst (a doctest), docs/policy.rst, docs/languages.rst.
    • The pt.py and pt_pt.py docstrings, and config_diff.py's gap_specs docstring.
  • Release log: Should locales.PT turn on two_family_names? Maria Santos Silva reads family Silva under the pack, where Portugal's own boxes say Santos Silva #1453's unreleased bullet gains the four words and :issue:1189``. locales.PT_PT is new in this release, so no `docs/migrate.rst` entry is needed, and the default and `PT_BR` move nothing.
  • Snapshot: gains rules/P10's new example texts and changes no reading.

Checks

  • uv run pytest passes (51,605), and so does uv run pytest -n0 -m serial.
  • uv run mypy and uv run ruff check pass.
  • sphinx-build -b doctest docs and python -m doctest README.rst pass.
  • tools/vocab/build.py --check reports the compiled files current.
  • The new feat(#1189) rows fail on master; the parity rows hold there.
  • Sweeps (nameparser/AGENTS.md): comma shapes, all three name orders (family-first readings are identical to master), capitals, lower case, NFD, a title, an agnomen and a nickname.

Reviews

  • pr-review-toolkit: code-reviewer, pr-test-analyzer and comment-analyzer.
  • design-docs-reviewer, on the first commit and again on the word change. Its whole-extract recount is what raised the population question.
  • Fix commits: each was reviewed in turn, the last included (code-reviewer, design-docs-reviewer, comment-analyzer); the last commit applies that review's wording points.
  • type-design-analyzer and silent-failure-hunter were not run: the change adds no types and no error handling.

🤖 Generated with Claude Code

derek73 and others added 6 commits November 19, 2026 17:37
…#1189)

pt-PT.toml gains rosário (with rosario), jesus and carmo as
`default = false` given readings written `after_particle` (rules/P10),
so `Maria do Rosário Pinto` gives middle 'do Rosário', family 'Pinto'
under locales.PT_PT, and locales.PT, locales.PT_BR and the default read
it as before. Each clears P10's bar on Portugal's ORCID records
(15/1, 16/1, 9/2) and none on Brazil's; conceição (10/4) is left out.

decisions/P10 records the measurement and the country tier; the tests
that held pt-PT.toml as a file of a [rules] table alone now plant one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e strict choice

es.toml's rosario is read under a strict choice of es too, so the note
says where it is not; prose that still said pt-PT.toml holds no word
(AGENTS.md, the vocab README, decisions/O6's Standing line) and the
user docs listing which phrases are marked (policy.rst, locales.rst)
name the new readings; decisions/P10 names the capped population the
words were scored on. A test holds the strict choices of PT_PT, PT_BR
and PT, and two rows hold one word after de Jesus and a suffix comma.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only jesus is refuted by Brazil's counts; rosário moves none of
Brazil's names and carmo too few. docs/locales.rst says the unaccented
`do Rosario` is a middle name in every pack's plain choice, a strict
choice of pt or pt_br reading it as the family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… jesus out

P10's Standing bar names the whole extract, and there `jesus` scores 40
fixed to 17 broken (70%) on Portugal's names while `conceição` (53/11)
and `luz` (12/2) pass; the capped corpus had read them the other way.
pt-PT.toml now marks rosário, carmo, conceição and luz (with their
unaccented spellings), and decisions/P10's entry gives both tables, the
whole extract deciding. Brazil's whole-extract figures, re-run, fail
every word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every plain choice reads es.toml's rosario already, so the plain scores
count rosário alone; the vocab README no longer lists luz as left out
beside its new Portugal reading; docs/languages.rst says pt_pt reads the
held-out records within 0.1 point of pt_br.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…which way pt_pt differs (#1189)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.2 milestone Nov 20, 2026
@derek73 derek73 added vocabulary Fixed by a word-list entry: per-word vocabulary and language packs particles Particles and surname prefixes (rules/P) locale-packs Locale packs and language choices (nameparser.locales) labels Nov 20, 2026
@derek73 derek73 self-assigned this Nov 20, 2026
@derek73
derek73 merged commit 667828a into master Nov 20, 2026
14 checks passed
@derek73
derek73 deleted the fix/issue-1189-pt-pt-given-names branch November 20, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

locale-packs Locale packs and language choices (nameparser.locales) particles Particles and surname prefixes (rules/P) vocabulary Fixed by a word-list entry: per-word vocabulary and language packs

Projects

None yet

1 participant