Skip to content

Read a comma in a box as a space when scoring local agreement - #930

Merged
derek73 merged 1 commit into
masterfrom
fix/agreement-comma-in-a-box
Oct 28, 2026
Merged

derek73 merged 1 commit into
masterfrom
fix/agreement-comma-in-a-box

Conversation

@derek73

@derek73 derek73 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

local_agreement.fold dropped periods but kept commas. A suffix typed into the surname box after a comma (Smith, Jr.) therefore scored as a miss, though the parser reads John Smith, Jr. correctly: family Smith, suffix Jr.. The fold now reads a comma as a space, so Smith,Jr. reads like Smith Jr. as well. The PatentsView probe found the gap: it was the commonest disagreement among US inventors (655 of 20,000 sampled names).

Measured

A fold is applied to both sides of the comparison, so two values that matched before still match. The change can only turn a miss into an agreement, and it can only touch a record holding a comma. I scored every such record with the old fold and the new:

Source Records with a comma Now agree Moved away Fewer fields wrong
psc-individuals 838 83 0 3
orcid-researchers 2,605 561 0 134

The 2 PSC records that stopped being set aside now agree, and a record is set aside only when its title disagrees. The re-recorded totals match: PSC moves from 1,005,742 to 1,005,825 agreeing, ORCID from 1,474,016 to 1,474,577.

Notes

  • Shared records re-recorded: the scorer's fingerprint moves, so both shared agreement records are re-recorded here, and kept --base records are re-scored on their next run.
  • Test: each case it decides carries the old fold as its negative control. A first row, Roe Jr., PhD, passed under the old fold too, so it was swapped for Roe, Jr., PhD.
  • Checks: the full suite, ruff and mypy pass.

🤖 Generated with Claude Code

local_agreement.fold dropped periods but kept commas, so a suffix typed
into the surname box after a comma (`Smith, Jr.`) scored as a miss
though the parser reads the name right (family Smith, suffix Jr.).
PatentsView's US inventors showed it as their commonest disagreement.
A fold applied to both sides can only turn misses into agreements:
over every record holding a comma, 83 psc-individuals records and 561
orcid-researchers records now agree, none move away, and 137 more have
fewer fields wrong. The scorer's fingerprint moves, so both shared
records are re-recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 self-assigned this Oct 28, 2026
@derek73 derek73 added this to the 2.8 milestone Oct 28, 2026
@derek73
derek73 enabled auto-merge (squash) October 28, 2026 07:21
@derek73
derek73 merged commit f207e4f into master Oct 28, 2026
12 checks passed
@derek73
derek73 deleted the fix/agreement-comma-in-a-box branch October 28, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant