Skip to content

양. 지훈 splits the given name in half #323

Description

@derek73
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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions