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

Safe HaskellNone
LanguageHaskell2010

Codec.Compression.PPM.Trie

Synopsis

Documentation

data Trie e v Source #

Trie nodes may have an optional arbitrary value, and each edge is associated with a particular value seen in the input sequences.

Constructors

Trie 

Fields

Instances
(Ord e, Read v, Read e) => Read (Trie e v) Source # 
Instance details

Defined in Codec.Compression.PPM.Trie

Methods

readsPrec :: Int -> ReadS (Trie e v) #

readList :: ReadS [Trie e v] #

readPrec :: ReadPrec (Trie e v) #

readListPrec :: ReadPrec [Trie e v] #

(Show v, Show e) => Show (Trie e v) Source # 
Instance details

Defined in Codec.Compression.PPM.Trie

Methods

showsPrec :: Int -> Trie e v -> ShowS #

show :: Trie e v -> String #

showList :: [Trie e v] -> ShowS #

Generic (Trie e v) Source # 
Instance details

Defined in Codec.Compression.PPM.Trie

Associated Types

type Rep (Trie e v) :: * -> * #

Methods

from :: Trie e v -> Rep (Trie e v) x #

to :: Rep (Trie e v) x -> Trie e v #

(Serialize e, Serialize v, Ord e, Ord v) => Serialize (Trie e v) Source # 
Instance details

Defined in Codec.Compression.PPM.Trie

Methods

put :: Putter (Trie e v) #

get :: Get (Trie e v) #

type Rep (Trie e v) Source # 
Instance details

Defined in Codec.Compression.PPM.Trie

type Rep (Trie e v) = D1 (MetaData "Trie" "Codec.Compression.PPM.Trie" "ngram-0.1.0.0-DSiDezXpOxU57eJjCaUpw8" False) (C1 (MetaCons "Trie" PrefixI True) (S1 (MetaSel (Just "value") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 v) :*: S1 (MetaSel (Just "edges") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map e (Trie e v)))))

data Context v c Source #

Constructors

Context Int 

lookup :: Ord e => [e] -> Trie e v -> Maybe (Trie e v) Source #

labeledSuffixCountTrie :: (Ord l, Ord e) => [(l, [e])] -> Trie e (Map l Integer) Source #