GenI-0.17.4: A natural language generator (specifically, an FB-LTAG surface realiser)




Entry point

type PolAut = NFA PolState PolTransSource

data PolState Source


PolSt Int [Pred] [(Int, Int)]

position in the input semantics, extra semantics, polarity interval

type PolResult = ([AutDebug], PolAut, PolAut, Sem)Source

intermediate auts, seed aut, final aut, potentially modified sem

buildAutomaton :: SemInput -> [TagElem] -> Flist -> PolMap -> PolResultSource

Constructs a polarity automaton from the surface realiser's input: input semantics, lexical selection, extra polarities and index constraints. For debugging purposes, it returns all the intermediate automata produced by the construction algorithm.

Inner stuff (exported for debugging?)

makePolAut :: [TagElem] -> Sem -> PolMap -> PolResultSource

fixPronouns :: (Sem, [TagElem]) -> (Sem, [TagElem])Source

Returns a modified input semantics and lexical selection in which pronouns are properly accounted for.

detectPolPaths :: [[TagElem]] -> [(TagElem, BitVector)]Source

Given a list of paths (i.e. a list of list of trees) return a list of trees such that each tree is annotated with the paths it belongs to.

showLite :: ShowLite a => a -> StringSource

showLitePm :: PolMap -> StringSource

Display a PolMap in human-friendly text. The advantage is that it displays fewer quotation marks.

showPolPaths :: BitVector -> StringSource

Render the list of polarity automaton paths as a string

automatonPaths :: (Ord st, Ord ab) => NFA st ab -> [[ab]]Source

finalSt :: NFA st ab -> [st]Source

data NFA st ab Source

Note: there are two ways to define the final states. 1. you may define them as a list of states in finalStList 2. you may define them via the isFinalSt function The state list is ignored if you define isFinalSt