- data Builder st it pa = Builder {
- init :: Input -> pa -> (st, Statistics)
- step :: BuilderState st ()
- stepAll :: BuilderState st ()
- finished :: st -> Bool
- unpack :: st -> [Output]
- partial :: st -> [Output]
- type Output = (UninflectedSentence, Derivation)
- type Derivation = TagDerivation
- data Input = Input {}
- type UninflectedWord = (String, Flist)
- type UninflectedSentence = [UninflectedWord]
- type UninflectedDisjunction = ([String], Flist)
- type SentenceAut = NFA Int UninflectedWord
- type BuilderState s a = StateT s (State Statistics) a
- preInit :: Input -> Params -> (Input, (Int, Int, Int), PolResult)
- unlessEmptySem :: Input -> Params -> a -> a
- run :: Builder st it Params -> Input -> Params -> (st, Statistics)
- type SemBitMap = Map Pred BitVector
- defineSemanticBits :: Sem -> SemBitMap
- semToBitVector :: SemBitMap -> Sem -> BitVector
- bitVectorToSem :: SemBitMap -> BitVector -> Sem
- type IafMap = Map String Sem
- dependentSem :: IafMap -> String -> Sem
- literalArgs :: Pred -> [GeniVal]
- semToIafMap :: Sem -> IafMap
- fromUniConst :: Monad m => GeniVal -> m String
- getIdx :: Flist -> [GeniVal]
- ts_iafFailure :: [String] -> [Pred] -> String
- recalculateAccesibility :: IafAble a => a -> a
- iafBadSem :: IafAble a => IafMap -> SemBitMap -> BitVector -> (a -> BitVector) -> a -> BitVector
- class IafAble a where
- defaultStepAll :: Builder st it pa -> BuilderState st ()
- type DispatchFilter s a = a -> s (Maybe a)
- (>-->) :: Monad s => DispatchFilter s a -> DispatchFilter s a -> DispatchFilter s a
- nullFilter :: Monad s => DispatchFilter s a
- condFilter :: Monad s => (a -> Bool) -> DispatchFilter s a -> DispatchFilter s a -> DispatchFilter s a
- addCounters :: Statistics -> Statistics -> Statistics
- modifyStats :: (Metric -> Metric) -> BuilderState st ()
- incrCounter :: String -> Int -> BuilderState st ()
- queryCounter :: String -> Statistics -> Maybe Int
- initStats :: Params -> Statistics
- namedMetric :: String -> Metric
- defaultMetricNames :: [String]
- chart_size :: String
- num_comparisons :: String
- num_iterations :: String
- nullBuilder :: Builder () (NullState ()) Params
- type NullState a = BuilderState () a
- initNullBuilder :: Input -> Params -> ((), Statistics)
Documentation
type Output = (UninflectedSentence, Derivation)Source
type Derivation = TagDerivationSource
type UninflectedWord = (String, Flist)Source
type UninflectedSentence = [UninflectedWord]Source
type UninflectedDisjunction = ([String], Flist)Source
type SentenceAut = NFA Int UninflectedWordSource
type BuilderState s a = StateT s (State Statistics) aSource
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
semToBitVector :: SemBitMap -> Sem -> BitVectorSource
bitVectorToSem :: SemBitMap -> BitVector -> SemSource
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
semToIafMap :: Sem -> IafMapSource
fromUniConst :: Monad m => GeniVal -> m StringSource
Like fromGConst
but only for the non-disjoint ones: meant to be used as Maybe or List
ts_iafFailure :: [String] -> [Pred] -> StringSource
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
defaultStepAll :: Builder st it pa -> BuilderState st ()Source
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.
addCounters :: Statistics -> Statistics -> StatisticsSource
modifyStats :: (Metric -> Metric) -> BuilderState st ()Source
incrCounter :: String -> Int -> BuilderState st ()Source
queryCounter :: String -> Statistics -> Maybe IntSource
initStats :: Params -> StatisticsSource
namedMetric :: String -> MetricSource
type NullState a = BuilderState () aSource
initNullBuilder :: Input -> Params -> ((), Statistics)Source