Skip to content

Read Brig Gen as one title; read Hon as a given name under a Chinese choice (#999) - #1035

Merged
derek73 merged 5 commits into
masterfrom
feat/hon-brig
Nov 3, 2026
Merged

derek73 merged 5 commits into
masterfrom
feat/hon-brig

Conversation

@derek73

@derek73 derek73 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Follows #1029 (Gen). This finishes the abbreviated titles that are also given names: Brig in the default, Hon opted into by a Chinese choice of languages.

Brig

brig (Brigadier written short) was in no vocabulary file, so Brig Gen Mark Kimmitt read given Brig, middle Gen Mark. It joins en.toml as a rank written short with a rare-given-name reading (US SSA 72 births). That makes it a title only inside a title phrase (rules/H9), pairing with gen, general and sir.

"Brig Gen Mark Kimmitt"          before: given='Brig'            now: title='Brig Gen'
"JENKINS, ROBERT G. BRIG. GEN."  before: title='GEN.', middle='G. BRIG.'   now: title='BRIG. GEN.'
"Brig. Saeed Akhtar"             title='Brig.'                   unchanged (H2's shape)
"Brig Klyce"                     given='Brig'                    unchanged, now reports title-or-name

No reading moves from a title to a name. Of 28 local-corpus texts holding the word, 13 move:

  • 8 fixes: FEC's 6 trailing BRIG. GEN., and JRC's 2 Brig Gen.
  • 5 gain only the report.

The one side effect: JRC-Names has 1 person now read apart, a brigadier written both Brig Gen Mark Kimmitt and Brig Mark Kimmitt.

Hon

Hon is the British style "the Honourable" and also a Cantonese given name. No position or count separates the two. Here are the words after a Hon opening the name:

words after as the title (PSC title box, UKEC) as a given name (PSC forename, ORCID, PatentsView)
1 0 45
2 8 332
3 9 50
4+ 7 2

A two-syllable Cantonese given name leaves two words after Hon, the commonest titled shape too. So a words-to-spare rule misreads about 330 names at "two or more" and about 52 at "three or more".

Decided: the default keeps the title. zh.toml gives hon a given reading written default = false, which a Chinese choice turns on: Locale(..., languages=frozenset({"zh"})), or zh-HK. That is the same mechanism as ne.toml's guru under a Nepali choice. locales.ZH itself makes no choice of languages, since its contract is to change only Han-bearing names.

Under the choice, the formal styles keep the title:

  • Rt Hon, through a partner (rt attaches to hon).
  • Hon Mrs, Hon Mr, Hon Lord, Hon Lady, Hon Sir and Hon Justice, through hon's own partners.
  • SMITH, JOHN HON., because hon carries the written-short mark.
  • The Hon, through one new rules/H9 clause: a style that may be a given name, written short, has its phrase partner in the article before it.

The clause reaches hon alone and moves no default reading. The first build had read every gated style this way, and review found it moving The Sheikh Mohammed bin Rashid and John Smith, the Sheikh against H9's epithet bullet.

Measured under the choice, against the default on this tree: 158 of 1,093 hon texts move.

  • About 125 Cantonese names fixed (orcid 41, patentsview 39, psc ~29, ctgov ~9, fec 6).
  • About 29 styles lost: the choice's cost. UKEC's 10 Hon David Layton, PSC ~11, FEC 5 bare after a family comma and 3 past a second comma.
  • About 5 honorary-degree prefixes.

Hong Kong writes legislators Hon Tommy Cheung, so the cost reaches Chinese data too; it is recorded.

hon names six partner words rather than a kind. A kind made phrases with the gated nobles (hon sultan), which started a title-or-name report on Sultan Hassanal Bolkiah. A longer list also overflows what the 2.x translation's refusal message shows, which would cut its offered code short (... 62 more), and that code would not run. The cost is that Hon Dr and Hon Ms read given Hon under the choice.

Measured in the default

measure.py --base against master d97211a3 moves only the 13 brig texts:

  • The committed corpora, CLDR and GND agreement, and every box score (orcid, patentsview, psc, cz) don't move.
  • 0 of 1,093 hon texts move.

Docs

  • rules/H9: the article clause and a Brig Gen example.
  • decisions/H9: brig and hon entries with Standing lines and recipes.
  • docs/locales.rst: a "Choosing languages" paragraph and doctest for Hon.
  • Release-log bullets: Brig merged into the Maj/Gen one; a new one for Hon.
  • A test of the zh choice in tests/v2/test_parser.py.

Review

Two design-docs review rounds, on the change and on its fix commit. Everything they found is fixed in the later commits.

A third round (code, test-coverage and comment reviews) found no code defect. It found untested behavior and stale or inaccurate prose, all fixed in the last commit:

  • Tests now pin the article clause's written-short guard (The Sheikh Mohammed bin Rashid keeps the epithet), brig's trailing mark and its general and sir partners, and hon's lady partner. A mutation run against each one now fails.
  • The zh test asserts whole readings.
  • One more cost of the choice is recorded: John Smith, Hon reads given Hon.

Checks run: full suite, mypy, ruff, Sphinx doctest.

🤖 Generated with Claude Code

derek73 and others added 4 commits November 3, 2026 03:03
…choice (#999)

`brig` joins en.toml as Brigadier written short, a title only inside a
title phrase (a rare given name), attaching to `gen`, `general` and
`sir`: `Brig Gen Mark Kimmitt` and a trailing `BRIG. GEN.` read the
title, a bare `Brig` the given name as before.

`hon`, the British style and a Cantonese given name, keeps the title
by default; zh.toml gives it a given reading off by default, which a
Chinese choice turns on. No words-to-spare count separates the two:
a two-syllable Cantonese given name leaves two words after it, as the
commonest titled name does. Under the choice the formal styles keep
the title through partners (`Rt Hon`, `Hon Mrs`, `Hon Justice`), the
written-short mark (`SMITH, JOHN HON.`) and a new rules/H9 clause: a
style that may be a given name has its partner in the article before
it (`The Hon John Smith`), which moves `The Grace Smith` to title
'The Grace' in the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design-docs review found the first build's article clause moving
seven gated styles in the default (`The Sheikh Mohammed bin Rashid`
read title 'The Sheikh', reversing 2.7's epithet reading) and every
comma shape (`John Smith, the Sheikh`), against rules/H9's epithet
bullet. Written short, it reaches `hon` alone and moves no default
reading. The decisions record moves the two Standing lines out of the
Log, gives the words-after-Hon table its recipe, counts FEC's 14 as 6
names and 8 styles (3 past a second comma), records the six-word
ceiling on hon's partners and the Hon Dr / Hon Ms cost, and corrects
an example and a count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added bug design vocabulary Per-word vocabulary model and language packs labels Nov 3, 2026
@derek73 derek73 self-assigned this Nov 3, 2026
Pin what no test held: the article clause's written-short guard
(`The Sheikh Mohammed bin Rashid` and `The Grace Smith` keep the
epithet), brig's mark and its `general` and `sir` partners (`John
Smith Brig.`, `Brig General John Smith`, `Brig Sir John Smith`), and
hon's `lady` partner; the zh test now asserts whole readings and the
one-comma cost (`John Smith, Hon`), recorded in decisions/H9 and the
docs with the styled shape `The Hon Hon Wah Chan`.

Correct the prose: `rt` is no modifier, three words after Hon is the
commonest titled shape, 10 of UKEC's 11 are bare; and name the
article partner in title_readings' docstring, `_STYLE_ARTICLES`,
`_KIND_FIELDS`, AGENTS.md, the vocab README and rt's note. locales.rst
says the zh pack makes no choice of languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.0 milestone Nov 3, 2026
@derek73
derek73 merged commit df7b182 into master Nov 3, 2026
20 of 21 checks passed
@derek73
derek73 deleted the feat/hon-brig branch November 3, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug design vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant