forked from bitonic/language-spelling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
language-spelling.cabal
81 lines (71 loc) · 2.56 KB
/
language-spelling.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Cabal-Version: >= 1.8
Name: language-spelling
Version: 0.3.2
Author: Francesco Mazzoli ([email protected])
Maintainer: Francesco Mazzoli ([email protected])
Build-Type: Simple
License: PublicDomain
Build-Type: Simple
Category: Natural Language Processing
Synopsis: Various tools to detect/correct mistakes in words
Tested-With: GHC==7.4.1
Homepage: https://github.com/bitonic/language-spelling
Bug-Reports: https://github.com/bitonic/language-spelling/issues
Description:
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
source-repository head
type: git
location: git://github.com/bitonic/language-spelling.git
Library
Build-Depends: base >= 3 && < 5,
array,
bytestring,
containers,
ListLike,
listlike-instances,
text,
vector >= 0.5,
bk-tree,
tst
GHC-Options: -Wall -O2
Exposed-Modules: Language.Distance,
Language.Distance.Internal,
Language.Distance.Search,
Language.Distance.Search.BK,
Language.Distance.Search.TST,
Language.Phonetic,
Language.Phonetic.Internal
Other-Modules: Language.Distance.Search.Class,
Language.Phonetic.Soundex,
Language.Phonetic.Encoder
Test-Suite benchmarks
Type: exitcode-stdio-1.0
Main-Is: bench.hs
GHC-Options: -O2 -Wall
Build-Depends: base,
criterion,
random-shuffle,
bytestring,
time