- type MorphFn = Pred -> Maybe Flist
- readMorph :: [(String, [AvPair])] -> MorphFn
- stripMorphSem :: MorphFn -> Sem -> Sem
- attachMorph :: MorphFn -> Sem -> [TagElem] -> [TagElem]
- attachMorphHelper :: Flist -> TagElem -> TagElem
- setMorphAnchor :: GNode -> Tree GNode -> Tree GNode
- sansMorph :: [(String, Flist)] -> [String]
- type MorphLexicon = [(String, String, Flist)]
- type UninflectedDisjunction = (String, Flist)
- inflectSentencesUsingLex :: MorphLexicon -> [[UninflectedDisjunction]] -> [[String]]
- inflectSentenceUsingLex :: MorphLexicon -> [UninflectedDisjunction] -> [String]
- inflectWordUsingLex :: MorphLexicon -> UninflectedDisjunction -> [String]
- inflectSentencesUsingCmd :: String -> [[UninflectedDisjunction]] -> IO [[String]]
- singleton :: a -> [a]
Documentation
readMorph :: [(String, [AvPair])] -> MorphFnSource
Converts information from a morphological information file into GenI's internal format.
stripMorphSem :: MorphFn -> Sem -> SemSource
Filters away from an input semantics any literals whose realisation is
strictly morphological. The first argument tells us helps identify the
morphological literals -- it associates literals with morphological stuff;
if it returns Nothing
, then it is non-morphological
attachMorph :: MorphFn -> Sem -> [TagElem] -> [TagElem]Source
attachMorph
morphfn sem cands
does the bulk of the morphological
input processing. We use morphfn
to determine which literals in
sem
contain morphological information and what information they contain.
Then we attach this morphological information to the relevant trees in
cand
. A tree is considered relevant w.r.t to a morphological
literal if its semantics contains at least one literal whose first index
is the same as the first index of the morphological literal.
attachMorphHelper :: Flist -> TagElem -> TagElemSource
Actually unify the morphological features into the anchor node
FIXME: we'll need to make sure this still works as promised when we implement co-anchors.
sansMorph :: [(String, Flist)] -> [String]Source
Extracts the lemmas from a list of uninflected sentences. This is used when the morphological generator is unavailable, doesn't work, etc.
type MorphLexicon = [(String, String, Flist)]Source
type UninflectedDisjunction = (String, Flist)Source
inflectSentencesUsingLex :: MorphLexicon -> [[UninflectedDisjunction]] -> [[String]]Source
Return a list of results for each sentence
inflectWordUsingLex :: MorphLexicon -> UninflectedDisjunction -> [String]Source
Return only n matches, but note any excessive ambiguities or missing matches
inflectSentencesUsingCmd :: String -> [[UninflectedDisjunction]] -> IO [[String]]Source
Converts a list of uninflected sentences into inflected ones by calling