Edit distance library for Haskell
Haskell Shell
Latest commit a4bdeb6 Jan 19, 2017 @batterseapower committed on GitHub Merge pull request #2 from spl/patch-1
Backlash-escape double quotes
Failed to load latest commit information.
.ghci Sensible GHCi defaults Mar 28, 2011
.gitattributes Update gitattributes to try and get whitespace working Jul 26, 2008
LICENSE Initial commit of edit-distance package Jul 20, 2008
Setup.lhs Initial commit of edit-distance package Jul 20, 2008
TODO Add TODOs Sep 6, 2008
import_wiki.lhs Create README by importing from the GitHub wiki Sep 6, 2008
release Fix release script: cabal-upload is broken Mar 28, 2011


Edit Distance Algorithms

You can help improve this README with extra snippets and advice by using the GitHub wiki.


To just install the library:

runghc Setup.lhs configure
runghc Setup.lhs build
sudo runghc Setup.lhs install

If you want to build the tests, to check it’s all working:

runghc Setup.lhs configure -ftests
runghc Setup.lhs build


Edit distances algorithms for fuzzy matching. Specifically, this library provides:

They have been fairly heavily optimized. Indeed, for situations where one of the strings is under 64 characters long I use a rather neat “bit vector” algorithm: see the authors paper and the associated errata for more information. The algorithms could be faster, but they aren’t yet slow enough to force me into improving the situation.


Text.EditDistance> levenshteinDistance defaultEditCosts "witch" "kitsch"