skillfed

string-grouper

String grouper contains functions to do string matching using TF-IDF and the cossine similarity.

string-grouper v0.8.0 116.0K downloads/30d#12,228 on PyPI
Permissive license MIT Active released

What it is and what it does

String Grouper is a library for finding groups of similar strings within a single list or across multiple lists. It uses TF-IDF vectorization and cosine similarity to identify matches, then groups them into clusters with a centroid representative. The library is built for speed: it leverages sp_matmul_rs, a Rust-based sparse matrix multiplication library, to compute similarities efficiently even on large datasets.

The package is typically used for data cleaning and deduplication tasks—matching company names with typos or formatting variations, finding duplicate entries in databases, or resolving indirect associations between strings through graph-based grouping. It exposes two main functions: match_strings to find pairwise matches above a similarity threshold, and group_similar_strings to cluster strings and identify canonical representatives. The core dependencies are numpy, pandas, scikit-learn, and scipy, making it a natural fit for data-science workflows.

Use it for:

  • Deduplicate company or product names in datasets where exact matches fail due to formatting or spelling variations.
  • Find all variations of a customer name across multiple database records for entity resolution.
  • Identify similar addresses or locations in bulk data to consolidate records.
  • Cluster misspelled or abbreviated terms in text datasets to group related concepts.
  • Resolve indirect associations between strings in large datasets where direct pairwise comparison is infeasible.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

String Grouper finds groups of similar strings within or across lists using TF-IDF and cosine similarity, optimized for speed through sparse matrix operations.

Yes. String Grouper is actively maintained, has no known vulnerabilities, installs with low friction, and solves a concrete problem in data cleaning and deduplication. It is well-suited for anyone working with messy text data in pandas workflows. The MIT license removes licensing friction. Install it if you need fuzzy string matching or deduplication at scale.

Install

string-grouper on PyPI

pip

pip install string-grouper

uv

uv add string-grouper

poetry

poetry add string-grouper

Installing string-grouper

Before you install

Low install friction with a pure Python wheel. Active maintenance as of 19 days ago. Depends on numpy, pandas, scikit-learn, scipy, and two specialized sparse-matrix libraries (sp_matmul_rs and sparse_dot_topn), all of which are standard data-science packages.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.

Quickstart

pip install string-grouper

from string_grouper import match_strings, group_similar_strings
import pandas as pd

names = pd.Series(['Apple Inc', 'Apple Inc.', 'Microsoft Corp'])
matches = match_strings(names)
groups = group_similar_strings(names)

Requires Python 3.10 or later (and less than 4.0).

Verify before relying

  • Whether the Rust-based sp_matmul_rs backend is pre-compiled for all common platforms or requires build tools.
  • Performance characteristics on datasets smaller than the 663,000-name example cited in the description.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — loguru, numpy, pandas, scikit-learn, scipy, sp-matmul-rs, sparse-dot-topn
Maintenance actively maintained — 19 days since the last release
First released
Downloads 115,963/month — #12,228 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: string_grouper-0.8.0-py3-none-any.whl

Tags

fuzzy string matchingfind similar stringsstring deduplicationtf-idf similaritygroup similar textcosine similarity matchingfast string clustering
text-processingdata-deduplicationsimilarity-search

More Information Analysis packages