Skip to content

Read junior and senior in 34 more languages; let any suffix word start the credential run - #685

Merged
derek73 merged 4 commits into
masterfrom
feat/issue-679-generational-roster
Oct 14, 2026
Merged

derek73 merged 4 commits into
masterfrom
feat/issue-679-generational-roster

Conversation

@derek73

@derek73 derek73 commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Closes #679.

1. Any suffix word starts the credential run, whatever its script

Since #602, a trailing suffix word marks the start of the post-nominals, so John Smith PhD Jones reads suffix PhD Jones. #602 excepted non-Latin honorifics, and the code drew that line by script. #681 then added Cyrillic and Devanagari generational words, and the script line refused those too, so Serbian read differently in its two scripts.

Measured over every non-Latin suffix word (51) in six shapes under three orders (918 parses), the exception protected no correct reading. An honorific followed by a name word read as a middle name, with no report:

Input Before Now
राम शर्मा साहब मोहन middle शर्मा साहब, family मोहन family शर्मा, suffix साहब मोहन, reports suffix-or-name
Ана Хорват старији Џонс middle Хорват старији suffix старији Џонс, as Ana Horvat stariji Jones reads

2. 76 more junior/senior words, 34 more languages

The new words come from CLDR's generation samples. Each was checked against real trailing usage on its own language's Wikipedia, and for name collisions with tools/name_usage.py.

CLDR's word turned out to be unreliable in about a third of languages. Some entries are field-label translations, some are adjectives written before the name, and some are abbreviations nobody uses. In those languages, the word the language's Wikipedia actually writes after names ships instead (lo, ti, or, ta, si, mk).

Input Before (1.4.0 / 2.4.2) Now
ロバート・ダウニー・ジュニア whole text first / family ジュニア family ダウニー, suffix ジュニア
로버트 다우니 주니어 family / middle 주니어 suffix 주니어, peeled before the hangul family-first order applies
جورج بوش الابن — suffix الابن

Excluded, with reasons in decisions.md#generational-words:

Cyrillic мл. ships. Russian, Bulgarian and Serbian all write it after names, and it collides with nothing in Cyrillic.

Measured

  • Corpus: 16 CLDR corpus renderings move (is, ar, fa, gu, kn, ml, ru, cv), each gaining its generation word as the suffix.
  • CLDR agreement: cldr_agreement shows 4 suffix fields newly agreeing and no regression. 40 fields changed but still disagree: in 12 suffix fields the generation word is now the suffix but the credential after the comma isn't taken (yngri where CLDR has yngri þingmaður), and in 28 family or given-name fields the generation word left a field that is still wrong for other reasons.
  • Wheel checks: the readings in the two new case rows were checked against the 1.4.0 and 2.4.2 wheels.
  • Checks: the full suite, mypy, ruff and the Sphinx doctests pass.

Review

  • Code review: found stale мл comments and a docstring list that omitted honorifics. Both fixed.
  • Design-docs review: found that my honorific grid had keyed results by each order's first role, so one order overwrote another. The corrected figures and the recompute recipe are now in decisions.md. It also found the CLDR agreement gain overstated (field gains reported as whole renderings), a missing cv in the mover list, weak evidence for excluding シニア (kept out by Derek's call), and two test comments still describing the honorific refusal.

No release-log bullet for part 1: only input with a name word after an honorific reaches it. Part 2 widens #681's existing bullet.

🤖 Generated with Claude Code

derek73 and others added 4 commits October 14, 2026 01:20
#602 kept a non-Latin honorific from starting the trailing run and
drew that line by script, the vocabulary having no honorific marker;
#661's Cyrillic and Devanagari generational words were refused with
them, splitting Serbian by script. Measured over every non-Latin
suffix word in six shapes and three orders, the exception protected no
correct reading: an honorific followed by a name word read as a middle
name, in silence ("राम शर्मा साहब मोहन" gave middle 'शर्मा साहब').
Now it reads as the suffix it is, the word behind it absorbed and
reported, as "John Smith PhD Jones" reads. No corpus name moves.

Drops _all_latin and S2's honorific exclusion and #681's Accepted
clause; S2's examples now pin the run in Cyrillic and Devanagari.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
76 more words join SUFFIX_WORDS from CLDR's generation samples, each
checked against real trailing usage on its own language's Wikipedia
and for name collisions. Where CLDR's word is a label translation, an
adjective written before the name, or unused, the word the language's
Wikipedia writes after names ships instead (lo, ti, or, ta, si, mk).

Left out with reasons in decisions.md#generational-words: the
transliterated "senior" forms measured as the surname Senior (he, ja),
given names and surnames (Ավագ, ជូនៀ, Ajala), initials-shaped
abbreviations, and fr fils/père and the Latin ml./st., whose
collisions are with other languages and wait on a locale pack. The
Cyrillic мл. ships: nothing collides with it in Cyrillic.

16 CLDR corpus renderings move, each gaining its generation word as
the suffix; cldr_agreement gains 5 and regresses none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design-docs review found the honorific grid keyed by each order's
first role, so FAMILY_FIRST_GIVEN_LAST overwrote FAMILY_FIRST: it is
918 parses with 360 of 576 honorific and 285 of 342 generational ones
moving, not 612/240/190; the recipe is now in the entry. The agreement
claim counted one field twice and called field gains renderings: 4
suffix fields newly agree, none regress. Also: the mover list misses
cv, the Senior evidence for ja is a Wikidata label of the English
surname rather than Japanese writing, the #602 entry gains pointers to
its retraction, and two test comments still stated the honorific
refusal. The code review's stale мл comments are fixed too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.5 milestone Oct 14, 2026
@derek73 derek73 self-assigned this Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.03%. Comparing base (4410d90) to head (2620ddb).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #685      +/-   ##
==========================================
- Coverage   99.03%   99.03%   -0.01%     
==========================================
  Files          46       46              
  Lines        4543     4541       -2     
==========================================
- Hits         4499     4497       -2     
  Misses         44       44              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73
derek73 merged commit 1a4e8a1 into master Oct 14, 2026
12 checks passed
@derek73
derek73 deleted the feat/issue-679-generational-roster branch October 14, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Junior" in more languages: Alexandre Dumas fils reads family fils

1 participant