{"name":"Fuzzywuzzy: Python Library for Fuzzy String Matching","description":"Fuzzywuzzy is a popular Python library designed for fuzzy string matching, enabling efficient comparison and similarity scoring between text strings. It leverages Levenshtein distance to help with tasks like data cleaning and record linkage. While widely used, this project has been superseded by TheFuzz, which continues its development under a new name.","github":"https://github.com/seatgeek/fuzzywuzzy","url":"https://osrepos.com/repo/seatgeek-fuzzywuzzy","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/seatgeek-fuzzywuzzy","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/seatgeek-fuzzywuzzy.md","json":"https://osrepos.com/repo/seatgeek-fuzzywuzzy.json","topics":["Python","Fuzzy Matching","String Comparison","NLP","Data Cleaning","Levenshtein Distance","Open Source"],"keywords":["Python","Fuzzy Matching","String Comparison","NLP","Data Cleaning","Levenshtein Distance","Open Source"],"stars":null,"summary":"Fuzzywuzzy is a popular Python library designed for fuzzy string matching, enabling efficient comparison and similarity scoring between text strings. It leverages Levenshtein distance to help with tasks like data cleaning and record linkage. While widely used, this project has been superseded by TheFuzz, which continues its development under a new name.","content":"## Introduction\n\nFuzzywuzzy is a powerful Python library for fuzzy string matching, based on Levenshtein distance. It provides a simple API to compare strings and determine their similarity, making it invaluable for tasks requiring flexible text comparison. **Important Note:** This project has been renamed and moved to [TheFuzz](https://github.com/seatgeek/thefuzz){:target=\"_blank\"}, which is the actively maintained successor. Users are encouraged to migrate to TheFuzz for ongoing development and support.\n\n## Installation\n\nTo install Fuzzywuzzy, you can use pip. However, it is highly recommended to install `thefuzz` instead, as `fuzzywuzzy` is no longer actively maintained and `thefuzz` offers the same functionality with continued support.\n\nbash\npip install fuzzywuzzy[speedup]\n# Recommended: Install thefuzz instead\n# pip install thefuzz[speedup]\n\n\nThe `[speedup]` option installs `python-Levenshtein`, which significantly improves performance for string comparisons.\n\n## Examples\n\nFuzzywuzzy offers various methods for comparing strings, including simple ratio, partial ratio, token sort ratio, and token set ratio.\n\npython\nfrom fuzzywuzzy import fuzz\nfrom fuzzywuzzy import process\n\n# Simple Ratio\nprint(fuzz.ratio(\"this is a test\", \"this is a test!\")) # Output: 97\n\n# Partial Ratio\nprint(fuzz.partial_ratio(\"this is a test\", \"this is a test!\")) # Output: 100\n\n# Token Sort Ratio\nprint(fuzz.token_sort_ratio(\"fuzzy wuzzy was a bear\", \"wuzzy fuzzy was a bear\")) # Output: 100\n\n# Token Set Ratio\nprint(fuzz.token_set_ratio(\"fuzzy was a bear\", \"fuzzy fuzzy was a bear\")) # Output: 100\n\n# Extracting best matches from a list\nchoices = [\"apple pie\", \"grape juice\", \"apple sauce\", \"orange juice\"]\nprint(process.extract(\"apple\", choices, limit=2)) # Output: [('apple pie', 90), ('apple sauce', 90)]\nprint(process.extractOne(\"apple\", choices)) # Output: ('apple pie', 90)\n\n\n## Why Use Fuzzy String Matching?\n\nFuzzy string matching is crucial in many applications where exact string matches are not sufficient. It helps in:\n\n*   **Data Cleaning:** Identifying and merging duplicate records with slight variations or typos.\n*   **Search Functionality:** Providing more robust search results by matching queries even with minor spelling errors.\n*   **Natural Language Processing (NLP):** Comparing text for similarity in tasks like plagiarism detection or text deduplication.\n*   **Record Linkage:** Connecting records across different datasets that may have inconsistent naming conventions.\n\nFuzzywuzzy, and its successor TheFuzz, provide a straightforward and efficient way to implement these capabilities in Python.\n\n## Links\n\n*   [Fuzzywuzzy GitHub Repository](https://github.com/seatgeek/fuzzywuzzy){:target=\"_blank\"}\n*   [TheFuzz GitHub Repository (Recommended)](https://github.com/seatgeek/thefuzz){:target=\"_blank\"}","metrics":{"detailViews":0,"githubClicks":0},"dates":{"published":null,"modified":"2026-08-01T20:29:15.000Z"}}