Safe Haskell | None |
---|
- type UID = Int
- type POS = Text
- type Word = Text
- type Base = Text
- type IsBase = Bool
- type BaseDAWG i a b = DAWG i a b
- type FormDAWG i a b = DAWG i a b
- data Bila i a b = Bila {}
- mkBila :: (Ord i, Ord a, Ord b) => [(Base, i, a, Word, b)] -> Bila i a b
- withForm :: Ord i => Bila i a b -> Word -> LexSet i a b
- type Poli = Bila POS () ()
- type PLex = Lex POS () ()
- type PLexSet = LexSet POS () ()
- mkPoli :: [Entry] -> Poli
- type Corresp = Poli -> LexEntry -> PLexSet
- buildCorresp :: Core -> Filter -> Choice -> Corresp
- type Core = Poli -> LexEntry -> [PLexSet]
- type Filter = LexEntry -> PLex -> Bool
- type Choice = [PLexSet] -> PLexSet
- byForms :: Core
- posFilter :: Filter
- sumChoice :: Choice
Basic types
Dictionary
type BaseDAWG i a b = DAWG i a bSource
Dictionary keys represent base forms and rules transform base forms to
their corresponding word forms. Info a
is assigned to every lexeme
and info b
to every word form.
type FormDAWG i a b = DAWG i a bSource
Dictionary keys represent word forms and rules transform word forms to
their corresponding base forms. Info a
is assigned to every lexeme
and info b
to every word form.
Bilateral
Bilateral dictionary.
mkBila :: (Ord i, Ord a, Ord b) => [(Base, i, a, Word, b)] -> Bila i a bSource
Make bilateral dictionary from a list of (base form, ID, additional lexeme info, word form, additional word form info) tuples.
withForm :: Ord i => Bila i a b -> Word -> LexSet i a bSource
Identify entries which contain given word form.
Contemporary
Correspondence
type Corresp = Poli -> LexEntry -> PLexSetSource
A function which determines entries from a bilateral dictionary corresponing to a given historical lexeme.
buildCorresp :: Core -> Filter -> Choice -> CorrespSource
Build Corresp
function form individual components.
Components
type Core = Poli -> LexEntry -> [PLexSet]Source
We provide three component types, Core
, Filter
and Choice
, which
can be combined together using the buildCorresp
function to construct
a Corresp
function. The first one, Core
, is used to identify a list
of potential sets of lexemes. It is natural to define the core function
in such a way because the task of determining corresponding lexemes can
be usually divided into a set of smaller tasks of the same purpose.
For example, we may want to identify LexSet
s corresponding to individual
word forms of the historical lexeme.
type Filter = LexEntry -> PLex -> BoolSource
Function which can be used to filter out lexemes which do not satisfy a particular predicate. For example, we may want to filter out lexemes with incompatible POS value.
type Choice = [PLexSet] -> PLexSetSource
The final choice of lexemes. Many different strategies can be used here sum of the sets, intersection, or voting.
Filter out lexemes with POS value incompatible with the set of POS values assigned to the historical lexeme.