adict-0.1.0: Approximate dictionary searching

Safe HaskellNone

NLP.Adict.DAWG

Synopsis

Documentation

type DAWGD a b = DAWG a (Maybe b)Source

data DAWG a b Source

Constructors

DAWG 

Fields

root :: Int
 
array :: Vector (Row a b)
 

Instances

(Ord a, Binary a, Binary b) => Binary (DAWG a b) 

size :: DAWG a b -> IntSource

row :: DAWG a b -> Int -> Row a bSource

data Row a b Source

Constructors

Row 

Fields

rowValue :: b
 
rowEdges :: Vector (a, Int)
 

entry :: DAWG a (Maybe b) -> [Int] -> Maybe ([a], b)Source

charOn :: DAWG a b -> (Int, Int) -> Maybe aSource

valueIn :: DAWG a b -> Int -> bSource

edges :: DAWG a b -> Int -> [(a, Int)]Source

edgeOn :: Eq a => DAWG a b -> Int -> a -> Maybe IntSource

serialize :: Ord a => DAWG a b -> [Node a b]Source

deserialize :: Ord a => [Node a b] -> DAWG a bSource

Assumptiom: root node is last in the serialization list.