jellyfish/README.rst

71 lines
1.9 KiB
ReStructuredText
Raw Normal View History

2010-07-13 20:15:08 +00:00
=========
jellyfish
=========
2014-07-15 19:29:44 +00:00
.. image:: https://travis-ci.org/sunlightlabs/jellyfish.svg?branch=master
:target: https://travis-ci.org/sunlightlabs/jellyfish
2014-08-13 02:00:33 +00:00
.. image:: https://coveralls.io/repos/sunlightlabs/jellyfish/badge.png?branch=master
2014-08-11 18:59:49 +00:00
:target: https://coveralls.io/r/sunlightlabs/jellyfish
2014-07-15 19:29:44 +00:00
.. image:: https://pypip.in/version/jellyfish/badge.svg
:target: https://pypi.python.org/pypi/jellyfish
.. image:: https://pypip.in/format/jellyfish/badge.svg
:target: https://pypi.python.org/pypi/jellyfish
2015-02-27 06:05:26 +00:00
.. image:: https://readthedocs.org/projects/jellyfish/badge/?version=latest
:target: https://readthedocs.org/projects/jellyfish/?badge=latest
:alt: Documentation Status
2014-07-15 19:29:44 +00:00
2010-07-13 20:15:08 +00:00
Jellyfish is a python library for doing approximate and phonetic matching of strings.
2014-07-15 19:29:44 +00:00
jellyfish is a project of Sunlight Labs (c) 2014.
2010-07-13 20:15:08 +00:00
All code is released under a BSD-style license, see LICENSE for details.
2014-08-11 18:57:34 +00:00
Written by James Turk <jturk@sunlightfoundation.com> and Michael Stephens.
2010-07-13 20:15:08 +00:00
2014-08-11 18:57:34 +00:00
See https://github.com/sunlightlabs/jellyfish/graphs/contributors for contributors.
2012-01-26 16:13:53 +00:00
2010-07-13 20:15:08 +00:00
Source is available at http://github.com/sunlightlabs/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')
2012-01-26 16:13:53 +00:00
'JLLFSH'