Repository navigation
Description
A v1 Constants set entry or capitalization_exceptions key that consists only of a CJK full stop (。, . or 。) raises at the first parse from 2.3.0 on. 1.4.0 through 2.2.0 accept it. This breaks the shim's contract that it never raises on a config v1 accepted (AGENTS.md, "The shim TRANSLATES").
>>> c = Constants()
>>> c.titles.add("。")
>>> HumanName("john smith", c)
ValueError: Lexicon.titles entry '。' normalizes to empty ...Cause. #322/#323 (2.3.0) made Lexicon._normalize strip edge FULL_STOPS (..。。), where it had stripped only the ASCII period. v1's lc(), which SetManager stores, still strips only .. So the shim hands Lexicon an entry that folds to empty, and _normset rejects it. This is the same two-folds gap as #541, on a different character class.
Measured (adding the entry, then parsing a text it acts on):
| field | 1.4.0 – 2.2.0 | 2.3.0 and the #581 branch |
|---|---|---|
titles (。 john smith) |
title 。 |
ValueError |
prefixes (john 。 smith) |
last 。 smith |
ValueError |
suffix_acronyms (john smith 。) |
suffix 。 |
ValueError |
conjunctions, bound_first_names |
join | ValueError |
a capitalization_exceptions key '。' |
— | ValueError |
first_name_titles |
— | dropped silently (if t in _snapshot) |
non_first_name_prefixes, suffix_acronyms_ambiguous |
— | inert: only ever subtracted or intersected, never handed to Lexicon |
. and 。 behave the same.
Reach. Only a config that names a full stop by itself as vocabulary. 1.4.0 honored such an entry only on a name token that is nothing but that full stop.
Options
- Drop with the A
Constantsset entry with edge whitespace raisesValueErrorat the first parse:c.suffix_not_acronyms.add('ma ')thenHumanName('John Smith', c)#541 warning (recommended). Extend_v1_matchablewith "andLexicondoes not fold it to empty", so these entries join the same drop and the sameUserWarning. The only reading lost is a lone-。token as a title, particle, suffix or connective, which no real name carries. This departs from 1.4.0 on that one token, so it is recorded in decisions.md under the AConstantsset entry with edge whitespace raisesValueErrorat the first parse:c.suffix_not_acronyms.add('ma ')thenHumanName('John Smith', c)#541 entry. - Keep the raise, but spell it for v1, like the Case repair: letter masks for the exceptions map (phd → PhD, bsc → BSc), md leaves the map, and roman numerals past iv (john smith xi → Xi) #459 mask exception: a message that names
constants.titles.remove('。'). It is honest, but still a raise on a config v1 accepted, which the doctrine ranks below translating.
Note, related but not in scope: since 2.3.0, a titles entry 'dean。' also matches a bare dean, which 1.4.0 did not (1.4.0 through 2.2.0: dean john smith gives no title; 2.3.0: title dean). Same cause, the CJK full stops in _normalize's fold. The behavior widens and nothing raises. Decide when fixing this issue whether to accept it as a widening, as decisions.md#R4's #541 entry does for capitalized keys, or to drop the entry the same way.
Found in the #581 review (decisions.md#R4, 2026-10-02 #541 bullet).
Activity
fix(derek73#582): drop v1 Constants entries Lexicon folds to empty
docs(derek73#582): record the full-stop entry drop
fix(derek73#582): fold entries before the shim's set algebra
docs(derek73#582): date the fold to 2.3.0 and record the edge-full-st…
fix(derek73#582): fold only the two cross-set collisions Lexicon re-c…
docs(derek73#582): describe the narrowed fold and record the declined…
test(derek73#582): pin both sides of each folded collision
Merge pull request derek73#583 from derek73/fix/issue-582-cjk-full-st…