Skip to content

Add the ga, gd and pt-BR language packs (3.0, 3h) - #956

Merged
derek73 merged 5 commits into
masterfrom
feat/v3-pack-3h-ga-gd-pt-br
Oct 30, 2026
Merged

derek73 merged 5 commits into
masterfrom
feat/v3-pack-3h-ga-gd-pt-br

Conversation

@derek73

@derek73 derek73 commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Sub-phase 3h of #753's work order: the Irish, Scottish Gaelic and Brazilian Portuguese packs. Each is a Locale that is only a choice of languages (no lexicon fragment, no policy patch), so it declares no DEVIATES: its surface is the words its choice changes (_reading_index.changed_words), which the non-interference gate derives. The default does not move.

What each pack turns on

Pack Chooses Readings turned on (default = false in the file)
locales.GA ga clan nic (daughter of), mhic and uí (married forms of mac, ó), mic (genitive of mac)
locales.GD gd clan nic
locales.PT_BR pt-BR (and pt) agnomen sb (Sobrinho), cased = "SB"

nic and mic carry given readings (US SSA 77 and 26, Wikidata 173 and 10), so a leading Nic/Mic stays the given name in a name read given-first, reported PARTICLE_OR_GIVEN (rules/P1), as Mac does by default. nic, mhic, mic and uí carry cased masks, so case repair keeps their capital under the pack. nic's and sb's exclusions become these readings (item 9 of the 2026-10-27 #753 entry).

parse("Máire Uí Bhriain")                       middle 'Uí', family 'Bhriain'
parser_for(locales.GA).parse(...)               family 'Uí Bhriain'
parse("JOSE CARLOS SILVA SB")                   family 'SB'
parser_for(locales.PT_BR).parse(...)            family 'SILVA', suffix 'SB' (reported)

Departures from the brief, for review

  • F and N are not turned on: they stay excluded, the pack included. Turned on and measured on tse-donors (the corpus they were proposed from), scoring each moved name by what the registry wrote at the moved word: F was the agnomen in 48 moved filed/registry pairs and a letter abbreviating a surname in 104 (ANA MARIA F / ANA MARIA FILGUEIRAS), N 18 vs 59 (EDINEI VITAL N / ... DO NASCIMENTO). The strict "pair reads alike" measure (given, middle, family, suffix each equal) had shown 34 fixed and 0 broken for the three letters together, because most moves went from one wrong reading to another; a note in mechanisms.md#PAIRED-SPELLINGS-PER-CHANGE records the trap. Reverting is two entries in pt-BR.toml if the call goes the other way.
  • mhic is in ga.toml only. In Scottish Gaelic it mostly links a patronymic chain (Iain mac Dhòmhnaill mhic Sheumais), which listing it splits at its last link, as the default already splits … mac … mac …. The same split happens under ga for Seán mac Seáin mhic Thomáis (no corpus name moves), accepted for the married form Máire Mhic Gabhann.

Measured (2026-10-30, master 4067514 + this change, Python 3.11)

  • Default: _compiled.py unchanged; the committed snapshot gains only the three names rules/S11's new examples add to the rules corpus, no entry moving; snapshot.py --local tse-donors --base <master> matches the base.
  • Committed corpora (snapshot.py --languages): ga 4, gd 4 entries, all mc: the choice prefers ga's/gd's clan mc over en's Military Cross credential (John Smith MC → family MC), a 3b prefer effect on the mc both files already held. pt-BR moves 40: pt's 38 plus two of rules/S11's new SB examples.
  • CLDR locale view: ga 14/24, gd 15/24, pt (CLDR's Brazilian file) 17/24 with and without the pack; new rows recorded in cldr_agreement_locales.json.
  • tse-donors, pt-BR against pt: 14 more names move; 13 are SB read as the agnomen, the registry spelling SOBRINHO in every one (pairs reading alike 11 → 22); 1 is the SB case mask alone.
  • PSC, every record holding a changed word: ga 4 fixed (Clodagh Nic Lochlainn, Orlaith Mhic Mhathuna, Damien Patrick Mc) / 1 broken (Nicholas Nic Rawlings Limited Rawlings, a company filed as a person); gd 3 / the same 1.
  • ORCID, every country: ga 24 fixed / 0 broken (Pauline Uí Dhuibhir, Éimí Mhic an Ridire, 22 Nic …); gd 20 / 0.
  • ctgov-officials, pt-BR against pt: 17 more; 12 only capitalized(force=True) (a mid-name SB keeps capitals), 5 where the S.B. degree now fills generation instead of credentials (Howard S. Gordon, MD SB), one of them moving fields (Silvio Brugger, SB: given SB → suffix). Recorded as an accepted cost of choosing Brazilian Portuguese.
  • pt-BR's moves in PSC (12 broken) and ORCID (21 fixed, 11 broken) are all pt's own: see Open.

Open

  • For 3g: choosing pt (so pt-BR) prefers pt.toml's title sr (Senhor) over English's generation Sr: Gary Holloway Sr → family Sr, J. Smith Sr. → title Sr. (PSC's 12). Recorded in the decisions entry.
  • tests/v2/test_locales.py's _is_vocabulary_pack/_deviates helpers are also being written by the 3d (ne) branch; whichever lands second keeps one copy.

Same-PR docs

rules/S11 (SB under the choice, with [pt_br] examples and F as a boundary), decisions/vocabulary-model (Standing line + 2026-10-30 phase 3h entry), decisions/S11 (Standing line amended, Log entry), mechanisms.md (field note above), RFC status and work-order row, docs/locales.rst (table rows, a "Packs that choose a language" recipe doctest, contract steps for a vocabulary pack), README's available() doctest, release-log bullet.

Review

A design-docs review pass found four figure problems (an unregenerated rules corpus behind a "no re-record" claim, the S.B. degree's cost unmeasured, two pair figures without their comparator, and 242 counting pairs not distinct names); all fixed in the second commit.

A second review (orchestrator) found the missing Irish case masks (MÁIRE NIC GIOLLA PHÁDRAIG repaired to Máire nic under ga/gd), docs presenting the MC/Sr readings as features, an unqualified leading-Nic claim, the SB mask's reach, two wording slips, and a missing step in the F/N recipe; all fixed in the third commit, with failing-first rows for capitalized() under each pack.

Checks

uv run pytest, -n0 -m serial, --python 3.15, mypy, ruff, build.py --check, sphinx doctest + html (clean), python -m doctest README.rst. namedivider is not installed locally, so the ja rows ran skipped, as in CI's build jobs.

🤖 Generated with Claude Code

@derek73 derek73 added enhancement vocabulary Per-word vocabulary model and language packs labels Oct 30, 2026
@derek73 derek73 self-assigned this Oct 30, 2026
derek73 and others added 5 commits October 30, 2026 12:32
locales.GA chooses ga, turning on the Irish clan particles nic, mhic,
mic and uí, written default = false in ga.toml; locales.GD chooses gd,
turning on nic; locales.PT_BR chooses pt-BR (and pt), turning on sb as
Sobrinho's agnomen spelling. Each pack is a choice with no fragment and
no patch, so it declares no DEVIATES: its surface is the words its
choice changes, which the non-interference gate derives.

nic's and sb's exclusions become the readings their packs turn on. F
and N, which #843 left to this pack, stay excluded, the pack included:
measured on tse-donors, the letter abbreviated a surname about twice
as often as it wrote the agnomen. mhic stays out of gd.toml, where it
mostly links a patronymic chain a second particle would split.

The default does not move: _compiled.py is unchanged, the committed
snapshot passes, and tse-donors matches master's base. CLDR's ga, gd
and pt renderings are recorded under their packs (no move).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerate the rules corpus and snapshot for rules/S11's new examples,
so pt-BR moves 40 committed entries (pt's 38 plus two SB examples);
measure ctgov-officials and record the S.B. degree read as Sobrinho's
generation under the pack as accepted; state the comparator and
population of the tse pair figures, which count pairs, not names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nic, Mhic and Mic carry their title case as cased, as ní and uí do:
without a mask a turned-on particle is lowercased by case repair, so
MÁIRE NIC GIOLLA PHÁDRAIG repaired to 'Máire nic' under ga and gd.
Rows pin repair and force under each pack. docs/locales.rst states
the MC, Sr and S.B. readings as costs, and a leading Nic as given only
in a name read given-first; the SB mask's reach, the F/N recipe tree
and rules/S11's and decisions/S11's wording are corrected; the release
bullet is trimmed to one example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master's test_choice_rotators_cover_every_changed_word (3d) asks a
rotator for each word of a choice's derived surface, which takes in the
words a choice prefers as well as those it turns on: mc under ga and gd,
and pt's do, e and sr under pt_br.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 force-pushed the feat/v3-pack-3h-ga-gd-pt-br branch from c7756f4 to f7f1b63 Compare October 30, 2026 19:36
@derek73
derek73 merged commit b57468d into master Oct 30, 2026
13 checks passed
@derek73
derek73 deleted the feat/v3-pack-3h-ga-gd-pt-br branch November 4, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant