Registry / data / jellyfish

jellyfish

JSON →
library1.2.1pypypi✓ verified 24d ago

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.

pip install jellyfish
INSTALL
IMPORT
SIG · JELLYFISH
J
jellyfish
datapythonv1.2.1
Install
1.8s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jellyfish
import jellyfish
levenshtein_distance
jellyfish.levenshtein_distance(s1, s2)
jaro_similarity
jellyfish.jaro_similarity(s1, s2)
jellyfish.jaro_distance(s1, s2)
The `jaro_distance` function was deprecated in 0.8.x and fully removed in 1.0.1. Use `jaro_similarity` instead.
jaro_winkler_similarity
jellyfish.jaro_winkler_similarity(s1, s2)
jellyfish.jaro_winkler(s1, s2)
The `jaro_winkler` function was deprecated in 0.8.x and fully removed in 1.0.1. Use `jaro_winkler_similarity` instead.

This quickstart demonstrates common string comparison algorithms and phonetic encoding functions available in the `jellyfish` library.

import jellyfish # String comparison s1 = "jellyfish" s2 = "smellyfish" lev_dist = jellyfish.levenshtein_distance(s1, s2) jaro_sim = jellyfish.jaro_similarity(s1, s2) dam_lev_dist = jellyfish.damerau_levenshtein_distance("jellyfihs", "jellyfish") print(f"Levenshtein Distance: {lev_dist}") print(f"Jaro Similarity: {jaro_sim}") print(f"Damerau-Levenshtein Distance: {dam_lev_dist}") # Phonetic encoding metaphone_code = jellyfish.metaphone("Jellyfish") soundex_code = jellyfish.soundex("Jellyfish") nysiis_code = jellyfish.nysiis("Jellyfish") print(f"Metaphone: {metaphone_code}") print(f"Soundex: {soundex_code}") print(f"NYSIIS: {nysiis_code}")
Debug
Known issues
breakingThe functions `jellyfish.jaro_distance` and `jellyfish.jaro_winkler` were deprecated in versions 0.8.x and completely removed in version 1.0.1.
fix
Migrate to `jellyfish.jaro_similarity` and `jellyfish.jaro_winkler_similarity` respectively.
affects: >=1.0.1
breakingThe `jellyfish.porter_stem` function was removed in version 0.10.0 (March 2023).
fix
Use alternative stemming libraries (e.g., NLTK) as `porter_stem` was removed due to better implementations existing elsewhere.
affects: >=0.10.0
breakingSince version 1.0.3, the `jellyfish.match_rating_codex` function now raises a `ValueError` if passed non-alphabetic characters.
fix
Ensure input strings to `match_rating_codex` contain only alphabetic characters, or handle the `ValueError` appropriately.
affects: >=1.0.3
gotchaVersions 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.
fix
For Python 2 compatibility, use `jellyfish` version 0.6.x. For modern usage, ensure your environment runs Python 3.9 or higher.
affects: <0.7 (for Python 2.x support)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'jellyfish'
The 'jellyfish' library is not installed in your Python environment or the environment where your code is being executed.
fix
Install the library using pip: `pip install jellyfish`
TypeError: str argument expected
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).
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`.
AttributeError: module 'jellyfish' has no attribute 'jaro_distance'
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.
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.
NameError: name 'jellyfish' is not defined
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.
fix
Add `import jellyfish` at the beginning of your Python script or interactive session before attempting to use any functions from the library.
Upgrade
Version history
1.2.1latest on PyPI · released Oct 11, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
30
Bingbot
1
Resources
jellyfish — pip install jellyfish · libregistry