N-grams: Difference between revisions
m
→{{header|Haskell}}
Line 347:
nGramCounts :: Int -> String -> M.Map String Int
nGramCounts n
▲ (flip (M.insertWith (+)) 1)
------------------------- GENERIC ------------------------
windows :: Int -> [a] -> [[a]]
|