The language-spelling package
Haskell library meant to be a set of tools to correct spelling mistakes, homophones, and OCR errors.
Sample session:
ghci> :m + Language.Distance.Search.BK
ghci> distance "foo" "bar" :: Distance DamerauLevenshtein
3
ghci> let bk = foldr insert empty ["foo", "foa", "fooa", "ofo", "arstu", "nana", "faa"] :: BKTree String DamerauLevenshtein
ghci> query 0 "foo" bk
[("foo",Distance 0)]
ghci> query 2 "foo" bk
[("faa",Distance 2),("foa",Distance 1),("fooa",Distance 1),("foo",Distance 0),("ofo",Distance 1)]
TODO:
Phonetic algorithms: metaphone, double metaphone, maybe others
Tests and better benchmarking
Cost tuning when searching
Properties
| Versions | 0.1, 0.1.1, 0.1.2, 0.2, 0.3, 0.3.1, 0.3.2 |
|---|---|
| Dependencies | array, base (≥3 & <5), bk-tree, bytestring, containers, ListLike, listlike-instances, text, tst, vector (≥0.5) |
| License | PublicDomain |
| Author | Francesco Mazzoli (f@mazzo.li) |
| Maintainer | Francesco Mazzoli (f@mazzo.li) |
| Category | NLP |
| Home page | https://github.com/bitonic/language-spelling |
| Bug tracker | https://github.com/bitonic/language-spelling/issues |
| Source repository | git clone git://github.com/bitonic/language-spelling.git |
| Upload date | Mon Oct 29 13:35:48 UTC 2012 |
| Uploaded by | FrancescoMazzoli |
| Built on | ghc-7.6 |
Modules
Downloads
- language-spelling-0.3.1.tar.gz (Cabal source package)
- package description (included in the package)