diff --git a/nameparser/_pipeline/_pieces.py b/nameparser/_pipeline/_pieces.py index e231cabb..a653fa66 100644 --- a/nameparser/_pipeline/_pieces.py +++ b/nameparser/_pipeline/_pieces.py @@ -765,8 +765,9 @@ def segment_suffix_reading(pieces: Sequence[Sequence[int]], two name words -- and each reads as a suffix whatever its writing or company. - rules/S2's initial veto keeps a roman numeral out of a suffix - reading, which is right after a NAME word: 'Smith, John V.' is a + The initial veto (`_vocab.is_initial`) keeps a roman numeral out + of a suffix reading, which is right after a NAME word (rules/C1's + one-character suffix word, read by what stands before it): 'Smith, John V.' is a middle initial (#432). After a SUFFIX word the numeral is describing that suffix -- 'PSM I' is Professional Scrum Master level I -- so the run continues through it, period included, an diff --git a/tests/v2/cases.py b/tests/v2/cases.py index d26bc1db..a7bef8b2 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -2697,7 +2697,8 @@ def _check_cjk_shape_purity(self) -> None: classification="fix(#289)", ambiguities=("suffix-or-name",), notes="the two-word twin of 'Royce, Ed' below, and the case " - "row item 5 of decisions/S4 turns on -- no corpus " + "row decisions/S4's 2026-09-15 entry (THE COUNT " + "REACHES THE LISTED SET TOO) turns on -- no corpus " "name has this shape, so this row carries the whole " "weight of that decision", shape=3), @@ -4265,8 +4266,8 @@ def _check_cjk_shape_purity(self) -> None: notes="why the condition asks assign's TRAILING-RUN walk " "rather than the suffix-piece test: a bare 'V' is " "suffix vocabulary written like an initial, so " - "is_suffix_piece refuses it (rules/S2's initial " - "veto) and a class test spelled with that predicate " + "is_suffix_piece refuses it (the initial veto, " + "_vocab.is_initial) and a class test spelled with that predicate " "alone would let the link swallow it. The peel takes " "it, so trailing_start puts it outside the name's own " "words and the link stays the generation -- carrying " diff --git a/tests/v2/pipeline/test_group.py b/tests/v2/pipeline/test_group.py index f4734f57..ce353215 100644 --- a/tests/v2/pipeline/test_group.py +++ b/tests/v2/pipeline/test_group.py @@ -1438,8 +1438,8 @@ def test_the_right_hand_test_reads_the_peel_not_the_suffix_piece( ) -> None: # the arm that forces trailing_start rather than is_suffix_piece: # a ONE-CHARACTER suffix word is initial-shaped, so the - # suffix-piece test refuses it (rules/S2's initial veto) while - # assign's trailing peel takes it. Spelled with the piece test + # suffix-piece test refuses it (the initial veto, + # `_vocab.is_initial`) while assign's trailing peel takes it. Spelled with the piece test # alone, the link would swallow the generation here. lex = _LINK_LEX.add(suffix_words={"v"}) out = _grouped("Josep Lluis Carod i V", lexicon=lex) diff --git a/tests/v2/test_policy.py b/tests/v2/test_policy.py index f2cda8f1..7b632776 100644 --- a/tests/v2/test_policy.py +++ b/tests/v2/test_policy.py @@ -886,7 +886,8 @@ def test_unlisted_caps_suffixes_on_reads_an_all_caps_word() -> None: assert default.parse("John Smith XYZ").ambiguities == () # the boundaries: one case, one letter, a digit, and vocabulary. # 'John Smith X' is NOT the single-letter control -- 'X' is a bare - # roman numeral (rules/S2's numeral fork) and reads as suffix + # roman numeral (the trailing numeral fork, + # `_vocab.is_trailing_numeral_suffix`) and reads as suffix # 'X' with the switch either way, unrelated to this one; 'Z' is # not vocabulary at all and stays unaffected by the switch, which # is the actual boundary (a single capital never satisfies the