Skip to main content

a library for doing approximate and phonetic matching of strings.

Project description

https://travis-ci.org/jamesturk/jellyfish.svg?branch=master https://coveralls.io/repos/jamesturk/jellyfish/badge.png?branch=master https://img.shields.io/pypi/v/jellyfish.svg Documentation Status https://ci.appveyor.com/api/projects/status/9xeyl1f5sd5pl40h?svg=true

Jellyfish is a python library for doing approximate and phonetic matching of strings.

Written by James Turk <dev@jamesturk.net> and Michael Stephens.

See https://github.com/jamesturk/jellyfish/graphs/contributors for contributors.

See http://jellyfish.readthedocs.io for documentation.

Source is available at http://github.com/jamesturk/jellyfish.

Jellyfish >= 0.7 only supports Python 3, if you need Python 2 please use 0.6.x.

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(u'jellyfish', u'smellyfish')
2
>>> jellyfish.jaro_distance(u'jellyfish', u'smellyfish')
0.89629629629629637
>>> jellyfish.damerau_levenshtein_distance(u'jellyfish', u'jellyfihs')
1
>>> jellyfish.metaphone(u'Jellyfish')
'JLFX'
>>> jellyfish.soundex(u'Jellyfish')
'J412'
>>> jellyfish.nysiis(u'Jellyfish')
'JALYF'
>>> jellyfish.match_rating_codex(u'Jellyfish')
'JLLFSH'

Running Tests

If you are interested in contributing to Jellyfish, you may want to run tests locally. Jellyfish uses tox to run tests, which you can setup and run as follows:

pip install tox
# cd jellyfish/
tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jellyfish-0.7.1.tar.gz (131.1 kB view details)

Uploaded Source

Built Distribution

jellyfish-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl (22.5 kB view details)

Uploaded CPython 3.6m macOS 10.13+ x86-64

File details

Details for the file jellyfish-0.7.1.tar.gz.

File metadata

  • Download URL: jellyfish-0.7.1.tar.gz
  • Upload date:
  • Size: 131.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for jellyfish-0.7.1.tar.gz
Algorithm Hash digest
SHA256 79a5640bb47120596c91b9030ed3164cc5a3d0bb6b15779bb82c3c21f8efa1c1
MD5 8bd7fdc6d4960b7952c455efd80a7188
BLAKE2b-256 699fae6f6ad509725b71d45bb408953c850da7a2ecc3dbdad4063a825702ba29

See more details on using hashes here.

File details

Details for the file jellyfish-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: jellyfish-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for jellyfish-0.7.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5e62490f5563101eea96cf4c2971a444418862f93ebe7e6fc2f8bf8b5a84cb22
MD5 8bd5f3909a382ffaccac32752f41f226
BLAKE2b-256 c920704f91cb51c53c88c5f8cdcd881b08f771f423327a013ad0cf46f97667fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page