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 <james.p.turk@gmail.com> 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.

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.6.0.tar.gz (131.1 kB view details)

Uploaded Source

Built Distributions

jellyfish-0.6.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

jellyfish-0.6.0-cp36-cp36m-macosx_10_12_x86_64.whl (22.7 kB view details)

Uploaded CPython 3.6m macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: jellyfish-0.6.0.tar.gz
  • Upload date:
  • Size: 131.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jellyfish-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f5da646c4ff578ff37695915c05eaae938b1218082bfef59f8a7183477681ab0
MD5 cedb078a7c1f3f42029217d39869bb0f
BLAKE2b-256 cbbb2362099ca5d680e39f75a37b2c8f677fc2d3dda94ce51b3738feff58d136

See more details on using hashes here.

File details

Details for the file jellyfish-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jellyfish-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59d430d728a25560827bda207a45428d5f6364735fc373b462b87a611567f9f1
MD5 cdb6a224e3d665ba830c137c03510604
BLAKE2b-256 16a8589cae6382e670f41696a1dbad69c459b5d648dd7c661501d34ee29e6ba1

See more details on using hashes here.

File details

Details for the file jellyfish-0.6.0-cp36-cp36m-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jellyfish-0.6.0-cp36-cp36m-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 84b3d5a66d2421ffdf027855cd8f6e9cc2f1b40113fab5aa2ace93a3933cdc1a
MD5 b413381ebea4c3ed3f185d1329273522
BLAKE2b-256 9bf76daf04471489e788ad6088fff1a2054851155d45b75c1673e089f2f41cfe

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