Safe Haskell | None |
---|
A DAWG
-based dictionary with additional information
assigned to lexical entries and word forms.
- data Rule = Rule {}
- apply :: Rule -> Text -> Text
- between :: Text -> Text -> Rule
- type DAWG i a b = DAWG Char () (Node i a b)
- data Lex i a b = Lex {}
- data Key i = Key {}
- data Val a w b = Val {}
- type Node i a b = Map i (Val a Rule b)
- type LexSet i a b = Map (Key i) (Val a Text b)
- mkLexSet :: Ord i => [Lex i a b] -> LexSet i a b
- unLexSet :: LexSet i a b -> [Lex i a b]
- decode :: Ord i => Text -> Node i a b -> LexSet i a b
- lookup :: Ord i => Text -> DAWG i a b -> LexSet i a b
- fromList :: (Ord i, Ord a, Ord b) => [(Text, i, a, Text, b)] -> DAWG i a b
- toList :: (Ord i, Ord a, Ord b) => DAWG i a b -> [(Text, i, a, Text, b)]
- entries :: Ord i => DAWG i a b -> [Lex i a b]
- revDAWG :: (Ord i, Ord a, Ord b) => DAWG i a b -> DAWG i a b
Rule
A rule for translating a form into another form.
DAWG
type DAWG i a b = DAWG Char () (Node i a b)Source
A dictionary parametrized over ID i
, with info a
for every
(key, i) pair and info b
for every (key, i, apply rule key) triple.
Entry
A key of a dictionary entry.
A value of the entry.
type Node i a b = Map i (Val a Rule b)Source
Actual values stored in automaton states contain
all entry information but path
.
Entry set
Query
Conversion
fromList :: (Ord i, Ord a, Ord b) => [(Text, i, a, Text, b)] -> DAWG i a bSource
Make dictionary from a list of (key, ID, entry info, form, entry/form info) tuples.