Skip to content

Add British post-nominals; KC, PC and DL gated by the names they collide with (#965) - #976

Merged
derek73 merged 6 commits into
masterfrom
fix/issue-965-british-post-nominals
Oct 31, 2026
Merged

derek73 merged 6 commits into
masterfrom
fix/issue-965-british-post-nominals

Conversation

@derek73

@derek73 derek73 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Refs #965. #965 stays open for two questions recorded as Open lines: whether an unlisted word in capitals should join a listed credential's run in both orders (decisions/S8, CBE XYZ vs XYZ CBE), and telling FREng written in its own mask from the surname Freng (decisions/suffix-acronym-collisions).

What changes

GOV.UK display names (the govuk-people corpus, #962) end in post-nominals that no vocabulary listed. Each one became the family name (Jane Doe KC → family KC), and after a comma the name reversed (Jane Doe, CChem → given CChem). This PR lists them.

  • KC, PC, DL are gated credential words. Each is a credential with acronym = false beside a name reading. It compiles into SUFFIX_WORDS_AMBIGUOUS and is read by rules/S11's count and S6's case lean, as fils is. A dotted K.C./P.C./D.L. is not a spelling of the word, so it stays Should Ram Bahadur B.K. keep B.K. as its family name? #864's paired initials.
    • John Smith KC, Jane Doe, DL → suffix.
    • Ram KC, Anna DL, Ravi PC → family.
  • Supporting changes for the gated words.
    • credential joins GATED_WORDS, and build check 11 is widened. The honorific, status, courtesy, professional_honorific and generic suffix kinds are still refused beside a name reading; each has a mutation row.
    • classify writes the credential kind tag on a gated credential, and _vocab.suffix_kind reads it first. Without that, KC would land in the generation view.
    • Negative control: with master's pipeline, the new _EXPECTED_READINGS and _EXPECTED_ALTERNATIVES rows fail, and so does the existing test_every_suffix_words_reading_alternative_and_index_kind_agree.
  • 18 plain credentials: FRS, KFSM, FRSA, FNucI, MRTPI, FRAeS, CChem, MRPharmS, MIBiol, FRMetS, CStJ, MICFor, MChemA, ACMA, BVSc, HMI, MMS, LLB. Mixed-case ones carry a cased mask.
  • FIET and FREng are gated ambiguous acronyms. Each has a family reading (US Census 2010: Fiet 140, Freng 187).
  • MoID is refused with an excluded reason: Moid is a given name written last (Syed Abdul Moid).
  • Rules amended:
    • S11: the When clause takes the credential word, and there are new Then and Accepted bullets.
    • S6, C4, C12, S2, S5, S7: the class is named "a suffix word that is also a name".
    • R8: a shipped credential listed in suffix_words_ambiguous reads as a credential.
    • S3: the King's Counsel sentence.
  • Decisions: entries in decisions/S11 and decisions/suffix-acronym-collisions, a pointer in decisions/R8, and the Open line in decisions/S8.

Per word

Word Listing Reason
KC gated credential word Nepali surname K.C.: ORCID family box 584 (NP 163); nepal-candidates K.C. 342, K.C 129, Kc 21; psc Kc 30
PC gated credential word initials: ORCID boxes given 149 / family 112 (IN 29); NPPES 2,246 (Professional Corporation)
DL gated credential word initials: ORCID boxes given 54 / family 21; psc Dl 7
FIET gated acronym surname Fiet, US Census 2010: 140
FREng gated acronym (mask FREng) surname Freng, US Census 2010: 187, Wikidata 2
MoID excluded Moid is a given name: psc 4, nepal 2, ORCID given box 20
FRS, KFSM, FRSA, MRTPI, ACMA, HMI, MMS, LLB credential no name population (Census, SSA and Wikidata below their floors)
FNucI, FRAeS, CChem, MRPharmS, MIBiol, FRMetS, CStJ, MICFor, MChemA, BVSc credential with cased mask no name population

Corpus moves

Measured with tools/differential/measure.py --base against master 4ebb51d.

Committed corpora

  • The committed snapshot gains the rules' new examples.
  • Its only move is 2 CLDR fictional Dl (Romanian salutation) renderings under capitalized(force=True): Dl → DL.
  • CLDR, GND and Wikidata agreement: no move.

govuk-people (the issue's recipe)

  • KC as the last family word: 36 → 9. The 9 are peers behind a title, an accepted cost.
  • Other post-nominals ending the family: 27 → 11.
    • Remaining: FREng 3 (accepted), DL 2 behind a peer's title, and 6 names outside this batch.
    • Outside the batch: CEng 3 (newly exposed behind FIET), MNSS 1, KG 1, OM 1.
  • Comma reversals: 16 → 0.

Other corpora

  • ctgov-officials: 9 reversals fixed.
  • ukec-individuals: 5 names gain the suffix (KC 3, DL 2).
  • orcid-researchers: gains AO KC, a comma KC, BA LLB, FRSA.

Accepted costs, recorded in decisions/S11:

  • Three-word Nepali names ending in capital KC read KC as the suffix: orcid 22 (17 agreement regressions with PC), nepal-candidates 5.
  • Initials written KC/PC/DL at the end of a one-case family-comma name are read as the credential: fec 7.
  • M.M.S. as initials: orcid 1.
  • NPPES's 622 P.C. stay paired initials.
  • Masked KC/PC/DL recase surnames and initials in case views. Counts per corpus are in decisions/S11.

No field moves: psc-individuals (reports and case views only). tse-donors has 1 case view. tw-donors and cz-candidates: none.

Checks

  • uv run pytest: 34,034 passed.
  • -n0 -m serial: 42 passed.
  • uv run --python 3.15 pytest: passed.
  • mypy, ruff: clean.
  • Sphinx doctest: 575 tests, 0 failures. README doctest: clean.
  • build.py --check: current.
  • The design-docs-reviewer ran twice, on the change and on the fix commit. Every finding is addressed in the last two commits.

🤖 Generated with Claude Code

derek73 and others added 4 commits October 30, 2026 23:09
…urname (#965)

GOV.UK's display names (govuk-people, #962) end in post-nominals no
vocabulary listed, read as the family name (`Jane Doe KC` -> family
'KC') or reversing a comma name (`Jane Doe, CChem` -> given 'CChem').

- `kc` is a credential written as a word (acronym = false) with name
  readings, gated as a generation word is (rules/S11): `John Smith KC`
  reads the suffix, `Ram KC`, `Ram Bahadur Kc` and `K.C.` keep the
  Nepali surname. `credential` joins GATED_WORDS, classify tags a gated
  credential with its kind and suffix_kind reads it first, so KC fills
  the credentials view, not generation.
- 18 credentials added (FRS, LLB, CChem, FRAeS, MRPharmS, ...), with
  case masks where mixed case; FIET and FREng gated by their surnames
  (Fiet, Freng); MoID refused, Moid being a given name.
- rules S11, S6 and S3 amended; decisions/S11 and
  decisions/suffix-acronym-collisions record the choice, measurements
  and accepted costs; decisions/S8 holds #965's join-order question
  as Open.

PC and DL are left for a separate decision.

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

- `pc` and `dl` are credentials written as words beside family
  readings, gated as `kc` is: `Jane Doe, DL` and `Jane Doe PC` read
  the suffix, `Ravi PC` and `Anna DL` keep the family, the dotted
  spellings read as master did.
- rules/R8 says a shipped credential reads as one even where a caller
  lists it in suffix_words_ambiguous; S11's Then, S6 and the sibling
  bullets (C4, C12, S2, S5, S7) name the class as a suffix word that
  is also a name, not a generation word.
- decisions: KC's govuk count is 27, not 31; S8's Open example uses an
  unlisted word; FREng's mask limit is an accepted cost and an Open
  line; PC/DL's costs, including the Romanian `Dl` force view.
- examples drawn from real corpus records replaced (Gita Bahadur KC);
  check 11's narrower refusals each keep a mutation row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rules/R8: a shipped credential listed in suffix_words_ambiguous reads
  as a credential, and listed in agnomens as an agnomen (not 'either
  set'); decisions/R8 points at decisions/S11's entry.
- decisions/S11: the masks' default capitalized() moves, per corpus,
  for kc and for pc/dl, and the hyphenated 'Pc-' force view.
- decisions/suffix-acronym-collisions: tse-donors moves one case view.
- en.toml: the kc and pc notes point at decisions/S11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added bug vocabulary Per-word vocabulary model and language packs labels Oct 31, 2026
@derek73 derek73 self-assigned this Oct 31, 2026
derek73 and others added 2 commits October 30, 2026 23:47
- freng: drop the `FREng` mask, which respelled the surname ('ANNA
  FRENG' -> 'Anna FREng'), and refuse it with `excluded = { cased }`
  as meng does; a test holds FRENG and FIET to their title case.
- moid: the refusal stands, its reason rewritten on the measurement
  (gated or refused, no name moves in fec, govuk, orcid or psc; gated
  it would gain only MOID and the comma, and cost SYED ABDUL MOID).
- decisions/S11: qc is a credential acronym, not a plain word; the
  mask's case views recounted per corpus with the recipe stated;
  `John Smith AO KC` moved out of the gains, to S8's open shape.
- decisions/suffix-acronym-collisions: orcid gains 3, FREng 2 kept and
  1 newly exposed, ukec's dl moves; FREng's Open points at
  decisions/S6, which now holds it; vocabulary-exclusions names the
  gated-word mask exception.
- rules/S11: When covers a word written as initials; credentials rows
  pin the gated credential's view.
- en.toml: ORCID box counts on acma, llb, mms, cchem and hmi.

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

- decisions/suffix-acronym-collisions: freng carries no mask; the S6
  reading applies to GOV.UK's mixed-case spelling FREng, said so in the
  Standing lines and the entry.
- decisions/vocabulary-collisions: a dated entry and Standing line read
  C-i's ground to include a person's initials written where the claim
  acts, with the same per-word count a name needs (pc, dl); rules/S11's
  Because says so.
- decisions/S11: the whole-word predicate behind the case-view counts
  is stated beside them, with DL's orcid figure under the other count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit d85ef64 into master Oct 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant