N-grams: Difference between revisions
Content added Content deleted
Line 347: | Line 347: | ||
nGramCounts :: Int -> String -> M.Map String Int |
nGramCounts :: Int -> String -> M.Map String Int |
||
nGramCounts n |
nGramCounts n = |
||
⚫ | |||
foldr |
|||
⚫ | |||
M.empty |
|||
------------------------- GENERIC ------------------------ |
|||
(windows n s) |
|||
windows :: Int -> [a] -> [[a]] |
windows :: Int -> [a] -> [[a]] |