Repository navigation
Score a word the parse cuts after any typed full stop as agreeing - #1478
Merged
Merged
Conversation
) #1470 had local_agreement.agrees forgive a cut the parse draws after initials (`B.A.S.D.` read `B.`, `A.S.D.`). A cut after any other word ending in a full stop (`Md.Karim` read given `Md.`, middle `Karim`) still scored a miss, though both words land in the box's own field. _joined now accepts a cut after any piece ending in a full stop, and _initials, with no reader left, goes. A run with no full stop, a full stop the reading lost, a word left over or peeled to another field (`Dr.Ahmed` read title `Dr.`), other letters, and a cut across two boxes a source states apart (psc-individuals' forename and middle name) still score a miss, each with a test row. Measured with the same parser, master's scorer against this one: 168 orcid-researchers and 1 patentsview-inventors records move from disagreeing to agreeing, all in the given+middle field; none moves the other way and no other corpus moves. The guard test's grid gains words before a full stop; its control is re-taken (22 -> 25). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard test now also records how many held rows #1470's rule, a cut forgiven only after initials, still scored a miss (3, the rows #1477 added), so a narrowing back is caught by a stated count. The module docstring no longer credits the Md. cut to #1296: it is Muhammad written short. A row holds a word left over after a cut word. 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 #1477
The change
#1470 (PR #1474) taught
local_agreement.agreesto forgive a cut the parse draws after initials (B.A.S.D.read givenB., middleA.S.D.). This widens it to any full stop the filer typed, whatever stands before it. A boxMd.Karimread givenMd.(Muhammad written short), middleKarimnow agrees with ORCID's and PatentsView's given-names box, which holds both fields._joinedaccepts a cut after any piece ending in a full stop, in both directions as before._initialshad no other reader and is removed, and_SCORER_CODEdrops it.Each case that must stay a miss has a test row, and each row passes on master's scorer too:
Md.Karimin the forename box read givenMd., middleKarim)Dr.Ahmedread titleDr., givenAhmed)ABagainstA B)K.SagainstK S,Md.KarimagainstMd Karim)Md.KarimagainstMd. Karim Lee)Md.KarimagainstMd. Karin)The rows #1470 refused and this accepts (
Md.Karim,Jo.Ann,A.Bc.D.,1.2.) flip to agreeing explicitly. They fail on master's scorer.All names in this description and in the tests are invented, of the shapes read.
Before and after
The same parser (this tree), with master's scorer and with this one, over every record of every fielded local corpus (2026-11-19):
These are exactly the counts #1474 left. Every moved record moved in the given+middle field alone, with no other field or set-aside changing. Every one is this shape: the box with its spaces removed equals the reading, cut after a word of two or more letters and a full stop.
Md.125,MD.33,Ma.8 (the Filipino short form of María),Moh.1,Mhd.1.I read 25 drawn orcid-researchers moves and the one PatentsView move by hand. Each is a given box of the shape
Md.Karim,MD.KARIM HASANorMd.Karim Hasan, read with the box's words in order in the given+middle field. None is a record of another shape, so there was nothing to stop and report.Guard and docs
test_a_reading_cut_only_after_a_full_stop_is_never_scored_a_miss. Its grid gains words before a full stop (Md.,Jo.,Moh.R.) and holds 40 records that must agree and 40 that must stay misses, both counts asserted. It records two negative controls: the fold-only comparison from beforelocal_agreementscores joined initials read apart as a miss (B.A.S.D.besideDayanandareads givenB., middleA.S.D., scored wrong) #1470 scores 25 of the 40 a miss (was 22 of 28), andlocal_agreementscores joined initials read apart as a miss (B.A.S.D.besideDayanandareads givenB., middleA.S.D., scored wrong) #1470's initials-only rule scores 3 (_INITIALS_ONLY_EFFECT, the rows only this change forgives).Unchanged
Nothing under
nameparser/changes. The committed snapshot and agreement records are byte-identical. The sharedagreement.jsonlfiles are not re-recorded: the scorer's fingerprint changes, so they want re-recording after merge.Checks
uv run pytest(50,613 passed on the final commit),uv run pytest -n0 -m serial,uv run mypyanduv run ruff checkall pass.Review
Reviewed with the pr-review-toolkit:
local_agreementscores joined initials read apart as a miss (B.A.S.D.besideDayanandareads givenB., middleA.S.D., scored wrong) #1470's and that every caselocal_agreementscores joined initials read apart as a miss (B.A.S.D.besideDayanandareads givenB., middleA.S.D., scored wrong) #1470 refused, and should still refuse, keeps a row.Md.cut to Should E.T. Smith read given 'E.', middle 'T.'? #1296, and to a row for a word left over after a cut word.local_agreementscores joined initials read apart as a miss (B.A.S.D.besideDayanandareads givenB., middleA.S.D., scored wrong) #1470's rule (it scores exactly the three named rows a miss), that the two controls are independent, and that theMd.cut is vocabulary (an unlistedXy.Karimis not cut).🤖 Generated with Claude Code