Skip to content

Read junior and senior in other languages as suffixes - #681

Merged
derek73 merged 2 commits into
masterfrom
fix/issue-661-generational-words
Oct 14, 2026
Merged

derek73 merged 2 commits into
masterfrom
fix/issue-661-generational-words

Conversation

@derek73

@derek73 derek73 commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Closes #661. Closes #678.

What changes

31 junior/senior words join SUFFIX_WORDS. The languages are hr/sr/bs (Latin and Cyrillic), bg, ru, uk, cs/sk, fi, lt and hi, with feminine forms beside the masculine:

Input Before (1.4.0 through 2.4.2) Now
Antonio Pavlović mlađi middle Pavlović, family mlađi family Pavlović, suffix mlađi
Агриппина Младшая family Младшая suffix Младшая
बलबीर सिंह सीनियर middle सिंह, family सीनियर family सिंह, suffix सीनियर

Each word passed two checks:

  • Collisions: none (tools/name_usage.py: US Census, SSA, Wikidata).
  • Usage: found written spaced after the name in real titles on its own language's Wikipedia. The issue's candidate list came partly from machine-translated data, so this check mattered.

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

The #602 run start now tests Latin script instead of ASCII. rules.md#S2 lets "an unambiguous Latin suffix word" start the trailing credential run, and the code implemented "Latin" as isascii(). Without a change, the first accented members would have split one language: Pieter Bruegel stariji Jones would start the run and Antonio Pavlović mlađi Jones would not.

  • A non-ASCII word now counts as Latin when every letter's Unicode name is a LATIN one. The ASCII path is unchanged; the reference row stays at 307 frames.
  • New S2 examples pin both directions. Taro Tanaka さん Jones and Гай Плиний Старший Иванов keep their family names; nothing guarded those before. Mutating the test either way fails the examples.

Accepted (rules.md#S2): the non-Latin refusal is drawn by script, because the vocabulary doesn't mark which suffix words are honorifics. So Cyrillic and Devanagari generational words don't start the run, and Serbian reads by its script (Ana Horvat stariji Jones vs Ана Хорват старији Џонс). Only a name word written after the generational word reaches this; none of CLDR's renderings has one there. Settling it is #679.

Measured

  • Snapshot: six corpus names move, all CLDR hr/sr renderings carrying mlađi/млађи, each gaining the suffix. The rest of the snapshot diff is the new rules-corpus example lines.
  • CLDR agreement: cldr_agreement records 14 changes, all toward CLDR's fields. The bg/hi renderings don't move because those locales' formats drop the generation field.
  • Wheels: the "before" readings above were checked against the 1.4.0 and 2.4.2 wheels. Antonio Pavlović mlađi was also checked on 2.0.0 through 2.4.1.
  • Gate: full suite, mypy, ruff, Sphinx doctests and README pass.

Review

AGENTS.md's "Adding a word to a config set" paragraph now says to read the rule behind any spelling test (isascii, isalpha, script checks) before adding a set's first accented or new-script member.

Follow-ups

🤖 Generated with Claude Code

derek73 and others added 2 commits October 14, 2026 00:30
Add 31 spelled-out generational words to SUFFIX_WORDS -- hr/sr/bs,
bg, ru, uk, cs/sk, fi, lt and hi, feminine forms beside the masculine
-- so "Antonio Pavlović mlađi" reads family Pavlović, suffix mlađi,
where 1.4.0 through 2.4.2 read middle Pavlović, family mlađi.

Each word was checked for name collisions (tools/name_usage.py) and
found in the trailing spaced position in real titles on its own
language's Wikipedia. Excluded with reasons in
decisions.md#generational-words: kıdemli, sóisearach/sinsearach,
Hungarian ifj./id., Bulgarian млада, and the ml./мл./st. abbreviations.

The #602 run start implemented rules.md#S2's "Latin" as isascii(),
which the first accented members would have split: "stariji Jones"
started the run and "mlađi Jones" did not. It now reads a non-ASCII
word's letters by their Unicode names; S2 gains examples pinning both
that and the non-Latin refusal ("Taro Tanaka さん Jones"), which
nothing guarded before.

Six CLDR corpus renderings (hr, sr) move, all toward CLDR's fields;
snapshot and cldr_agreement re-recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second review round found the run-start bullet presenting the
refusal of Cyrillic and Devanagari generational words as what S2's
"Latin" settles, though S2's stated reason for the refusal (an
honorific carries no credential mark) is not true of them. Serbian
splits by script: "Ana Horvat stariji Jones" reads suffix
'stariji Jones' and "Ана Хорват старији Џонс" family Џонс. Accepted
under rules.md#S2 with that pair as its examples, since only a name
word after the generational word reaches it; settling it is #679.

Also scope the measurement bullet: the run-start change moves no name
the corpus held before, its one mover being S2's own new example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 (625bc7e) to head (222ddf9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #681   +/-   ##
=======================================
  Coverage   99.03%   99.03%           
=======================================
  Files          46       46           
  Lines        4541     4543    +2     
=======================================
+ Hits         4497     4499    +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 e355e7a into master Oct 14, 2026
12 checks passed
derek73 added a commit that referenced this pull request Oct 14, 2026
…t the credential run (#685)

* Let any suffix word start the credential run, whatever its script (#679)

#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>

* Read junior and senior in 34 more languages as suffixes (#679)

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>

* Correct the #679 measurements and stale comments (review round)

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>

* Link the pack follow-up (#684) and record the シニア call

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 deleted the fix/issue-661-generational-words 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

1 participant