1# Edit Distance Algorithms
2
3[![Build Status](https://travis-ci.org/phadej/edit-distance.svg?branch=master)](https://travis-ci.org/phadej/edit-distance)
4[![Hackage](https://img.shields.io/hackage/v/edit-distance.svg)](http://hackage.haskell.org/package/edit-distance)
5
6## Installing
7
8To just install the library:
9
10```
11cabal configure
12cabal build
13cabal install
14```
15
16## Description
17
18Edit distances algorithms for fuzzy matching. Specifically, this library provides:
19
20- [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance)
21- [Restricted Damerau-Levenshtein distance](http://en.wikipedia.org/wiki/Damerau-Levenshtein_distance)
22
23They have been fairly heavily optimized. Indeed, for situations where one of
24the strings is under 64 characters long we use a rather neat "bit vector"
25algorithm: see [the authors paper](http://www.cs.uta.fi/~helmu/pubs/psc02.pdf)
26and [the associated errata](http://www.cs.uta.fi/~helmu/pubs/PSCerr.html) for
27more information. The algorithms _could_ be faster, but they aren't yet slow
28enough to force us into improving the situation.
29
30## Example
31
32```hs
33Text.EditDistance> levenshteinDistance defaultEditCosts "witch" "kitsch"
342
35```
36
37
38## Links
39
40- [Hackage](http://hackage.haskell.org/package/edit-distance)
41- [GitHub](http://github.com/phadej/edit-distance)
42- [Original gitHub](http://github.com/batterseapower/edit-distance)
43