Repository navigation
Remove the empty head's own P6 site (#892) - #916
Merged
Merged
Conversation
rules/C15 reads a comma with nothing before it as a family comma naming no surname, so P6's attachment behind it is assign's comma site, ahead of H1. The second site #613 kept in post_rules for that head goes, with assign's guard that kept the comma site off it and the empty-run guard in _inside_a_credential_run that only that site could reach. `, Dr. Jones vd` (and the other vd/mc tails behind a title addressing by surname, 112 given parts per order on C15's grid) reads given 'Jones', family 'vd', as its twin `Smith, Dr. Jones vd` does, where it read the comma-less name's family 'Jones', suffix 'vd'. H1's exception rows fall 1,075 -> 963 per order; `, Jones (MA) vd` reads its twin's nickname 'MA'. rules/P6 states the empty head; decisions/C15, P6 and S13 record it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Record the two classes the removed site moved off C15's grid (`, Dr. Jones vd, PhD`; `, de PhD vd`, which now meets the comma site's P1 guard) in decisions/C15 and P6, with case rows. - Pin `, Dr. Jones vd Jr.` and `, Jane van Jr.` under FAMILY_FIRST absolutely: the twin invariant now compares two readings of one site. - Assert the H1 exception's 963 rows per order, not as a total. - Rename the empty-run guard's old row; state `_inside_a_credential_run`'s non-empty precondition; quote rules/P6 verbatim at assign's site. - Fix test_state.py's ownership comment and two docstring wraps. - nameparser/_pipeline/AGENTS.md: compare guards when folding sites. 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 #892 (point 4; points 1–3 landed in #914).
What goes
A search of the pipeline for code that reads an empty part before the comma found one site:
post_rules, which ran after H1 and M4 only when nothing stood before the comma (Rethink the suffix-comma rule (C1): decide the comma's structure once, after the words are tagged #613 kept it there).and fam_piecesguard in_assign's comma site, which kept the main attachment off that head.k == endempty-run guard in_inside_a_credential_run, which only the removed site could reach. Dropping it fails no test.#890's floor for
, Dr. filsis not empty-head code. It is rule C4's count of name words before the comma, and a one-word head meets it too (Sir Alexandre, fils).What moves
Assign now attaches the trailing particle behind an empty head ahead of H1. H1 then finds a family and stands down. That moves the
vd/mctails behind a title that addresses by surname: 112 given parts per order on C15's invariant grid, and one snapshot name., Dr. Jones vdsuffix-or-name, Jones (MA) vd, Dr. Jones vd, PhD(off the grid)suffix-or-name, de PhD vd(off the grid)suffix-or-nameEach now reads as its twin
Smith, …does, and as an ambiguous particle already read (, Dr. Jones van→ family 'van'). None of the 10 real empty-head names in the local corpora holds a trailing particle.Docs and tests
vdknock-on leaves the H1 Except; the Precedence bullet says P6 also wins over H1.SUPERSEDES:lines, and the reversed parts are marked on the old heads.Elsewhere:line records the reading that moved.particle_taildocstring no longer describe the removed site.Review round (/pr-review-toolkit:review-pr)
Code, comment and test reviewers ran. Fixed in 73da45a:
, Dr. Jones vd Jr.and, Jane van Jr.(FAMILY_FIRST). The twin invariant now compares two readings of one site, so a defect there would move both sides.test_state.pyownership comment is fixed, the rules/P6 quote is now verbatim,_inside_a_credential_runstates its precondition, and the guard row was renamed.nameparser/_pipeline/AGENTS.md: when folding one site of a rule into another, compare the two sites' guards.Not changed: the report detail "joins the family the comma named" still appears behind an empty head. That is wording only, and
nameparser/AGENTS.mdalready records it.Checks
The design-docs review ran on the change, and all six findings are fixed: stale mechanism notes, the decisions edit-kind format, and rules/P6's scope. The full suite, ruff and mypy pass. On the first run the serial benchmarks failed three wall-clock scaling ratios, the same flake seen on #914; all 43 passed on rerun.
🤖 Generated with Claude Code