Repository navigation
Add patentsview-inventors, a local corpus of US patents' inventors - #931
Merged
Merged
Conversation
PatentsView's granted-patent tables on the USPTO Open Data Portal give each inventor's name in the filing's two boxes and a country. The fetch reads an API key from ~/.config/nameparser-tools/uspto-odp-key and sends it to https uspto.gov hosts only, pins the release by each file's size, listed date and sha256 and by its row count, joins the raw and disambiguated inventor tables in step, and counts the distinct people under each name in each country: 24,037,380 rows held 5,319,206 names on 2026-10-28. The extract keeps every name with its count; the corpus keeps at most 20,000 a country (657,991 records), scored by local_agreement.py with ORCID's boxes (94.7% agree). local_agreement.scorer_fingerprint now hashes only the scoring source's own FIELDED entry, so adding a source no longer refuses every other source's record; the change moves each existing fingerprint once. 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.
Summary
A second worldwide fielded local corpus, beside
orcid-researchers, for checking language-pack decisions. PatentsView's granted-patent tables (USPTO Open Data Portal, grants from 1976 to 2025-12-31) give each inventor's name in the filing's two boxes (first name, last name) and the country of their address.Two things set it apart:
The extract keeps every name with its count, for the per-country word counts planned next. The corpus keeps at most 20,000 names a country, for the tools that hold a corpus in memory.
tools/differential/local_patentsview.py:~/.config/nameparser-tools/uspto-odp-key, sent asX-API-KEYto httpsuspto.govhosts only, and dropped on a redirect anywhere else. A missing key is refused naming how to get one, and so is a key the portal refuses (401/403).local_agreement.scorer_fingerprint(source)now hashes only that source'sFIELDEDentry. Before, adding this source's row refused every other source's agreement record. This change moves each existing fingerprint once.Measured (2026-10-28)
Filer-split East Asian names agree almost every time, so ORCID's lower East Asian figures reflect how its holders typed their names. The double-surname gap is the same in both.
One shape new to the corpora: 92,503 last-name boxes hold a comma, followed by a suffix (
Jr.55,459 names) or a legal role typed after a deceased inventor's name (deceased4,635,heir514,legal representative393,executrix328,administrator288).Review
A code review and a design-docs review ran.
Code review:
Design-docs review (four corrections, each re-verified):
Negative controls: each of ten guards made its test fail when switched off.
Notes for merging
psc-individuals' andorcid-researchers' shared agreement records once. Kept--baserecords are re-scored on their next run. I re-recorded all three locally, and their totals were unchanged.🤖 Generated with Claude Code