{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing/3"},{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic/2"},{"label":"Indexing","url":"https://skillfed.io/packages/category/text-processing-indexing"}],"enrichment":{"capability":"Extends Python's set class to perform fuzzy string matching using N-gram similarity, allowing efficient searches for similar items in a collection.","skillfed_tags":["fuzzy-matching","string-similarity","abandoned"],"use_cases":["Implement a typo-tolerant search in a dataset where exact matches fail but similar strings should be found.","Build a duplicate-detection system that identifies near-duplicate strings by N-gram overlap.","Create a spell-checker or autocorrect feature that ranks candidate corrections by string similarity.","Index and search user-provided text where minor spelling variations are common.","Perform fuzzy matching between datasets to link records that refer to the same entity with slightly different names."],"what_it_does":"NGram is a Python set subclass that indexes items by their character-based N-gram representation (default N=3), enabling fuzzy search by string similarity. When you add items to an NGram set, it pads each item's string representation, splits it into overlapping N-character substrings, and stores associations between those N-grams and the items. To find similar items, you query with a string, and the class ranks results by the ratio of shared to unshared N-grams, returning matches even when the query doesn't exactly match any stored item.\n\nThe package is designed for non-string items too\u2014you provide a key function (like `str`) to extract or normalize the string representation before indexing. It does not implement a language model; it is purely a character-level similarity index. The library has been in production use since 2007 but is no longer actively maintained, with the last release in 2021-09-15.","worth_installing":"Yes, if you need lightweight fuzzy string matching in a standalone Python project and can accept that the package is no longer maintained. The library is stable, has no dependencies, and works with current Python versions. However, do not adopt it for security-sensitive applications or if you require ongoing maintenance and updates."},"id":"ngram","links":{"html":"https://skillfed.io/packages/ngram","md":"https://skillfed.io/packages/ngram.md","pypi":"https://pypi.org/project/ngram/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2021-09-15","license_spdx":null,"license_treatment":"copyleft","name":"ngram","python_support":"supports_current","summary":"A `set` subclass providing fuzzy search based on N-grams."},"popularity":{"monthly_downloads":180831,"position":10139,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.0.3"}
