--- id: string-grouper version: "0.8.0" license: MIT license_treatment: permissive maintenance: active --- # string-grouper — String grouper contains functions to do string matching using TF-IDF and the cossine similarity. License: permissive · Maintenance: active · Downloads: 116.0K/mo ## 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 above — 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 pip install string-grouper uv add string-grouper 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_current - Install friction: low - Maintenance: active - Downloads: 116.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fuzzy string matching, find similar strings, string deduplication, tf-idf similarity, group similar text, cosine similarity matching, fast string clustering, text-processing, data-deduplication, similarity-search [View on SkillFed](https://skillfed.io/packages/string-grouper) · [View on PyPI](https://pypi.org/project/string-grouper/)