Repository navigation
Read junior and senior in 34 more languages; let any suffix word start the credential run - #685
Merged
Merged
Conversation
#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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 Jonesreads suffixPhD 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:
राम शर्मा साहब मोहनशर्मा साहब, familyमोहनशर्मा, suffixसाहब मोहन, reportssuffix-or-nameАна Хорват старији ЏонсХорват старијистарији Џонс, asAna Horvat stariji Jonesreads_pieces._all_latin(added in Read junior and senior in other languages as suffixes #681), S2's honorific exclusion, and Read junior and senior in other languages as suffixes #681's Accepted clause. decisions.md#S2 records the retraction.2. 76 more junior/senior words, 34 more languages
The new words come from CLDR's
generationsamples. Each was checked against real trailing usage on its own language's Wikipedia, and for name collisions withtools/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).
ロバート・ダウニー・ジュニアジュニアダウニー, suffixジュニア로버트 다우니 주니어주니어주니어, peeled before the hangul family-first order appliesجورج بوش الابنالابنExcluded, with reasons in decisions.md#generational-words:
סניור(an Israeli surname) and Japaneseシニア.Ավագ,ជូនៀandAjala, which are names.fils/père(the surnameFils, 767 US Census bearers) and the Latinml./st.(cs/sk/sl/hr). Their collisions are with other languages written in the same script, so they wait on a locale pack (Locale packs forAlexandre Dumas filsandJiří Dienstbier ml.: generational words that collide outside their language #684).Cyrillic
мл.ships. Russian, Bulgarian and Serbian all write it after names, and it collides with nothing in Cyrillic.Measured
cldr_agreementshows 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 (yngriwhere CLDR hasyngri þingmaður), and in 28 family or given-name fields the generation word left a field that is still wrong for other reasons.Review
млcomments and a docstring list that omitted honorifics. Both fixed.cvin 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