skillfed

tfidf-matcher

A small package that enables super-fast TF-IDF based string matching.

tfidf-matcher v0.3.0 84.3K downloads/30d#14,011 on PyPI56
Permissive license Abandoned released

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-matcher

uv

uv add tfidf-matcher

poetry

poetry add tfidf-matcher

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

fuzzy string matching large scaletfidf based string similarityfast approximate string matchingbulk string deduplicationscalable text matchingk-nearest neighbours string searchcorpus-based string matching
fuzzy-matchingtext-similaritydata-deduplication

More Information Analysis packages