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




data Builder st it pa Source




init :: Input -> pa -> (st, Statistics)
step :: BuilderState st ()
stepAll :: BuilderState st ()
finished :: st -> Bool
unpack :: st -> [Output]
partial :: st -> [Output]

data Input Source




inSemInput :: SemInput
inLex :: [ILexEntry]

for the debugger

inCands :: [(TagElem, BitVector)]

tag tree

unlessEmptySem :: Input -> Params -> a -> aSource

Equivalent to id unless the input contains an empty or uninstatiated semantics

run :: Builder st it Params -> Input -> Params -> (st, Statistics)Source

Performs surface realisation from an input semantics and a lexical selection.

defineSemanticBits :: Sem -> SemBitMapSource

assign a bit vector value to each literal in the semantics the resulting map can then be used to construct a bit vector representation of the semantics

dependentSem :: IafMap -> String -> SemSource

Return the literals of the semantics (in bit vector form) whose accesibility depends on the given index

literalArgs :: Pred -> [GeniVal]Source

Return the handle and arguments of a literal

fromUniConst :: Monad m => GeniVal -> m StringSource

Like fromGConst but only for the non-disjoint ones: meant to be used as Maybe or List

recalculateAccesibility :: IafAble a => a -> aSource

Calculate the new set of accessibility/inaccesible indices, returning a a tuple of accesible / inaccesible indices



:: IafAble a 
=> IafMap 
-> SemBitMap 
-> BitVector

the input semantics

-> (a -> BitVector)

the semantics of the item

-> a 
-> BitVector 

Return, in bitvector form, the portion of a semantics that is inaccesible from an item

class IafAble a whereSource


iafAcc :: a -> [String]Source

iafInacc :: a -> [String]Source

iafSetAcc :: [String] -> a -> aSource

iafSetInacc :: [String] -> a -> aSource

iafNewAcc :: a -> [String]Source

defaultStepAll :: Builder st it pa -> BuilderState st ()Source

Default implementation for the stepAll function in Builder

type DispatchFilter s a = a -> s (Maybe a)Source

(>-->) :: Monad s => DispatchFilter s a -> DispatchFilter s a -> DispatchFilter s aSource

Sequence two dispatch filters.

nullFilter :: Monad s => DispatchFilter s aSource

A filter that always fails (i.e. no filtering)

condFilter :: Monad s => (a -> Bool) -> DispatchFilter s a -> DispatchFilter s a -> DispatchFilter s aSource

If the item meets some condition, use the first filter, otherwise use the second one.