Recognize spaced CJK postnominal honorifics as suffixes - #310
Merged
Conversation
CJK honorifics and degrees FOLLOW the name, and under the 2.1 family-first defaults an unrecognized one confidently became a name part: 王小明 先生 read given=先生, 김민준 씨 put the honorific in middle. Thirteen curated entries join SUFFIX_NOT_ACRONYMS beside the Hebrew post-nominal block -- ko 씨/박사/선생님/교수님/군/양 (standardly spaced in Korean orthography, the strongest case), zh 先生/女士/小姐/博士/教授, ja 様/氏, with 先生/博士/教授 shared Han serving both languages. Self-selecting like the Korean surnames: a Han or hangul entry can only ever match CJK text. Vetted per the file's мл/ст standard; 氏 and the ko single-syllable pair 군/양 are argued in the comment, and the trailing-only position gate keeps surname-position 양 (양 미선) untouched. The order interaction needed no mechanism: suffix classification runs after script_segment and before the positional read, so the rows pass on vocabulary alone, through both the core and facade runners. Review found the scope claim wrong in the good direction: glued HANGUL honorifics are reached too, because default segmentation splits 김씨 into 김 + 씨 before suffix classification -- a partial delivery of #308 that falls out of stage order (glued Han needs the zh pack the same way; glued kana stays #308). Docs and the config comment state it, and case rows pin the glued and post-comma shapes alongside the four spaced ones. Differential: the new fix(cjk-honorific-suffix) rule takes the compound diffs (honorific recognition x CJK flip), keyed on the honorific alternation per the maiden-marker precedent and anchored to a WHOLE trailing token -- a glued ending must not match, or a genuine given name ending in 양/군 could have a real regression absorbed. The alternation is a hand copy of the config's CJK entries, pinned by a sync test that DERIVES the expected set from SUFFIX_NOT_ACRONYMS by script membership. Glued-hangul diffs fall to fields-only suffix-routing by their shape, noted in the rule. Harness: 698 names, 56 intentional, 0 unexplained. Closes #307 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #310 +/- ##
=======================================
Coverage 98.45% 98.45%
=======================================
Files 41 41
Lines 2776 2776
=======================================
Hits 2733 2733
Misses 43 43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…claims The PR review's convergent finding: 'glued hangul is reached' was overbroad in four places. Segmentation splits off ONE leading surname, so a glued honorific is reached in exactly the surname+honorific shape (김씨, 王先生 under zh) -- a glued honorific after a GIVEN name (김민준씨, 王小明先生), the more common written form, stays out of reach and belongs to #308. Every surface now states the boundary, and six new case rows pin it and the other prose-only claims: the two glued contrast pairs, whole-token matching (김지양 -- 지양 ENDS with 양 and must not peel, the parser-side twin of the differential anchor), surname-position 양 (양 미선 keeps family Yang), and the trailing honorific run (김민준 박사 씨 peels both, the Latin multi-suffix loop). The vetting comment gains its third named entry -- 博士 is an attested Japanese given name (ひろし, Hiroshi), argued rather than omitted -- plus the 양-surname overlap the 씨 argument covered only implicitly, and a sentence recording why bare hangul 선생/교수 deliberately do not ship. The differential rule comment corrects the 김씨 diff shape ({first, last, suffix}: v1 held the whole token in first, so last moves too), states the mixed-Latin shadow ('Wang Xiaoming 先生') as accepted rather than denied, and explains the anchor at the name-string level where it actually operates. The release log recovers the shared-Han fact (先生/博士/教授 serve Japanese too). Harness: 704 names, 62 intentional, 0 unexplained. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Closes #307. Thirteen curated CJK honorifics and degrees join
SUFFIX_NOT_ACRONYMS(beside the Hebrew post-nominal block, vetted per the file's мл/ст standard): Korean 씨/박사/선생님/교수님/군/양 — standardly spaced in Korean orthography, the strongest case — Chinese 先生/女士/小姐/博士/教授, Japanese 様/氏, with the shared-Han 先生/博士/教授 serving both languages. Under the 2.1 family-first defaults an unrecognized honorific confidently became a name part (王小明 先生→ given=先生); now it routes tosuffixand the remaining name takes its normal reading. Entries are self-selecting — Han/hangul vocabulary can only match CJK text — so no script conditioning is involved. No mechanism changes: suffix classification already runs after segmentation and before the positional read.Review upgraded the scope in the good direction: glued hangul honorifics are reached too — default segmentation splits
김씨into 김 + 씨 before the suffix is classified, a partial delivery of #308 that falls out of stage order (glued Han needslocales.ZHthe same way; glued kana stays #308). Docs state it and case rows pin the glued and post-comma shapes alongside the spaced ones. The position gate protects surname-position collisions:양 미선keeps 양 as the family name.Differential: a new
fix(cjk-honorific-suffix)rule takes the compound diffs, keyed on the honorific alternation (maiden-marker precedent) and anchored to a whole trailing token so a genuine given name ending in 양/군 can never have a regression absorbed; a sync test derives the expected alternation from the config by script membership. Harness: 698 names, 56 intentional, 0 unexplained.Test plan
🤖 Generated with Claude Code