rflynn / jellyfish

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jellyfish

image

image

image

Documentation Status

image

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(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'

About

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

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 94.2%Language:Batchfile 5.5%Language:Shell 0.3%