Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PolarityDetectionResult
- = PD_UserError String
- | PD_Nothing
- | PD_Just [(PolarityKey, Interval)]
- | PD_Unconstrained (Text, Interval)
- detectRootCompensation :: Set PolarityAttr -> FeatStruct GeniVal -> PolMap
- detectPolsH :: Set PolarityAttr -> TagElem -> [(PolarityKey, Interval)]
- detectPolarity :: Int -> PolarityAttr -> FeatStruct GeniVal -> FeatStruct GeniVal -> PolarityDetectionResult
- toZero :: Int -> Interval
- substNodes :: TagElem -> [GNode GeniVal]
- substTops :: TagElem -> [Flist GeniVal]
- type SemMap = Map (Literal GeniVal) [TagElem]
- type PolMap = Map PolarityKey Interval
- polarityKeys :: [TagElem] -> PolMap -> [PolarityKey]
- convertUnconstrainedPolarities :: [PolarityKey] -> PolMap -> PolMap
- addPols :: [(PolarityKey, Interval)] -> PolMap -> PolMap
- nubAut :: Ord ab => NFA st ab -> NFA st ab
- __cat__ :: Text
- __idx__ :: Text
- pdResults :: [PolarityDetectionResult] -> [(PolarityKey, Interval)]
- pdToList :: (String -> String) -> PolarityDetectionResult -> [(PolarityKey, Interval)]
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.
detectPolsH :: Set PolarityAttr -> TagElem -> [(PolarityKey, Interval)] Source #
:: Int | polarity to assign |
-> PolarityAttr | attribute to look for |
-> FeatStruct GeniVal | feature structure to filter on ( |
-> FeatStruct GeniVal | feature structure to get value from |
-> PolarityDetectionResult |
polarityKeys :: [TagElem] -> PolMap -> [PolarityKey] Source #
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
:: (String -> String) | on error message |
-> PolarityDetectionResult | |
-> [(PolarityKey, Interval)] |
Note that this will crash if any of the entries are errors