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

Safe HaskellNone




detectRootCompensation :: Set PolarityAttr -> FeatStruct GeniVal -> PolMapSource

Given a description of what the root feature should unify with return a -1 polarity for all relevant polarity keys. This allows us to compensate for the root node of any derived tree.



:: Int

polarity to assign

-> PolarityAttr

attribute to look for

-> FeatStruct GeniVal

feature structure to filter on (RestrictedPolarityAttr only)

-> FeatStruct GeniVal

feature structure to get value from

-> PolarityDetectionResult 

convertUnconstrainedPolarities :: [PolarityKey] -> PolMap -> PolMapSource

Convert any unconstrained polarities in a PolMap to constrained ones, assuming a global list of known constrained keys.

nubAut :: (Ord ab, Ord st) => NFA st ab -> NFA st abSource

Ensures that all states and transitions in the polarity automaton are unique. This is a slight optimisation so that we don't have to repeatedly check the automaton for state uniqueness during its construction, but it is essential that this check be done after construction

pdResults :: [PolarityDetectionResult] -> [(PolarityKey, Interval)]Source

Note that this will crash if any of the entries are errors



:: (String -> String)

on error message

-> PolarityDetectionResult 
-> [(PolarityKey, Interval)] 

Note that this will crash if any of the entries are errors