Minor refactor
This commit is contained in:
parent
212457077f
commit
13f9629cbc
@ -55,11 +55,6 @@ precisionCount refs = sum . map (lookFor refs) . MS.toOccurList . MS.fromList
|
||||
upToTetragrams :: [a] -> ([a], [(a, a)], [(a, a, a)], [(a, a, a, a)])
|
||||
upToTetragrams l = (l, bigrams l, trigrams l, tetragrams l)
|
||||
|
||||
bigrams :: [a] -> [(a, a)]
|
||||
bigrams [] = []
|
||||
bigrams [_] = []
|
||||
bigrams u = zip u $ tail u
|
||||
|
||||
trigrams :: [a] -> [(a, a, a)]
|
||||
trigrams [] = []
|
||||
trigrams [_] = []
|
||||
|
@ -53,3 +53,8 @@ whitespace = many1 (satisfy isHorizontalSpace)
|
||||
indicator :: Bool -> Double
|
||||
indicator True = 1.0
|
||||
indicator False = 0.0
|
||||
|
||||
bigrams :: [a] -> [(a, a)]
|
||||
bigrams [] = []
|
||||
bigrams [_] = []
|
||||
bigrams u = zip u $ tail u
|
||||
|
Loading…
Reference in New Issue
Block a user