{"id":1175,"library":"jellyfish","title":"jellyfish - Approximate and Phonetic String Matching","description":"Jellyfish is a Python library for approximate and phonetic matching of strings. It offers a comprehensive collection of algorithms including Levenshtein, Damerau-Levenshtein, Jaro, and Jaro-Winkler distances for string comparison, alongside phonetic encodings such as American Soundex, Metaphone, NYSIIS, and Match Rating Codex. This makes it an essential tool for tasks like data cleaning, typo correction, and record linkage. The library is actively maintained, with the current version being 1.2.1, and releases typically focus on bug fixes and performance improvements.","status":"active","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/jamesturk/jellyfish","tags":["string matching","fuzzy matching","phonetic matching","levenshtein","jaro-winkler","soundex","metaphone"],"install":[{"cmd":"pip install jellyfish","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"jellyfish","correct":"import jellyfish"},{"symbol":"levenshtein_distance","correct":"jellyfish.levenshtein_distance(s1, s2)"},{"note":"The `jaro_distance` function was deprecated in 0.8.x and fully removed in 1.0.1. Use `jaro_similarity` instead.","wrong":"jellyfish.jaro_distance(s1, s2)","symbol":"jaro_similarity","correct":"jellyfish.jaro_similarity(s1, s2)"},{"note":"The `jaro_winkler` function was deprecated in 0.8.x and fully removed in 1.0.1. Use `jaro_winkler_similarity` instead.","wrong":"jellyfish.jaro_winkler(s1, s2)","symbol":"jaro_winkler_similarity","correct":"jellyfish.jaro_winkler_similarity(s1, s2)"}],"quickstart":{"code":"import jellyfish\n\n# String comparison\ns1 = \"jellyfish\"\ns2 = \"smellyfish\"\n\nlev_dist = jellyfish.levenshtein_distance(s1, s2)\njaro_sim = jellyfish.jaro_similarity(s1, s2)\ndam_lev_dist = jellyfish.damerau_levenshtein_distance(\"jellyfihs\", \"jellyfish\")\n\nprint(f\"Levenshtein Distance: {lev_dist}\")\nprint(f\"Jaro Similarity: {jaro_sim}\")\nprint(f\"Damerau-Levenshtein Distance: {dam_lev_dist}\")\n\n# Phonetic encoding\nmetaphone_code = jellyfish.metaphone(\"Jellyfish\")\nsoundex_code = jellyfish.soundex(\"Jellyfish\")\nnysiis_code = jellyfish.nysiis(\"Jellyfish\")\n\nprint(f\"Metaphone: {metaphone_code}\")\nprint(f\"Soundex: {soundex_code}\")\nprint(f\"NYSIIS: {nysiis_code}\")","lang":"python","description":"This quickstart demonstrates common string comparison algorithms and phonetic encoding functions available in the `jellyfish` library."},"warnings":[{"fix":"Migrate to `jellyfish.jaro_similarity` and `jellyfish.jaro_winkler_similarity` respectively.","message":"The functions `jellyfish.jaro_distance` and `jellyfish.jaro_winkler` were deprecated in versions 0.8.x and completely removed in version 1.0.1.","severity":"breaking","affected_versions":">=1.0.1"},{"fix":"Use alternative stemming libraries (e.g., NLTK) as `porter_stem` was removed due to better implementations existing elsewhere.","message":"The `jellyfish.porter_stem` function was removed in version 0.10.0 (March 2023).","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Ensure input strings to `match_rating_codex` contain only alphabetic characters, or handle the `ValueError` appropriately.","message":"Since version 1.0.3, the `jellyfish.match_rating_codex` function now raises a `ValueError` if passed non-alphabetic characters.","severity":"breaking","affected_versions":">=1.0.3"},{"fix":"For Python 2 compatibility, use `jellyfish` version 0.6.x. For modern usage, ensure your environment runs Python 3.9 or higher.","message":"Versions of `jellyfish` prior to 0.7 supported Python 2.x. All versions from 0.7 onwards (including current 1.2.1) require Python 3. The library explicitly requires Python >=3.9.","severity":"gotcha","affected_versions":"<0.7 (for Python 2.x support)"}],"env_vars":null,"search_vec":"'1.2.1':79 'activ':72 'algorithm':25 'alongsid':40 'american':45 'approxim':2,13 'bug':85 'clean':63 'codex':52 'collect':23 'comparison':39 'comprehens':22 'correct':65 'current':76 'damerau':29 'damerau-levenshtein':28 'data':62 'distanc':36 'encod':42 'essenti':57 'fix':86 'focus':83 'fuzzi':92 'improv':89 'includ':26 'jaro':31,34,98 'jaro-winkl':33,97 'jellyfish':1,7 'levenshtein':27,30,96 'librari':11,70 'like':61 'linkag':68 'maintain':73 'make':54 'match':6,16,50,91,93,95 'metaphon':47,101 'nysii':48 'offer':20 'perform':88 'phonet':4,15,41,94 'python':10 'rate':51 'record':67 'releas':81 'soundex':46,100 'string':5,18,38,90 'task':60 'tool':58 'typic':82 'typo':64 'version':77 'winkler':35,99","created_at":"2026-04-05T14:31:20.371027+00:00","updated_at":"2026-04-16T15:51:54.275160+00:00","problems":[{"fix":"Install the library using pip: `pip install jellyfish`","cause":"The 'jellyfish' library is not installed in your Python environment or the environment where your code is being executed.","error":"ModuleNotFoundError: No module named 'jellyfish'"},{"fix":"Ensure all arguments passed to `jellyfish` functions are strings. If using with dataframes, convert columns to string type, handle `None` values explicitly, or wrap the `jellyfish` function in a User Defined Function (UDF) for frameworks like PySpark or Pandas `apply`.","cause":"A function from the 'jellyfish' library, which expects string inputs, received a non-string argument (e.g., None, a number, or a Pandas Series/PySpark Column without proper UDF registration).","error":"TypeError: str argument expected"},{"fix":"Update the `jellyfish` library to the latest version: `pip install --upgrade jellyfish`. If the issue persists, verify the correct function name and usage against the official documentation for your installed version.","cause":"This error typically occurs when an older version of the `jellyfish` library is installed, or there's an issue with how the module's functions are exposed, particularly when the expected function name differs from the available one.","error":"AttributeError: module 'jellyfish' has no attribute 'jaro_distance'"},{"fix":"Add `import jellyfish` at the beginning of your Python script or interactive session before attempting to use any functions from the library.","cause":"The 'jellyfish' module was not imported before its functions were called, or there was a problem during its installation which prevented it from being properly recognized.","error":"NameError: name 'jellyfish' is not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":80,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.2.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://jellyfish.jpt.sh/","github":null,"docs":"https://jellyfish.jpt.sh/","changelog":null,"pypi":"https://pypi.org/project/jellyfish/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-27","next_check":"2026-07-28","install_tag":"verified"}}