Repository navigation
Veto a one-case letter in the strict suffix test as its capital (#727) - #729
Merged
Merged
Conversation
T4 tags a bare lowercase letter in a one-case name an initial, but the strict suffix test vetoes an initial by the word's text, so a lowercase 'v' or 'i' passed where its capital was vetoed. Under lenient_comma_suffixes=False 'john smith, v' read suffix 'v' where 'JOHN SMITH, V' reads given 'V', and 'smith, john, i' reported nothing where its capitals report comma-structure. Under the default policy the honorific peel's scan-back asks the same test, so '田中さん v' peeled さん where '田中さん V' does not. is_suffix_strict takes the one-case fact and vetoes such a letter; segment, _comma and script_segment pass the fact they hold (segment asks for it only under the strict knob). It is a keyword apart from is_wholly_suffix's one_case, which is the credential lean and None by design at callers that want no lean. The lenient default never reads it. The one-case invariant's grid gains three comma shapes and the honorific shape, and runs its comma shapes again under the strict knob: 2444f84 disagreed on 72 of 4,554 pairs, this tree on none; the new control records the 72. '田中さん v' reads as 1.4.0 did. No corpus name moved. Docs: T4 and C1 state it, decisions/T4 records it, the knob's docstring and customize.rst, and the release bullet. Closes #727 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #729 +/- ##
=======================================
Coverage 99.04% 99.04%
=======================================
Files 46 46
Lines 4586 4588 +2
=======================================
+ Hits 4542 4544 +2
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #727.
rules/T4 (#723) tags a bare lowercase letter in a one-case name an initial, but the strict suffix test (
_vocab.is_suffix_strict) vetoes an initial by the word's text, not by that tag. So a lowercasevoripassed where its capital was vetoed. Two callers reached it:john smith, vlenient_comma_suffixes=Falsevv, familyjohn smithsmith, john, ilenient_comma_suffixes=Falsecomma-structure田中さん v田中, suffixさん v田中さん, familyv(1.4.0's reading)The third is W2's honorific peel, whose scan-back asks the same strict test. A CJK name with a Latin letter beside it is one case, the letter being its only cased word.
Change.
is_suffix_stricttakes the one-case fact and vetoes a bare lowercase letter whose capital is A to Z where it holds.is_wholly_suffixandname_word_counttake it asletters_one_case, a keyword kept apart fromis_wholly_suffix'sone_case, which is the credential lean and isNoneby design at callers that want no lean. segment,_commaand script_segment pass the fact they already hold. segment asks for it only under the strict knob, and the honorific peel only for a single lowercase letter. The lenient default never reads it.Cost. Frames are unchanged on the default path for the reference name and the common comma names (counted by the code review).
田中さん vfalls from 291 to 229 frames, since the peel no longer runs. Under the opt-in strict knob, a three-part comma name pays for the case fact (smith, john, v206 → 257); no guard covers that knob.Tests. The one-case invariant's grid gains three comma shapes and
田中さん {n}, and runs its comma shapes again under the strict knob, which reaches nothing else (the docs review measured 0 differences on the comma-free shapes). 2444f84 disagreed on 72 of 4,554 pairs (54 strict comma, 18 honorific), this branch on none. The new control records that 72. Three case rows are added. No corpus name moved: the snapshot gains only田中さん v.Docs. T4 says a suffix test that vetoes an initial vetoes a one-case letter too (C1's strict mode, W2's scan-back). C1's strict-mode sentence and a strict example, decisions/T4's #727 entry (and its first entry's Open line closed), the knob's docstring, customize.rst, and the #723 release bullet extended.
Reviews. The code review found no defects. The design-docs review found the stale Open line and a docstring quoting C1's old wording; both are fixed in 5d552c1. A gap they found that predates this PR,
john smith nee x xagainstJOHN SMITH NEE X Xin the maiden take, is filed as #731.🤖 Generated with Claude Code