Repository navigation
Description
A CJK honorific reaches the vocabulary only when the name is typed with the exact codepoints the lexicon expects. Three compatibility spellings miss it, all silently — the honorific lands in a name field and nothing is reported:
parse("김민준 씨.") # family 김, given 민준, suffix 씨. <- ASCII period, works
parse("김민준 씨.") # given 김, middle 민준, family 씨. <- U+FF0E fullwidth
parse("김민준 씨。") # given 김, middle 민준, family 씨。 <- U+3002 ideographic
parse("김민준 씨。") # given 김, middle 민준, family 씨。 <- U+FF61 halfwidth ideographicThe fullwidth and ideographic stops are the ones a CJK writer is more likely to type than the ASCII one, since they are what a Japanese or Chinese IME produces by default.
Three different mechanisms, one candidate fix
1. Full stops. _lexicon._normalize does .strip("."), ASCII only, so _normalize("씨.") is "씨." and the vocabulary lookup misses before any predicate is consulted.
2. Halfwidth katakana. is_initial("ラ.") is True while is_initial("ラ.") is False. _SCRIPT_RANGES deliberately excludes U+FF65–FF9F ("legacy bank/CSV data uses it, but it is a separate normalization problem"), and _policy._NO_INITIALS silently inherits that exclusion — so the constant does not enforce its own stated rule on the halfwidth spelling of the same character. Nothing misroutes today, because every kana honorific is multi-character, but the inconsistency is now written into a documented rule.
3. NFD hangul. Decomposed Korean misses where decomposed Japanese does not:
parse(NFD("김민준, 씨.")) # title 씨., family 김민준 <- wrong
parse(NFD("田中さん, 様.")) # family 田中, suffix さん, 様. <- rightHangul decomposes into jamo (3+ characters, so no single-character shape matches); Han does not decompose at all. #272 deliberately kept segmentation matching raw, so this is a known consequence — but the ko/ja asymmetry is not recorded anywhere.
The shared decision
An NFKC fold for vocabulary lookup only would address all three — U+FF0E→., ラ→ラ, and NFD→NFC by composition. That is a single change with one risk profile to evaluate, rather than three patches.
The anti-#100 invariant makes this delicate: token spans must index the original string exactly, so any normalization has to happen at lookup and must never rewrite token text. _normalize already works this way, which is why it is the natural home.
Found while reviewing #320 (PR #321). Not a regression — master agrees on every row above. #320's release note is scoped to the ASCII period so it does not imply otherwise.
Activity
Merge pull request #522 from derek73/claude/322-cjk-full-stop
derek73 commentedon Sep 11, 2026
Closed by #522 (merge commit 555270e, 2.3.0 unreleased).
What shipped.
_lexicon.FULL_STOPSnames the four full stops --.,.U+FF0E,。U+3002,。U+FF61 -- and the lookup fold_normalizestrips them at word edges and NFC-composes non-ASCII words, so김민준 씨.,씨。,씨。and NFD김민준, 씨.all reach the suffix entry; the stop stays on the token. The three mechanisms this issue named resolve as: (1) full stops -- fixed by the stop set; (3) NFD hangul -- fixed by NFC at lookup and at storage (no shipped entry changes under it, pinned by a test; the fold reaches Latin too, so a decomposedSeñoris a title now); (2) halfwidth kana -- recorded, not fixed:_SCRIPT_RANGESexcludes U+FF65-FF9F on purpose, and the misroute is at the H2 shape site (タナカ. Johnreads title) rather than atis_initial; a width-folding question, left open with no issue filed.One premise corrected. An NFKC fold would not have covered all three: NFKC maps
.to.and。to。but leaves。U+3002 as it is, so an explicit stop set was needed regardless. NFKC was declined, not deferred (decisions.md#cjk-full-stopscarries the measurement and the reasons).One consequence, decided as a release-note line: a
Lexiconpickled by 2.1.x/2.2.x with a caller-added wide-stop or NFD entry no longer loads; rebuild it from its source. Shipped vocabulary is unaffected.fix(derek73#322): the lookup fold reads every full stop and composes NFC
docs(design): the CJK full-stop bundle; corpora, ledgers and release …
docs: full stops of any width and NFD lookup in usage.rst; a declared…
Give the W and O decisions files a Standing block (#762) (#816)
Read the period off every full stop the vocabulary strips