fuzzy-name-matching
БесплатноЗапускает вложенные скриптыНе проверенUse when linking or deduping datasets by entity NAME because no shared key exists — 'fuzzy match', 'fuzzy name matching', 'entity resolution', 'record…
от edwinhu★ 28 звёзд на GitHubОб этом скилле
Contents
Fuzzy Name Matching
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Fast many-to-many fuzzy entity matching: char n-gram TF-IDF + sparse top-k cosine similarity (the ING banks recipe). Scales to ~10⁵ × 10⁵ on a laptop in seconds, ~10⁶ × 10⁶ with chunking.
The full recipe — code, threshold guide, gotchas, alternatives considered —
is in references/fuzzy-name-matching.md. Read it before writing match
code; a runnable template is in examples/fuzzy_name_match_sample.py.
Match Enforcement
IRON LAW: NO NAME MATCHING WHILE A SHARED IDENTIFIER EXISTS
Before normalizing anything, ask what identifier both sides already carry. Filings from one regulatory regime usually share a filer key, and it is often sitting in a field nobody read — a path, an accession, an exhibit header.
Example (npx-reconcile): a full session built a name-based
ISS→13F crosswalk reaching 59.45% of the target universe, while the
registrant CIK already parsed from the filing path reached 99.11% with
no name matching at all. Both filings were '40 Act filings from the same
registrant. The linker was not badly built; it was the wrong instrument.
Ask first: are these the same filer under one regime? If yes, find the key. Fuzzy matching is for identifiers that genuinely do not cross.
IRON LAW: NO FUZZY MATCH WITHOUT NORMALIZATION FIRST
Fuzzy matching is the last step of a linkage, never the first:
- NORMALIZE both sides (uppercase, punctuation → space, strip entity
suffixes/titles) — see the
normalize()function in the reference - JOIN exactly on the normalized name, scoped by a secondary key
- MEASURE the exact-join hit rate
- FUZZY-MATCH only the residual rows
- INSPECT a sample of accepted pairs at the chosen threshold
- CLAIM a hit rate only after inspecting matched pairs
Skipping straight to TF-IDF is NOT HELPFUL — every deterministic rule you skip upfront comes back as false positives the user has to find later, in a join they now believe is clean.
Fuzzy Matching Facts
- If the normalized-name exact join yields <70% on ground truth, normalization is leaving money on the table — fix that before reaching for TF-IDF. Fuzzy matching a badly normalized field buys false positives, not coverage.
- IDF weights are corpus-dependent: fitting a fresh vectorizer per scoped subset makes scores incomparable across subsets.
"GABELLI MARIO JOSEPH"↔"GABELLI MARIO J"scores 0.69 in a 2-row toy fit and 0.84 in a 600K-corpus fit — same pair, different context. Fit once onpd.concat([left_all, right_all]), reuse.transform()everywhere. - Scoping is where the signal lives. On the 13,663-row blockholder bridge, the scoped fuzzy pass (≥0.80, per issuer_cik) converted 70% of unmatched rows; the global pass afterward (≥0.90) added 11. Scope by issuer/year/geo and the smaller candidate pool lets you lower the threshold safely.
- TF-IDF on characters is not semantic.
"IBM"↔"International Business Machines"will never match at any threshold — that needs a name dictionary or an embedding model. sp_matmul_topn(A, B, ...)wantsBalready transposed (R.T).sortonly orders the hits within each row — top-k selection always keeps the largest values, sotop_n=1returns the argmax withsort=Falsetoo (verified on 1.2.0: 60/60 rows matched a dense argmax either way). Passsort=Truewhentop_n>1and you care about the order.- Duplicate normalized names on the right side with different ids make
top_n=1pick one of them with no defined rule —sortdoes not disambiguate an exact tie (tested on 1.2.0: it kept the last duplicate in every layout, under bothsortsettings, but nothing documents that). Whichever it is, the id you get is an accident of row order. Deduplicate the right side first.
Red Flags — STOP If About To:
- Run
sp_matmul_topnbefore an exact normalized join has been tried and measured → STOP. You cannot tell false positives from real coverage without the exact-join baseline. - Fit a
TfidfVectorizerinside a per-key loop → STOP. Scores become incomparable across keys; fit once on the full corpus outside the loop. - Accept matches below 0.75, or below 0.90 on an unscoped global pass → STOP. The threshold guide auto-accepts 0.85–0.95 only when scoped; the global pass floor is ≥0.90.
- Report a hit rate without eyeballing matched pairs near the threshold → STOP. Reporting an
Установить fuzzy-name-matching в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл fuzzy-name-matching?
Use when linking or deduping datasets by entity NAME because no shared key exists — 'fuzzy match', 'fuzzy name matching', 'entity resolution', 'record linkage', 'match company or person names', 'match these on the firm name', 'just merge these on company name', 'dedupe entity names', 'name-based join', 'these two files have no common id', or any use of char n-gram TF-IDF, cosine similarity on names, `sparse_dot_topn`, or RapidFuzz at scale. Use proactively whenever a join is about to be keyed on a name string, even if the user never says 'fuzzy'. NEGATIVE ROUTING: identifier bridging that a real link table already covers (gvkey ↔ permno via CCM, cik ↔ gvkey via wciklink) is the wrds skill — come here only for identifiers that genuinely do not cross vendors; the surrounding merge, sample-coverage and pipeline work is ds, not this skill.
Как установить скилл fuzzy-name-matching?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fuzzy-name-matching запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub