ngram-0.1.0.0: Ngram models for compressing and classifying text.

Safe HaskellNone
LanguageHaskell2010

Codec.Compression.PPM

Documentation

type Model l a = Trie (Entry a) (Map l Integer) Source #

fromSequences :: (Ord l, Ord a, Show l, Show a) => Int -> [(l, [a])] -> Trie (Entry a) (Map l Integer) Source #

classifySequence :: (Ord l, Ord a, Show l, Show a) => Trie (Entry a) (Map l Integer) -> Int -> [a] -> l Source #

scoreSequence :: (Ord l, Ord a, Show l, Show a) => Trie (Entry a) (Map l Integer) -> Int -> [a] -> Map l Double Source #