fuzzy-searchhacktoberfesthammingjaro-winklerlevenshteinmetaphonepythonsoundexstarred-jamesturk-repostarred-repo
0a6e1fb751 | ||
---|---|---|
cjellyfish@a3b62e7149 | ||
docs | ||
jellyfish | ||
testdata@c5aa82da97 | ||
.coveragerc | ||
.gitignore | ||
.gitmodules | ||
.run_with_env.cmd | ||
.travis.yml | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
appveyor.yml | ||
run-cov.sh | ||
setup.py | ||
tox.ini |
README.rst
========= jellyfish ========= .. image:: https://travis-ci.org/jamesturk/jellyfish.svg?branch=master :target: https://travis-ci.org/jamesturk/jellyfish .. image:: https://coveralls.io/repos/jamesturk/jellyfish/badge.png?branch=master :target: https://coveralls.io/r/jamesturk/jellyfish .. image:: https://img.shields.io/pypi/v/jellyfish.svg :target: https://pypi.python.org/pypi/jellyfish .. image:: https://readthedocs.org/projects/jellyfish/badge/?version=latest :target: https://readthedocs.org/projects/jellyfish/?badge=latest :alt: Documentation Status .. image:: https://ci.appveyor.com/api/projects/status/github/jamesturk/jellyfish?branch=master&svg=true :target: https://ci.appveyor.com/project/jamesturk/jellyfish/ 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. 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('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'