parse("양 지훈") # given 지훈, family 양 correct
parse("양. 지훈") # given 양., middle 지, family 훈 wrong
지훈 is one given name. The second form cuts it in two.
This is exactly the harm _script_segment._is_post_nominal's docstring names — "지 is a listed surname, so 양 지훈 … would have its own given name split in half" — and the guard that prevents it is standing right there, unable to fire.
Why it cannot fire
_split_surname_site picks its site by effective_script(...) in scripts. effective_script("양.") returns None, because the trailing period defeats the wholly-one-script test, so the site scan steps straight past 양. and lands on the given name. The guard downstream never gets asked.
effective_script("양") -> hangul
effective_script("양.") -> None
is_suffix_strict("양.") -> True (since #320)
That last line is what makes this newly visible rather than newly broken: #320 made _is_post_nominal("양.") return True, so the predicate now says "this is a post-nominal" while the caller structurally cannot ask it. Output is identical on master, so this is not a regression — but the branch created the half-state that makes the gap legible.
양 and 군 are the shipped vocabulary's designated risk class (config/suffixes.py singles them out — 양 is a top-tier Korean surname), which is why this shape is worth fixing rather than filing as a curiosity.
Two candidate fixes, and the choice matters
- Teach the surname site to consult
is_suffix_strict alongside effective_script.
- Make
effective_script tolerant of a trailing period.
The second is broader and would interact with the normalization question in #322.
Found while reviewing #320 (PR #321).
지훈 is one given name. The second form cuts it in two.
This is exactly the harm
_script_segment._is_post_nominal's docstring names — "지 is a listed surname, so양 지훈… would have its own given name split in half" — and the guard that prevents it is standing right there, unable to fire.Why it cannot fire
_split_surname_sitepicks its site byeffective_script(...) in scripts.effective_script("양.")returnsNone, because the trailing period defeats the wholly-one-script test, so the site scan steps straight past양.and lands on the given name. The guard downstream never gets asked.That last line is what makes this newly visible rather than newly broken: #320 made
_is_post_nominal("양.")returnTrue, so the predicate now says "this is a post-nominal" while the caller structurally cannot ask it. Output is identical onmaster, so this is not a regression — but the branch created the half-state that makes the gap legible.양 and 군 are the shipped vocabulary's designated risk class (
config/suffixes.pysingles them out — 양 is a top-tier Korean surname), which is why this shape is worth fixing rather than filing as a curiosity.Two candidate fixes, and the choice matters
is_suffix_strictalongsideeffective_script.effective_scripttolerant of a trailing period.The second is broader and would interact with the normalization question in #322.
Found while reviewing #320 (PR #321).