Commit 63597317 authored by Camil Staps's avatar Camil Staps
Browse files

Fix ngram search for |s|<n

parent 6ec3dbff
......@@ -36,7 +36,7 @@ search :: !String !(NGramIndex v) -> [(v,Int)] | Eq, Ord v
search s {n,ci,idx} = count
$ foldr merge []
$ map (fromMaybe [] o flip get idx)
$ if (size s >= n) (ngrams ci n s) [fromString s]
$ if (size s >= n) (ngrams ci n s) [map toLower $ fromString s]
where
count :: [v] -> [(v,Int)] | == v
count [] = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment