You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recognize spaced CJK postnominal honorifics as suffixes (#307)
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>
Copy file name to clipboardExpand all lines: docs/release_log.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Release Log
25
25
- Fix names containing 〆 (U+3006, the shime mark that opens Japanese surnames like 〆木 and 〆谷) parsing given-first: the script classifier now counts 〆 as Han, extending the 々 entry the table already carries, and going a step further than it — 々 is Script=Han and merely outside the ideograph blocks, while 〆 is Script=Common — so these names take the East Asian family-first reading like any other wholly-Han name. ``Policy(script_orders={})`` restores the positional reading for these names exactly as for other wholly-Han names (#303)
26
26
- Fix the katakana middle dot ``・`` (U+30FB, and its halfwidth twin U+FF65) being read as part of a name rather than as the divider it is: it now separates tokens exactly as a space does. A transcribed foreign name therefore divides into its parts and, being wholly katakana, keeps its source order — ``"マイケル・ジャクソン"`` gives given ``マイケル``, family ``ジャクソン``, where 1.x left the whole string in ``first`` — while a kanji pair written the same way takes the family-first rule (``"高橋・一郎"`` → family ``高橋``). Native Japanese names never contain this character and no other script's names use it, so the separation is unconditional, which also means it is **not** covered by the two policy opt-outs. Rendering follows, the way the Korean split's does: the dot comes back as a space, so ``str(HumanName("マイケル・ジャクソン"))`` is now ``"マイケル ジャクソン"``, and that reaches delimited content too — the nickname in ``"山田 太郎 (マイケル・ジャクソン)"`` renders ``"マイケル ジャクソン"``. The Chinese interpunct ``·`` is not an unconditional separator like these two: U+00B7 is also the Catalan punt volat and appears inside legitimate names (``Gal·la``), so it divides only between classified-script characters — the transcription treatment it marks is #298's (#272)
27
27
- Fix 间隔号-divided transcriptions parsing as one unsplit token: U+00B7 — the interpunct Chinese text divides a transcribed foreign name with, ``威廉·莎士比亚`` for William Shakespeare — is now a token separator between characters of a classified script, and a name it divides keeps its source order and is never segmented: the dot is the transcription marker, playing the role pure katakana plays in the kana license. It divides ONLY between classified-script characters, so the Catalan punt volat interior to names like ``Gal·la`` is untouched. The Japanese nakaguro is deliberately not a transcription marker — ``高橋・一郎`` is roster formatting, 姓・名, and keeps its family-first reading — so a transcription typed with the wrong dot (``威廉・莎士比亚``) reads by the convention of the codepoint it was typed with; like the spaced form, only the Chinese dot rescues it. Rendering stays space-joined (``str(HumanName("威廉·莎士比亚"))`` is ``"威廉 莎士比亚"``); a custom ``string_format`` such as ``"{first}·{last}"`` reinstates the dot (#298)
28
+
- Fix spaced CJK postnominal honorifics parsing as name parts: 씨, 박사, 선생님, 교수님, 군, 양 (Korean — standardly written as their own token), 先生, 女士, 小姐, 博士, 教授 (Chinese), and 様, 氏 (Japanese) now route to ``suffix``, so ``王小明 先生`` reads family ``王小明`` where the family-first default had confidently made 先生 the given name. Whole-token matching — which reaches glued hangul too, since default segmentation splits ``김씨`` into 김 + 씨 before the suffix is classified (and glued Han the same way under ``locales.ZH``); a glued kana honorific (``山田太郎様``, ``田中さん``) stays out of reach, tracked as #308 (closes #307)
28
29
- Fix NFD-decomposed input missing the East Asian defaults entirely: script classification now normalizes to NFC before deciding, so a Korean or Japanese name typed on macOS — where decomposed text is routine — gets the same order rule as its composed twin, which it silently did not before. Segmentation MATCHING deliberately stays raw, so an unspaced NFD hangul name is ordered correctly but not split, rather than being split in the wrong place. One gotcha worth stating plainly: parse output preserves the encoding it was given, so for NFD input ``name.family == "김"`` is ``False`` even though it is the same name — compare NFC-normalized text when comparing across encodings (#272)
0 commit comments