tfidf-matcher
A small package that enables super-fast TF-IDF based string matching.
What it is and what it does
tfidf_matcher solves the scalability problem of fuzzy string matching by using TF-IDF vectorization and K-Nearest Neighbours instead of pairwise comparison. It takes two lists—an original list you want to find matches for and a lookup list to search within—and returns a pandas DataFrame with the k closest matches from the lookup list for each item in the original, along with match scores. The approach trades off some matching quality for speed, making it practical for matching hundreds or thousands of items against large reference corpora.
The package depends on scikit-learn for vectorization and KNN, and pandas for result formatting. It exposes two main functions: ngrams() for generating n-grams and matcher() for the core matching operation. The author tested it successfully on 640 company names matched against a corpus of over 700,000 names, but explicitly notes the package is not well-tested beyond that use case and may produce unstable results in other scenarios.
Use it for:
- Deduplicate or link company names across two large databases without manual review.
- Match product names from a supplier catalog to your internal inventory.
- Find similar addresses or customer names across datasets for record linkage.
- Bulk fuzzy search of user-provided strings against a large reference corpus.
- Identify near-duplicate entries in a dataset before data cleaning.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Performs fast fuzzy string matching on large datasets using TF-IDF vectorization and K-Nearest Neighbours, scaling better than traditional fuzzy matchers by avoiding O(n²) complexity.
Yes, but with caution. Install if you need fast fuzzy matching on large datasets and can tolerate the risk of an abandoned package. The MIT license and low dependency friction are favorable, and it has no known vulnerabilities. However, the last update was in April 2023, there is no active maintenance, and testing is limited to a single use case. Use only if you can verify it works for your specific data and are willing to maintain a fork if needed.
Install
tfidf-matcher on PyPI
pip
pip install tfidf-matcheruv
uv add tfidf-matcherpoetry
poetry add tfidf-matcherInstalling tfidf-matcher
Before you install
Low friction to install with only scikit-learn and pandas as dependencies. However, the package is abandoned—last commit was 2023-04-06 and no updates have been made since. The repository remains public but unmaintained, so you should expect no bug fixes or compatibility updates for future Python or dependency versions.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions. No commercial or proprietary concerns.
Quickstart
pip install tfidf-matcher
import tfidf_matcher as tm
original = ["apple inc", "microsoft corp"]
lookup = ["Apple Inc.", "Microsoft Corporation", "Amazon.com"]
results = tm.matcher(original, lookup, k_matches=1, ngram_length=2)
Requires Python >=3.5; scikit-learn and pandas must be installed. The package is abandoned and untested at scale beyond the author's single use case (640 company names vs. >700,000 corpus).
Verify before relying
- Stability and correctness on datasets beyond the author's tested scenario (640 items matched against >700,000) is not documented.
- Whether the package works correctly with current versions of scikit-learn and pandas, given the last update was 2023-04-06.
- Memory and runtime performance characteristics on very large datasets compared to alternatives.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — scikit-learn, pandas |
| Maintenance | abandoned — 1,226 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,264/month — #14,011 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tfidf_matcher-0.3.0-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
string-grouperString Grouper finds groups of similar strings…
permissive · top 15,000 on PyPI
fuzzyset2Performs fuzzy string matching and approximate…
permissive · top 15,000 on PyPI
multiregexMatches multiple regex patterns against a…
permissive · top 15,000 on PyPI
ngramExtends Python's set class to perform fuzzy…
copyleft · top 15,000 on PyPI
fuzzysearchFinds approximate substring matches in text or…
permissive · top 15,000 on PyPI
pfzyProvides fuzzy string matching with match…
permissive · top 5,000 on PyPI
textsearchFind and replace multiple strings in text with…
permissive · top 15,000 on PyPI
strsimpyImplements a dozen string similarity and…
permissive · top 15,000 on PyPI
fuzzywuzzyFuzzyWuzzy performs fuzzy string matching using…
copyleft · top 5,000 on PyPI
linkify-it-pyDetects and extracts URLs, email addresses, and…
permissive · top 1,000 on PyPI