Repository navigation
Score joined initials the parse cuts at a full stop as agreeing - #1474
Merged
Merged
Conversation
Since 3.1 (#1296, rules/T7) the parser reads a given-names box holding `B.A.S.D.` as given `B.`, middle `A.S.D.`. local_agreement.read joins the two with a space to compare them with the one box, and the fold could not tell that space from one the filer typed, so the record scored a miss with the box's letters in the box's field. agrees() calls a box and a reading agreeing where they fold alike, or where one writes as one word what the other cuts after one or more of its initials (`B.A.S.D.` and `B.` `A.S.D.`, `V.G.Ravi` and `V.` `G.Ravi`). A cut after a word that is not initials (`Md.Karim`), a run without full stops, a word left over and other letters stay misses. read() uses it for every box and for the suffix comparison, and config_diff.py score reads through read(). Measured with the same parser, old scorer against new: 1,140 orcid-researchers and 35 patentsview-inventors records move from disagreeing to agreeing, all in the given+middle field; no record moves the other way and no other corpus moves. A guard test holds the invariant over a grid both ways, with a recorded negative control. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 19, 2026
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 #1470
What was wrong, and since when
local_agreement.readcompares ORCID's and PatentsView's given-names box with the parse's given and middle names joined by a space, and itsfoldcannot tell that space from one the filer typed. That held while the parser kept a joined run of initials as one word. 3.1.0's #1296 (rules/T7, the release log's "Change a given name written as a run of initials to read as the initials") began readingB.A.S.D. Kumarasirias givenB., middleA.S.D.; every release from 1.4.0 through 3.0.0 gave givenB.A.S.D.(checked against the 1.4.0, 2.0.0, 2.3.0, 2.5.0, 2.8.2, 3.0.0 and 3.1.0 wheels). So the scorer was right until 3.1 and the parse change made it wrong: since then a boxB.A.S.D.comparedb asdwithbasdand scored a miss with the box's letters in the box's field.The fix
agrees(box, got): the two agree where they fold alike, or where one writes as one word what the other cuts after one or more of its initials, an initial being a letter (with any combining marks) and a full stop (B.A.S.D.andB.A.S.D.;K.SandK.S;V.G.RaviandV.G.Ravi). It stays a miss when:Md.KarimreadMd.Karim,Jo.Ann,A.Bc.D.);AB,MD,Al) or the reading lost one (K.SagainstK S);Dr.A.B.).Both directions are checked (box joined, reading spaced, and the reverse).
read()usesagreesfor every box and for the suffix comparison.config_diff.py scorereads throughread(), so it gets the fix with no change of its own.cldr_agreement.pycompares with its ownsame()(word multisets, full stops kept). Of the 4,992 field disagreements in the committed*_agreement*.jsonrecords,agreeswould call none agreeing. So that comparison is left alone, and every committed record and the snapshot stay byte-identical.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):
Every moved record moved in the given+middle field alone. None still misses another field, no other field's reading changed, and no set-aside changed. One record (of the shape
J.L. Pereira Junior) also now counts as agreeing by its suffix, as it should. The issue counted 1,104 records. Its per-country figures (Sri Lanka 403, Bangladesh 101, Netherlands 86) are reproduced exactly by the given boxes that open with letter-full stop-letter, which include an initial glued to a name (V.G.Ravi). The 1,140 here is that population: 865 boxes holding a word of initials only, and 275 holding initials glued to a name.orcid-researchers moves per country: LK 403 (2.61 points of its 15,428), BD 101, NL 86, IN 55, RU 43, IQ 36, MY 25, HK 20, EG 20, BY 15. PatentsView: IN 8, TW 5, US 4, RU 4.
I read 50 drawn moves by hand (25 per corpus; seed in the measuring script). Each holds the box's letters, in order, in the given+middle field, cut only after initials, in shapes like
G.A.S/Kumarasiri,Т.В./Петренко,F.M.Rahman Karim,P.J.W./Janssen. The examples in this description are invented names of the shapes read, not the holders' own.One class to weigh: 24 of the 36 Iraqi moves are Arabic academic title abbreviations glued to the name (
أ.د.سمير,أ.م.د.…,م.م.…). The parser leaves them in the given field and the holder typed them in the given box, so the box agrees. The same box written spaced (أ.د. سمير) agreed under the old scorer too, so this makes the scorer consistent rather than kinder. But these are titles the parser does not read, which is the issue's "second artifact" (a title in a box ORCID has no title box for).Cut-only misses the fix leaves
After the fix, these records still differ from their box only by where a space falls:
Md.KarimreadMd.Karim,Moh.Rafi. That is 168 orcid-researchers records (146 Bangladesh, 8 Philippines) and 1 patentsview-inventors record. The task keptMD-like words out of the rule. These records are read right all the same, since both words land in the one box's field. Whether to widen the rule to any cut at a full stop the filer typed is a decision.\xad,.) or repeats the surname (김민준/kim). These are the holder's error, not this artifact.period_joined_vocabreading cut a written word across two scored fields in psc-individuals or cz-candidates, nor in the suffix comparison.Lesson written down
test_a_reading_cut_only_after_initials_is_never_scored_a_missholds both halves over a grid of runs (Latin, Cyrillic, Devanagari; glued, spaced, alone; one- and two-word family). The 28 records whose reading holds the box's letters in the box's field never score a miss. The 28 read with a family word in the given field always do. Negative control: 22 misses withagreesreplaced by the old fold comparison (_UNGUARDED_EFFECT).local_agreement.py, for a reader changing the parser.Shared agreement records
The scorer's fingerprint changes, so the shared
agreement.jsonlrecords for every local source now refuse a run without--baseuntil they are re-recorded. The issue asks for orcid-researchers and patentsview-inventors to be re-recorded. I left the shared files alone, as briefed; re-recording after merge is the coordinator's call.--basekeys its kept records by the scorer too, so it is unaffected.Checks
uv run pytest(50,450 passed),uv run pytest -n0 -m serial,uv run mypyanduv run ruff checkall pass. Each new test row was run against master's scorer: the agreeing rows fail there, and the rows that must stay misses pass there.Review
Reviewed with the pr-review-toolkit:
isalphamutation) and a glued title.name…" sentence. The sentence now stands before thelocal_agreement.pyrun. No other defect was found.🤖 Generated with Claude Code