ngram-0.1.0.0: Ngram models for compressing and classifying text.
Codec.Compression.PPM
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 #