Clone this repo:
  1. 2ebc2c6 fixed python 3.11 on musllinux (#184) by Martino Mensio · 1 year, 8 months ago main
  2. 0e87da2 doc bump by James Turk · 1 year, 8 months ago
  3. 417d6b8 Bump docker/setup-qemu-action from 1 to 2 (#182) by dependabot[bot] · 1 year, 8 months ago
  4. eda72de 0.11.2 by James Turk · 1 year, 8 months ago v0.11.2
  5. d06cfe1 switch Damerau to use ahash by James Turk · 1 year, 8 months ago

Overview

jellyfish is a library for approximate & phonetic matching of strings.

Source: https://github.com/jamesturk/jellyfish

Documentation: https://jamesturk.github.io/jellyfish/

Issues: https://github.com/jamesturk/jellyfish/issues

PyPI badge Test badge Coveralls Test Rust

Included Algorithms

String comparison:

  • Levenshtein Distance
  • Damerau-Levenshtein Distance
  • Jaro Distance
  • Jaro-Winkler Distance
  • Match Rating Approach Comparison
  • Hamming Distance

Phonetic encoding:

  • American Soundex
  • Metaphone
  • NYSIIS (New York State Identification and Intelligence System)
  • Match Rating Codex

Example Usage

>>> import jellyfish
>>> jellyfish.levenshtein_distance('jellyfish', 'smellyfish')
2
>>> jellyfish.jaro_distance('jellyfish', 'smellyfish')
0.89629629629629637
>>> jellyfish.damerau_levenshtein_distance('jellyfish', 'jellyfihs')
1

>>> jellyfish.metaphone('Jellyfish')
'JLFX'
>>> jellyfish.soundex('Jellyfish')
'J412'
>>> jellyfish.nysiis('Jellyfish')
'JALYF'
>>> jellyfish.match_rating_codex('Jellyfish')
'JLLFSH'