Repository navigation
C12: read a joined title in the part after the comma as a title - #738
Merged
Merged
Conversation
C12 (a suffix word ending the name before the comma) decided which words in the part after the comma are titles with a hand copy of C8's test that asked only a one-word piece's vocabulary tag, so a title P3 joins fell to the suffix side: 'John Smith Jr., Mr. and Mrs. AD' read suffix 'Jr., Mr. and Mrs. AD', where C8 and the credential-free 'John Smith Jr., Mr. and Mrs.' both read title 'Mr. and Mrs.'. `_behind_a_generation` now asks `not is_suffix_piece` then `is_title_piece`, as C8's opened-run branch does. Measured over 8 suffix-word names x 29 parts x 3 orders: 120 of 696 readings move, all five joined-title parts, each from suffix to title; duals and single titles unchanged, no ambiguity or initials move, no corpus name moves. The snapshot gains only the new C12 example. 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 #738 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 46 46
Lines 4647 4647
=======================================
Hits 4603 4603
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- rules/C12: a dual inside a joined title reads as part of the title, as C8 reads it; the title join is C7's, so name it and add C7 to interacts (C7 names C12 back); example 'AD Sr. and Mr.' - decisions/C12: name the comparator and list the grid; re-measured with three dual-holding joined titles added: 192 of 768 move, the eight joined-title parts beside an unlisted credential - AGENTS.md: the lesson asks both of C8's predicates in order, since is_title_piece alone reads MD and Sr. as titles - _comma.py: docstring and the `taken` comment cover joined titles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derek73
added a commit
that referenced
this pull request
Oct 19, 2026
* Ask is_title_piece in C5's speaker scan and pair_only Both hand-copied the one-word `vocab:title` test that PR #738 found reading a joined title ('Mr. and Mrs.') as a credential in C12. Here the swap moves no reading: 0 of 3,465 measured parses (readings, ambiguity details, initials) move. The speaker test never disagrees with the copy on the grid, since a joined title holding a suffix fails C4's every-word test first; pair_only disagrees on 6 inputs, all behind a generation, where C12's report is chosen first. The swap is for drift. Recorded in decisions/C5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review: the shared reason, a configured move, C11's pointer - decisions/C5: both sites sit behind C4's run, which a joined title's free connective fails, so the default vocabulary cannot move; the G.J. A.B. clause corrected - decisions/C5: a configured connective split into suffix words by a configured delimiter passes the run, and there two readings move (found by the code review); accepted - decisions/C11: pointer for pair_only, the report's exception Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- 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.
Follow-up to #735's altitude review.
C12 (a suffix word ending the name before the comma) decided which words in the part after the comma are titles with a hand copy of C8's test (the suffix-comma credential run) that asked only a one-word piece's
vocab:titletag. A title joined by P3 (the connective join) carries the piece tagtitleinstead, so it fell to the suffix side:John Smith Jr., Mr. and Mrs. ADJr., Mr. and Mrs. ADMr. and Mrs., suffixJr., ADDr. Smith Jr., Secretary of State ADDr., suffixJr., Secretary of State ADDr. Secretary of State, suffixJr., ADAlready reading title
Mr. and Mrs.before this change:John Smith, PhD Mr. and Mrs. AD(C8) andJohn Smith Jr., Mr. and Mrs.(no credential)._behind_a_generationnow asks C8's predicates in C8's order,not is_suffix_piecethenis_title_piece. Those agree with the old copy on every one-word piece, so a title and suffix dual still reads as a suffix, as C12 states.A dual inside a joined title now reads as part of the title (
John Smith Jr., AD Sr. and Mr.→ titleSr. and Mr.), as C8 reads it (John Smith, PhD Sr. and Mr.). A dual standing alone still reads as a suffix (John Smith Jr., Sr. AD→ suffixJr., Sr. AD).Measured (2026-10-19) against the parent a454917, extracted with
git archiveand__file__asserted on both sides. The grid: 8 names ending in a suffix word × 32 parts × the three orders = 768 parses. The full grid is listed in decisions/C12.Mr. and Mrs. AD,AD Mr. and Mrs.,Mr. & Mrs. AD,Dame and Sir AD,Secretary of State AD,AD Sr. and Mr.,Mr. and MD ADandDr. and Ms AD.Prof. and Dr. MD) or with no credential (Secretary of State) already read as a title, because C12 isn't reached.initials()changes. No corpus name moves; the snapshot only gains C12's new examples.Not touched:
John Smith Jr., Lt. Gov. ADstill reads titleGov., suffixJr., Lt. AD.Ltis a dual, and C12 reads duals as suffixes.Changes:
nameparser/_pipeline/_comma.py: the swap, withpt1passed into the helperMr. and Mrs.andSr. and Mr.examples, and lists P3 and C7 underinteracts; C7 lists C12 backcorpus_rules.jsonlandsnapshot.jsonlregeneratedSuite: 21,589 passed; mypy and ruff clean.
🤖 Generated with Claude Code