Repository navigation
Read a credential split across a space as one word (#752, phase 2e) - #891
Merged
Merged
Conversation
…t-credentials-0fc06f
A pair of short words whose letters together spell unambiguous suffix vocabulary, the first of two or more letters, merges into one piece, a member of the ambiguous class that the count decides (rules/S11): S2's trailing read by S4's words to spare, C4's count after a comma, S5's reading at the end of the given part. A pair the count declines is split back into its two words (`_group._settle_splits`, and a second reading of the part in `_comma.decide`), so it reads as written. The merged Ph./D. pair now starts S8's run as `PhD` does (#827), and a one-letter numeral in front of it is the name word it is before `PhD` (`John Smith V Ph. D.` -> family 'V'). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ase 2e) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-credentials-0fc06f # Conflicts: # docs/design/decisions/README.md # docs/design/decisions/vocabulary-model.md # docs/design/rules/README.md # docs/release_log.rst # nameparser/_pipeline/_classify.py # nameparser/_pipeline/_comma.py # nameparser/_pipeline/_pieces.py # tests/v2/pipeline/test_vocab.py # tests/v2/rules_budget.json # tests/v2/test_cases.py # tests/v2/test_render.py
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.
Phase 2e of #752: a credential written split across a space reads as one word. This carries out item 6 of decisions/vocabulary-model's 2026-10-23 #752 entry, which Derek agreed on 2026-10-23, and #827's reading (A). Closes #827.
What changes
Split credentials (new rules/S12, a credential split across a space).
John Smith, Pharm DPharm, middleD, familyJohn SmithJohn, familySmith, suffixPharm DJohn Smith Pharm D JonesSmith Pharm D, familyJonesPharm D Jones, reportedJohn Pharm DPharm, familyDSMITH, SAM E.SAM, middleE.sameis listed; C4's count refuses it)John Smith, M. D.#827. The merged
Ph. D.now starts S8's run from where it stands:John Smith Ph. D. Jonesreads suffixPh. D. Jones, asJohn Smith PhD Jonesdoes.V Ph. D.A one-letter numeral in front of the pair reads as it does beforePhD, following Derek's 2026-10-25 call on #886:John Smith V Ph. D.reads familyV, reported, where 2.3.0 through 2.6.0 read suffixV Ph. D.. This is the spaced twin's reading, so no new decision is needed. No local corpus name holds the shape, so only the rules example moves.Decisions this PR states (please check)
suffix-or-name, as any member of the ambiguous class does (John Smith MA). This covers the end of a name, after a comma, the end of the given part, a run start and a maiden clause's release. Without the report, a given name and initial that spell a credential (John Smith Ed D,JOHN SMITH SAM E.) would become one where no caller could find them.John Smith Pharm D).Ph. D.stays the unambiguous credential decisions/phd-merge reads. It is merged by its spelling whatever the vocabulary lists, as v1's fix_phd was, and it outranks an overlapping pair (Jane Doe Dr. Ph. D., whereDr. Ph.spells the listeddrph).is_cased_paired_initials. They merge only in a caseless script that writes abbreviations, and no default entry spells one.Smith MA, John).john smith, PHARM DgivesPharm D, andMB ChBforce-repairs toMB ChBwhere master wroteMB Chb.Accepted (rules/S12):
M. D.,M DandM. Sc.stay two words. Of ctgov's 205 distinct names whose whole part after the comma is one of the five split spellings, 133 still read reversed, against 185 on master. The design record's "149 of 359 officials" countedM. D.andM Donly;M. Sc.opens with a single letter too, so it stays unmerged as well.JOHN SMITH SAM E.), and ending the given part after a family comma (Smith, John Sam E.).Measured (2026-10-25, against master 225f3d6, every local check with
--base)Re-taken against master b1e5a29, after #890 merged: every figure below holds. PSC agrees on 1,004,785 records there, #890's own count.
JUNIORtyped asJUN IOR; the pairs view is unchangedUSN RThe ctgov moves:
suffix-or-namereport on master.MB ChB-style names, where the pair's report replaces master's report on the wordMB's run absorbed.Pharm Dand its spellings 110,Psy D5,Dr PH5,Ed D3,Sc. D.1, andMB ChBbehind another degree 4.ph D, written in two cases, is now kept as written, as rules/R5 keeps its twinphD; master wrotePh D.The opening-letter test protects FEC's middle initials. With it removed, 4,441 FEC names would move (
G. MR.reading asgmrin 2,577,C. MS.ascmsin 1,133), against 206 ctgov names it would put right.Frames. The reference row,
John Smith,Smith, Johnand accented names cost what master does. A name holding a split credential pays for its reading.The spike figures in the design record were a cruder rule's. This PR's rule adds the count gate, the particle and connective refusals, and decide's retry.
Reviews
phdremoved from the vocabulary stopping thePh. D.merge;Smith, John van Pharm D). The merge now runs ahead of the joins, and P5's bound join declines a split piece, which rules/P5 now says.phanddstopped thePh. D.merge.Smith, MD Pharm D). C13's absorbed-word report now leaves a split pair out, so the pair reports itself once.Docs
deviates: #827marker is removed.🤖 Generated with Claude Code