Skip to content

Add four vocabulary spellings (Vanden, hyphenated ranks, 어 and 라, عبد's ى completions) and Shri under locales.HI - #1506

Merged
derek73 merged 9 commits into
masterfrom
feat/vocab-small-fixes-3-2
Nov 21, 2026
Merged

derek73 merged 9 commits into
masterfrom
feat/vocab-small-fixes-3-2

Conversation

@derek73

@derek73 derek73 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Four small vocabulary fixes, each a spelling the parser read wrongly against a twin it already reads right, and Shri as a title under locales.HI. There are no parser code changes: each fix is a TOML entry or a Korean surname, rebuilt with tools/vocab/build.py.

Closes #1239
Closes #966
Closes #1215
Closes #1337
Closes #1192
Relates to #979

The fixes

Issue Change Before (master) After
#1239 nl.toml: vanden, with a preposition and a given reading, as vander has Pieter Vanden Broeck → middle 'Vanden', family 'Broeck' family 'Vanden Broeck'
#966 en.toml: military readings for thirteen ranks written with a hyphen (vice-admiral, rear-admiral, vice-marshal, air-marshal, chief-marshal, field-marshal, lieutenant-colonel, lieutenant-general, lieutenant-commander, major-general, brigadier-general, wing-commander, sergeant-major) Air Vice-Marshal Ann Reed → given 'Air', middle 'Vice-Marshal Ann' title 'Air Vice-Marshal'
#1215 config/_ko_surnames.py: 어 and 라 어수선 → family '어수선' family '어', given '수선'
#1337 ar.toml: the ى spelling of each of the 21 ي-final completions of عبد, plus المولي سامر عبد القوى → middle 'عبد', family 'القوى' family 'عبد القوى'
#1192 hi.toml: shri's exclusion becomes a default = false salutation, without after_given under locales.HI, Shri Ravi Kumar Verma → given 'Shri', middle 'Ravi Kumar' title 'Shri', given 'Ravi'

The default parse and locales.BN read Shri as before. Sri stays excluded.

#979: the dotted degrees were tried and dropped

The branch first listed L.C.P., L.A.E., L.E.M. and M.A.P. in es.toml. That commit is reverted here (99f33c21), not force-pushed away. The cost falls on initials written as a dotted run, which rules/T7 reads right today:

  • Perez, M.A.P. would read the degree and no given name.
  • M.A.P. Perera would lose its given initials.

The fielded corpora compose each name given name first from its boxes, so they cannot count that cost. A default = false reading under locales.ES would only narrow who pays. The decline is recorded in decisions/H10 (2026-11-20 #979), and the same finding is posted on #979, which stays open.

What each fix leaves out

Accepted costs, recorded

Measurement

The four spelling fixes were measured with uv run python tools/differential/measure.py --base <export of master cb5088a9> --jobs 4, while the degree commit was still on the branch. The degree moves are left out below; the revert removes them. 30 steps ran, none failed. Every moved name was read by hand.

Corpus Moves What they are
govuk-people 6 all right: Air Vice-Marshal gains the title
ukec-individuals 0 the five ranks added on review move nothing here or in govuk-people
opensanctions-parliaments 5 4 right: Egypt's House, عبد plus a ى completion is now the family; 1 right: a member surnamed 어
jrc-names 29 14 Vanden, right. 15 foreign names in hangul (14 라, 1 어): 14 were wrong before as well, and 1, a regnal name of two words, was right and is now divided
orcid-researchers 45 44 Vanden; 1 a Korean given name opening with 어, wrong before and after
fec-individuals, ctgov-contacts, ctgov-officials, patentsview-inventors, psc-individuals 36, 9, 5, 26, 9 Vanden (FEC's 33 capitals-only moves are the case repair above)

Scored against the filed boxes (local_agreement.py --base):

  • orcid-researchers: 41 Vanden records fixed.
  • patentsview-inventors: 22 fixed, 7 "broken". All 7 are Belgian Vanden X names that the professional filer boxed with Vanden in the given name; they read right now.
  • psc-individuals: 6 fixed, 2 broken. Both are British filers who boxed Vanden as a middle name, a cost vander already carries.

Shri was measured against the pack without the reading, on this branch over master 758c2f8e:

uv run python tools/differential/config_diff.py diff --local all --committed --match '(?i)shri' \
  'expr:Parser(lexicon=parser_for(locales.HI).lexicon.remove("shri", kind="salutation"), policy=parser_for(locales.HI).policy)' plain:HI
Corpus Moves What they are
opensanctions-parliaments 2,245 2,244 of in_sansad's 10,650 spellings gain the salutation as the title; 1 a Balinese name, unclear
jrc-names 1 right
nepal-candidates 10 6 now read as their Devanagari श्री reads; 4 the one word श्रीनारायण, a given name, now wrong
fec-individuals, orcid-researchers, patentsview-inventors, psc-individuals 9, 5, 4, 2 each a filed given box holding Shri, now wrong
committed corpora 0

That is about 2,250 fixed against 24 broken. 20 of the 24 are in populations a Hindi choice is not made for. The committed snapshot is byte-identical for this change: the default moves nothing.

Sweeps

  • Twin comparisons, in all three name orders and four comma shapes:
  • Case rows in tests/v2/cases.py for each fix. A test in tests/v2/test_locales.py holds Shri under the three orders and a strict choice, since a case row cannot carry both a locale and a policy.
  • parity_check.py lists none of the new rows. It lists one row from Read a second name after an alias marker as the nickname #1504, a follow-up below.
  • Full suite on 3.11 (55,301) and 3.15 in its own environment (55,301), sphinx-build -b doctest docs, mypy and ruff all pass.

Docs amended in this PR

Reviews

  • pr-review-toolkit:code-reviewer: the first commit and its fix commit. Then the revert, the H10 decline entry and the Shri change; it found the revert an exact inverse and three stale texts, now fixed.
  • pr-review-toolkit:pr-test-analyzer: the first commit and its fix commit. Then the Shri change; its coverage gaps are now covered (name orders, a strict choice, the dotted trailing and empty-head shapes, the rotators).
  • pr-review-toolkit:comment-analyzer: the first commit and its fix commit; the Shri prose, checked against parses.
  • design-docs-reviewer:
    • the first commit and its fix commit;
    • the revert, H10 entry and Shri change: seven findings, all fixed in d90597d7;
    • a review of d90597d7 itself, which measured that after_given on shri fixed nothing and broke 2 names; 892710d4 drops it;
    • a review of 892710d4: its figures reproduce; it corrected a person count, the one-name figure and a missing recipe line, applied in a2bee22f from its own measurements.

Follow-ups

  • Flemish contractions in case repair: vande, vander and vanden are all lower-cased by case repair. Whether they take R12's capital_opening is one question for all three.
  • Read a second name after an alias marker as the nickname #1504's row: alias_marker_behind_a_maiden_marker_left_a_word is labeled parity but 1.4.0 reads it otherwise (parity_check.py).

🤖 Generated with Claude Code

@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 titles Titles and honorifics (rules/H) non-latin-script Names written in a script other than Latin (rules/W) particles Particles and surname prefixes (rules/P) labels Nov 20, 2026
@derek73 derek73 self-assigned this Nov 20, 2026
@derek73
derek73 force-pushed the feat/vocab-small-fixes-3-2 branch 2 times, most recently from 6792ef4 to b357201 Compare November 20, 2026 23:49
derek73 and others added 2 commits November 20, 2026 15:54
…'s ى completions

- nl.toml: vanden, a preposition and a given reading, as vander has
  (#1239).
- en.toml: thirteen ranks written with a hyphen as military readings
  (#966); a split at the hyphen is declined (decisions/salutation-titles).
- config/_ko_surnames.py: 어 and 라, hangul read as Korean at the cost
  of a foreign name in hangul (#1215; decisions/W1, with the removal
  recipe in docs/east-asian.rst).
- ar.toml: the ى spelling of each ي-final completion of عبد, and
  المولي (#1337; decisions/P12).

Each word's vetting is on its entry; the rules, decisions, release log,
case rows, CJK corpus and snapshot move with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itles (#979)

es.toml academic readings written with their stops, so rules/T7's
vocabulary Except keeps the run whole and it reads as the title at the
head of a name. Kept apart from the other four fixes: letters spelling
a degree are a person's initials too, and after a family comma or before
a single surname they now lose the given name (Perez, M.A.P.), a cost
the boxed corpora cannot count (decisions/H10, 2026-11-20; decisions/H6
gains a head note).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 force-pushed the feat/vocab-small-fixes-3-2 branch from b357201 to d71c3a9 Compare November 20, 2026 23:56
derek73 and others added 4 commits November 20, 2026 17:30
Both conflicts were lists grown at the same end (the 3.2 release-log bullets and the case table's last rows); both sides kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….P. as titles (#979)"

This reverts commit d71c3a9.

The dotted degrees leave 3.2: their cost falls on initials written as a dotted run, which no fielded corpus counts (decisions/H10, 2026-11-20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hi.toml's excluded:salutation becomes a default = false salutation reading written after_given, the shape shrimati's has, so a Hindi choice reads it as the title and the default and locales.BN leave it to position. Measured against the pack without the reading: 2,243 of in_sansad's 10,650 spellings gain the title, against 25 names broken, 21 of them filed records in populations a Hindi choice is not made for (decisions/vocabulary-model, 2026-11-20 #1192). Sri stays excluded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derek73 and others added 3 commits November 20, 2026 17:53
Record shri's after_given against H8's criterion in both decisions files, mark phase 3e's shri bullet superseded, sweep the restatements of its exclusion (vocabulary-exclusions, indic-honorifics, H6, hi.toml's notes, docs/locales.rst's pack table), restore H6's head note on lcp that the degree revert removed, swap two corpus names for invented ones, and add rows and a test for the shapes no test pinned: the three name orders and a strict choice, behind a title, around a family comma, dotted at the end, alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rules/H8 leaves out a salutation borne as a given name. The Lok Sabha roll writes the salutation before the given name after a family comma, or after a full name and a comma, both read as the title without the property; with it, 2 names read worse. The word records the refusal, and the decisions entry the measurement. Also: the pooled-count clause, one more corpus name swapped for an invented one, and the 211 figure counted as spellings.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 changed the title Add five vocabulary spellings: Vanden, hyphenated ranks, Mexican dotted degrees, 어 and 라, عبد's ى completions Add four vocabulary spellings (Vanden, hyphenated ranks, 어 and 라, عبد's ى completions) and Shri under locales.HI Nov 21, 2026
@derek73
derek73 merged commit 89ec747 into master Nov 21, 2026
14 checks passed
@derek73
derek73 deleted the feat/vocab-small-fixes-3-2 branch November 21, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment