Skip to content

Give the honorifics a view of their own, leaving credentials (#326) - #1041

Merged
derek73 merged 4 commits into
masterfrom
feat/honorifics-view
Nov 3, 2026
Merged

derek73 merged 4 commits into
masterfrom
feat/honorifics-view

Conversation

@derek73

@derek73 derek73 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Closes #326.

What

The suffix's views were two, generation and credentials, and every word that was neither a generation nor a credential fell into credentials, honorifics included: parse("김민준 씨").credentials was '씨'. A form of address after the name now has a view of its own.

generation credentials honorifics
Smith, John, Jr., MD, Esq. Jr. MD, Esq.
田中さん, PhD PhD さん
王小明先生 先生
雅婷婷婷王二世先生,議員 議員 先生
  • The honorific kind (19 words: さん, 様, 씨, 님, 氏, जी, साहब…) and the professional_honorific kind (11: 先生, 教授, 선생님, 社長, 課長, 部長…) compile into a new internal set, HONORIFIC_WORDS. Token.reading reads these words as the new ReadingKind.HONORIFIC.
  • A courtesy (Esq.) and a status (ret., ז"ל) stay in credentials, read as post-nominal. CLDR's own examples of its credentials field include Esq..
  • Six offices that CLDR's samples file as credentials (議員, 议员, 国会議員, 國會議員, 太平紳士, 太平绅士) are now credential words written as words, as 博士 already was. CLDR files 先生, 教授, さん and 님 as titles, which is the honorifics view's ground.
  • ParsedName.honorifics is a view like family_base: a render key ({honorifics}), not a field of as_dict().

Why now

credentials is new in 3.0. Narrowing it after 3.0 ships would change a released view. CLDR's en pattern writes {surname} {generation}, {credentials}, which with the honorific in credentials would render Kim Minjun, ssi once a pack carries patterns.

What moved

  • No field of any parse. suffix keeps every word, and as_dict(), replace() and the repr are unchanged.
  • Views only. 73 of the snapshot's 6,793 readings record the new view. In 21 of them it sits beside other suffix words (田中さん, PhD).
  • Ambiguity.alternative. It names honorific where 2.7.0 and 2.8.0 named post-nominal for six lone Devanagari and Bengali words (जी, साहब…).

Docs

  • rules/R8 is renamed for its three views (R8-generation-credentials-and-honorifics-views.md, in both rules/ and decisions/).
  • decisions/R8 has a dated 2026-11-03 Should suffix split into generation and credentials? (Smith, Jr., PhD) #326 entry: the options weighed, the CLDR evidence for the split, and the recompute recipes.
  • The Open line in decisions/suffix-field-composition is closed.
  • R1, the S Background, decisions/vocabulary-model, the RFC, usage.rst, the release log and tools/differential/README.md are updated.
  • The snapshot records honorifics where it is not empty (RECORDED_LATER).
  • rules_budget.json is re-recorded: R8's Then grew by one clause, which reads the signal it already read, each word's reading kind.

Verification

  • Full suite on 3.11 and 3.15, ruff, mypy, build.py --check and the Sphinx doctest build all pass.
  • Three independent reviews: code, design docs, and the fix commits.
    • The design-docs review found the CLDR evidence that split professional_honorific.
    • The fix-commit review parsed 90 office-word texts under six configurations (default, FAMILY_FIRST, ZH, JA, strict zh and strict ja) in both trees. Nothing moved except views.

🤖 Generated with Claude Code

derek73 and others added 4 commits November 3, 2026 14:43
A form of address written after a name (`さん`, `씨`, `先生`) left
the `credentials` view for a third, `ParsedName.honorifics`, so the
suffix's three views are generation, credentials and honorifics.
The `honorific` and `professional_honorific` kinds compile into
HONORIFIC_WORDS, classify tags them, and `Token.reading` reads them
as the new `ReadingKind.HONORIFIC`; a courtesy (`Esq.`) and a status
(`ret.`) stay credentials, read as `post-nominal`.

No field of any parse moves: `suffix` keeps every word. The snapshot
records the new view where it is not empty (83 of 6,790 readings),
and rules/R8 is renamed for its three views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Classify's Reads: and its emitted tags name honorific_words and
vocab:honorific-word; the compile-invariant test covers the new kind
set; R1, the S Background, decisions/R8's Standing lines and its 4b
entry, vocabulary-model's Standing line and its 2026-10-28 entry, the
RFC's API table and tools/differential/README.md now say three views
or carry a supersession note; the snapshot denominator is 6,791.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design-docs review found that CLDR's own samples put `議員`,
`国会議員` and `太平紳士` in its credentials field and `先生`, `教授`,
`さん` and `님` in its title field, so the first build's whole-kind
move of `professional_honorific` into `honorifics` took six offices
out of the field CLDR puts them in. Those six, in ja.toml and zh.toml
alike, are now credentials written as words, as `博士` is; their
glued peel is unchanged. rules/R8's Because no longer says CLDR's
credentials field never holds such a word, and its Accepted records
that a courtesy said to the bearer (`Rinpoche`, `महाराज`) stays a
credential by its kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R8's Because named 씨, which CLDR's samples never file; 님 is the
Korean word they file as a title. The decisions entry gains recipes
for its kind counts and its lone-word alternatives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.0 milestone Nov 3, 2026
@derek73 derek73 added enhancement vocabulary Per-word vocabulary model and language packs labels Nov 3, 2026
@derek73 derek73 self-assigned this Nov 3, 2026
@derek73
derek73 merged commit 3ddc7db into master Nov 3, 2026
13 checks passed
@derek73
derek73 deleted the feat/honorifics-view 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.

Should suffix split into generation and credentials? (Smith, Jr., PhD)

1 participant