Skip to content
This repository
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Text
Octocat-spinner-32 .ghci
Octocat-spinner-32 .gitattributes
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.textile
Octocat-spinner-32 Setup.lhs
Octocat-spinner-32 TODO
Octocat-spinner-32 edit-distance.cabal
Octocat-spinner-32 import_wiki.lhs
Octocat-spinner-32 release
README.textile

Edit Distance Algorithms

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

Installing

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
dist/build/edit-distance-tests/edit-distance-tests

Description

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.

Example

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

Linkage

Something went wrong with that request. Please try again.