Repository navigation
Count a listed title typed into the given-names box apart from the score (#1501) - #1505
Merged
Merged
Conversation
…ore (#1501) Where the filer typed a listed title into the given-names box and the parse reads it as the title and the rest of the box as the box's names, every other field agreeing and no title box filed, local_agreement.read marks the record titled: counted in neither the agreeing records nor the misses, the agreement figure taken over the records outside it, the report printing the class's size, its titles and its records per group, and --base reporting a record entering or leaving it as `titled in` and `titled out` with the titles read. This replaces #1477's choice that `Dr.Ahmed` read title `Dr.` stays a miss. config_diff's gaps and score drop a record any configuration reads into the class from every column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1501) A row for each clause no other refuses (another field disagreeing, a box holding more than the title and names), cz-candidates' rows, the filed-title clause pinned directly, gaps read both ways round, three configurations in score_rows, a record titled on both sides, glued `Dr/Anna` recorded as outside the class, and `titled` in the fingerprint test. The report's groups run by the records they hold, the class among them, and the module docstring's example is `Hon`, which the measurement found, not `Dean`, which the parse reads as a given name. tools/differential/README.md and AGENTS.md describe the class and its size on 2026-11-20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rose (#1501) The negative control counted read()'s misses, which a record in the class has too, so it held with the class on; it now scores the class's rows with the class off. The class's rows are one tuple, both the glued-title rows check `titled`, each refusal row has its own comment, and the Arabic row has an invented surname. The moves docstring says a record that agreed and is now titled is `titled in`, never a regression, and AGENTS.md now says to read those lines beside the regressions rather than instead of them. The report's descriptions, config_diff's docstrings and the README's countries (India first) are brought in line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ass (#1501) 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 #1501
The change
tools/differential/local_agreement.pygets a class of its own,titled. A record joins it where:Dr. Anna,Dr/ Anna,د. منى,Dr.Ahmed);The parse is right there and the box is what differs. So the record counts as neither agreeing nor missing, and the agreement figure is taken over the records outside the class.
The report prints:
titledcolumn per group;--baseand a record check report a record entering or leaving the class astitled inortitled out, apart from the regressions and progress, with the titles read. A record that agreed and is now read with a title istitled in, never a regression. So a word newly peeled as a title shows up in those lines under the title it was read as, and a reader checks the words rather than the records.Where it applies. The rule reads the source's boxes, so it covers every scored source:
orcid-researchersandpatentsview-inventors, which have no title box;psc-individualsandcz-candidates, where the title box is filed empty.A filed title box keeps the title scored against it.
config_diff.py.gapsandscoresharelocal_agreement.read. They drop a record any configuration reads into the class from every column, as they drop a set-aside record. In ORCID and PatentsView their title-word filter already drops nearly all of these; the slash form and PSC's are what reach the new check.What stays out of the class:
Xyz. AnnaDr, with the names in the next boxBerg Dr.Dr Anna/Berg SilvaDr (Ann) AnnaDr/AnnaEach of these has a test row, and the class's six rows have a negative control: with the class off they score 6 misses, and with it on, 0.
How this sits with #1474 and #1477
#1474 (
agrees, after initials) and #1477 (after any typed full stop) read a word the parse cuts as agreeing only where the box's letters stay in the box's field. #1477 keptDr.Ahmedread titleDr., givenAhmeda miss on purpose: the scorer cannot tell a title rightly peeled from a given name wrongly peeled.This replaces that choice for that shape only.
Dr.Ahmedis now in the class, through the sameagrees(the boxDr.Ahmedagainst title-then-namesDr. Ahmed), and still not an agreement. The worry #1477 held is answered by listing the titles read, instead of by counting the record a miss.The two rules do not overlap:
agreesdecides whether a field agrees.titledapplies only where a title, which no field box holds, was peeled off the given box, and it asks that every other field agree.Measured
Each source was scored with
--base, origin/master's scorer against this one, under the same parser (byte-identicalnameparser/, so no reading moves), on 2026-11-20. Every record in the class was a miss before: the agreeing counts are unchanged.The ORCID countries holding the most of the class:
The titles ORCID records read in the given-names box:
Dr.5,311,Dr1,807,Prof.260,د.211,DR.205,Prof. Dr.130,Professor58,Mr.56,أ.د.40,Hon33,Most.30,Engr.27.PatentsView holds 90 such records: SG 25, IN 11, MY 10. Its titles are led by
Hon39, thenGuru13,Lama4,Swami2.PSC holds 6:
Hon2,Mr.,Ms.,Sir,St.What the titles list shows. It surfaces given names that are peeled as titles:
Hon. Its records are in Hong Kong (20 in ORCID) and Singapore (22 in PatentsView).Honis a Cantonese given name that the default reads as the style, which ShouldMajread as a given name inMaj Sjöwall, asPrincedoes, when FEC writes the rank trailing (SMITH, JOHN B. MAJ.)? #999 decided knowingly; under the old score these records were misses among the rest.Guru,Lama,Swami. These lead PatentsView's titles in the same way.None of this needs this PR to change anything, but it is the reading the class is for.
Docs
local_agreement.pyparagraph describes the class, its dated size, the shapes left out, and how--basereports it. It no longer listsDr.Ahmedamong the misses.titled inandtitled outbeside its regressions.Unchanged
nameparser/changes.git diff origin/master --stat -- nameparser tools/differential/*.json tools/differential/snapshot.jsonlis empty), andtest_snapshot.pypasses.agreement.jsonlrecords are not re-recorded. The scorer's fingerprint changes, so they need re-recording after merge.Checks
uv run pytest(54,849 passed),uv run pytest -n0 -m serial,uv run mypyanduv run ruff checkall pass. The new tests also pass run alone with-n0.Review
Reviewed with the pr-review-toolkit:
Dr.Ahmedas a miss, and the docstring'sDeanexample (the parse readsDeanas a given name) was wrong. Both fixed.titledand of config_diff's drops, and found the clauses no row isolated. Fixed with:gapsboth ways round, andscore_rowswith three configurations;titledin the fingerprint test;Dr/Annarecorded as outside the class.titled in, themovesdocstring's definitions, the report's two descriptions, config_diff's docstrings, and an Arabic test row matching a real person's title and name. All fixed.All names in this description and the tests are invented, of the shapes read.
🤖 Generated with Claude Code