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

Safe HaskellNone
LanguageHaskell2010

NLP.GenI.Polarity.Internal

Synopsis

Documentation

detectRootCompensation :: Set PolarityAttr -> FeatStruct GeniVal -> PolMap Source #

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.

detectPolarity Source #

Arguments

:: 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 -> PolMap Source #

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

nubAut :: Ord ab => NFA st ab -> NFA st ab Source #

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

pdToList Source #

Arguments

:: (String -> String)

on error message

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

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