Maiden marker counts only behind a surname; a credential starts a suffix run (#601, #602) - #609
Merged
Merged
Conversation
…s part (#602) An unambiguous Latin suffix word of two or more letters, standing after two name words with no comma or after the given word in the part after a family comma, makes every later word of that part a suffix, except a title word, which reads as a title. `John Smith PhD Jones` reads suffix 'PhD Jones' where it read middle 'Smith PhD'; `Eric H. Holder Jr. Attorney General` reads title 'Attorney General' as its comma spelling always did. An absorbed name word is reported suffix-or-name. One predicate, `starts_a_credential_run`, read by the trailing peel through `credential_run` (so assign, P5's reserve, P2's chain stop and the maiden walk see one answer) and by the given-part walk. A title word, the ambiguous class, a single letter, a connective, particle or bound-given vocabulary (`Abd Allah`), and the non-Latin honorifics never start the run; a lone particle does not count toward the core. The tag tests run inline ahead of the predicate, so ordinary pieces and links pay no frame. rules.md#S2 gains the rule, its examples and a shorter Accepted block; decisions.md#S2 records it, what it reverses (#578, two of #544's Accepted limits), and the measured corpus movement (7 of 1,514). Tests whose fixtures used a credential as filler move to a word that starts no run, keeping what they test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng run (#601) A marker is one only in the name before any comma or the surname part before a family comma, behind a name word past the leading title run, and not straight behind an unambiguous suffix word or a connective. Elsewhere it is an ordinary word, as in 1.4.0: `Doe, Jane nee Smith` reads middle 'nee Smith', `Smith, John, PhD née Jones` suffix 'PhD née Jones'. A particle counts as the surname, so `Mai Le née Nguyen` and `Anh Do née Tran` keep their maiden names. The clause takes its words up to the run of post-nominals and titles the trailing rules read at the end of the name with the clause removed, and the take hands that run to the suffix and title roles itself, so no join can reach a released word. This replaces the #533/#535 release machinery: `_a_name_word_ahead`, `_join_takes_the_member`, `_release_reads_off`, `_link_joins_inside_the_clause`, `TailReader` (now `ClauseSite`) and `tail_reading`'s floor are gone. A trailing roman numeral is read by its shape against the word before it, which the prototype missed (`John née Jones Smith VI`). rules.md#M2 is restated and its examples regenerated; decisions.md#M2 records the head rule, the prototype variants, the triage and two accepted regressions (`Berg, Jane van der nee Smith DO`, `Jane Doe, PhD née Smith`, the latter #603's shape). The case table re-pins 42 rows as fix(#601); the corpus-append invariant is now two-sided; the property grids move to counting heads with re-measured controls. The ledgers classify the moved names and also take in the one radar name #602 moved (`Jane van der Berg née Jr Jones`). Release log: one bullet for #601 superseding the unreleased #533/#535 readings, one for #602. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code: S2's given-part run absorbed a wholly-particle piece and reported it, and P6 then attached it to the family and reported the attachment as a declined post-nominal -- two reports for a reading neither stage kept (`Smith, John PhD de`, `Smith, John PhD de Jr.`), and `Smith, John PhD Jr. de la` lost its particle-or-given report to a wrong kind. The run now leaves such a piece to the walk and P6, except a lone member of the ambiguous credential class (`do`), which P6's #531 exception keeps out of the attachment already. Three case rows and an S2 example pin it; the 1.4/2.0/2.1 ledgers gain a literal #379 rule for the example. group's and ParseState's ownership prose now say group writes the SUFFIX/TITLE roles of the run a maiden take gives up. Docs: M2's reporting sentence regains its scope (a family-comma clause reports the member it keeps nowhere), H5's clause sentence the same scope, M2 and S2 name the part before a suffix comma, the `Jane Smith née V` Accepted note is decided in the #601 entry rather than "open on #601", and AGENTS.md/test_benchmark.py stop describing the retired #533 acronym fork and release check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fix-commit review found the skip wider than P6's attachment: a
particle with a credential behind it and another particle past that
('Smith, John PhD de PhD van') fell back to a silent middle name between
two credentials, contradicting the S2 sentence the previous commit
added. The run now leaves out only the particles ending the part, found
as P6 finds them (looking past post-nominals), and S2 states the lone
ambiguous-class exception (`do`) the code already made. One case row;
dated notes on the two re-recorded 1.4.0 claims.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts were the ledgers and their guard rosters, where #604's rule and the #601/#602 rules were appended at the same place: both kept, the shared trailing `fields` line restored to each rule, and the two 1.4.0 comma-family claims re-recorded over the merged corpus (440). 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 #609 +/- ##
==========================================
- Coverage 98.98% 98.97% -0.01%
==========================================
Files 45 45
Lines 4241 4214 -27
==========================================
- Hits 4198 4171 -27
Misses 43 43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`Jane Doe, PhD née Smith` and `Berg, Jane van der nee Smith DO` are degenerate input with no reading designed for (Derek, 2026-10-04). The release log drops them; decisions.md#M2 keeps the measured move under that heading so it is not mistaken for a regression; the case row says it pins change, not a wanted reading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No behavior change: every field, ambiguity (kind, detail, tokens) and initials string is identical to the previous commit over 95,813 texts (the differential corpora, a 120k random fuzz and a heads x tails grid) under the default, family-first and declared-delimiter policies; all five gates exit 0. - `run_start` holds where #602's run starts, so `trailing_start` no longer builds `run_titles`/`absorbed` it never reads, and a name of under three pieces returns at once; `credential_run` builds the parts in one pass, the suffix test first, only when a run exists. - `starts_a_credential_run`'s letter test and the new `has_name_content` run at C level instead of a generator frame per character. - `_maiden_take` skips the clause-free view when nothing trails the clause (the view would be the head alone), pre-checks tags before the run predicate, and returns the maiden and trailing-run pieces as one role-tagged list, so `group()` applies roles in one loop. - The given-part run's P6 tail is an interval built with a shared `is_wholly_particle`; the absorbed-word report has one spelling. - `trailing_titles` loses its dead `floor` parameter, and comments describing the retired release check are trimmed. Frames per parse against the previous commit, py3.11: 'John Smith', 'Smith, John', 'Smith, John Q.' unchanged (152, 183, 250); 'John Smith PhD MBA FRCS' 395 -> 358; 'Smith, John PhD MBA FRCS' 438 -> 403; 'Jane Doe nee Smith' 238 -> 221; 'Jane Doe nee Mary Ann Smith' 299 -> 278. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mechanisms.md gains READ-WITHOUT-THEN-BIND (read the name as if the construct were not written, let the construct take what that reading leaves, bind the roles -- M2 since #601, with H5's transparency and P3's own-word test carrying the first half) and LICENSED-BY-NEIGHBOR (a structural word is structural only beside the neighbor its structure needs -- M2's head rule, P3's generational connective, and the particle case that showed the condition must be checked against real names). docs/design/AGENTS.md gains the rethink signal: scan-and-stop, fixes that each add a stop, and a guard that models another stage. #601 is the worked case; the 689-line figure is the #601 commit's net change to _group.py, measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One conflict, the two 1.4.0 comma-family claims both sides had moved: both dated comments kept, re-recorded over the merged corpus (441). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #601. Closes #602. Grew out of #548 (
Dr. nee Smith PhD Prof.), which was closed into these two.Summary
John Smith PhD Jonesreads middleSmith PhD#602 (rules.md#S2): an unambiguous credential after the name core (two name words, or the given word after a family comma) starts a suffix run to the end of its part. A title word in the run is a title, and an absorbed name word is reported assuffix-or-name.John Smith PhD Jonesgives suffixPhD Jones, andEric H. Holder Jr. Attorney Generalgives titleAttorney General, as the comma spelling already did. Ambiguous credentials (MA), particles, bound given names, single letters and bare title words do not start a run.Doe, Jane nee Smithgives middlenee Smith. A particle counts as the surname, soMai Le née NguyenandAnh Do née Tranare unchanged. The clause ends where the trailing run of the clause-free name begins, and that run takes its suffix/title roles at the take, so no join reaches it. This replaces the ShouldDoe, Jane nee Smith MAreadMAas a credential? The maiden name keeps it, where it gives upPhDandJr.#533/ShouldJane Doe nee Smith Prof.readProf.as a title? The maiden name keeps it, whereJane Doe Prof.gives the title #535 release machinery (_a_name_word_ahead,_join_takes_the_member,_release_reads_off, the clause link exception, andTailReader, nowClauseSite).John Smith PhD Jonesreads middleSmith PhD#602 entry. AGENTS.md is swept. The release log has Rethink the maiden-marker rule (M2): a marker stands after the current name and takes words up to the trailing suffix run #601 and Should a name word after a credential join the suffix?John Smith PhD Jonesreads middleSmith PhD#602 bullets, and theJosep Carod i Rovirareads familyRovira— Catalan and Polish link surnames withi, which is not a conjunction #397 and Should a declared suffix delimiter inside a joined connective run be dropped?Smith, John, Puig - i Solerkeeps the-in the suffix #549 bullets are corrected.fix(#601)/fix(#602)rules, and all five gates exit 0.Degenerate input
Jane Doe, PhD née SmithandBerg, Jane van der nee Smith DOread differently than in 2.3.0. Both are garbage in, garbage out, with no reading designed for them. decisions.md#M2 records the measured move so it isn't mistaken for a regression, and the release log leaves them out.Review rounds
doexception in S2.Simplify pass and design docs
/simplify(f7c1aa88) made no behavior change. Every field, ambiguity and initials string is identical over 95,813 texts under three policies. Ordinary names keep their frame counts, and the run and maiden shapes got cheaper (John Smith PhD MBA FRCS395 → 358,Jane Doe nee Smith238 → 221). Two cross-stage drift risks it surfaced are filed as Two stages hand-copy each other's trailing-word logic after #601/#602; share one predicate each #610.Liam Ó MurchúreadsÓas a middle initial: add the Irish particlesÓ,Ní,Ua(and Malaybinti) #604, then Salutations and titles in other languages read as given names:Herra Väinö Johanssongives givenHerra#606/Add salutations, offices and ranks in other languages to TITLES #608). Each time only the 1.4.0 comma-family claim counts conflicted, and they were re-recorded over the merged corpus.Notes
Doe, J. nee MA baandDoe, Jane nee Smith PhD MEngclaimed by the broad comma-family rule.Test plan
uv run pytest(11,379 passed on the final merge), also run withoutnamedivideruv run mypy,uv run ruff checksphinx-build -b doctest docs,python -m doctest README.rst🤖 Generated with Claude Code