- type PolAut = NFA PolState PolTrans
- data PolState = PolSt Int [Pred] [(Int, Int)]
- type AutDebug = (String, PolAut, PolAut)
- type PolResult = ([AutDebug], PolAut, PolAut, Sem)
- buildAutomaton :: SemInput -> [TagElem] -> Flist -> PolMap -> PolResult
- makePolAut :: [TagElem] -> Sem -> PolMap -> PolResult
- fixPronouns :: (Sem, [TagElem]) -> (Sem, [TagElem])
- detectSansIdx :: [TagElem] -> [TagElem]
- detectPolFeatures :: [TagElem] -> [String]
- detectPols :: [TagElem] -> [TagElem]
- detectPolPaths :: [[TagElem]] -> [(TagElem, BitVector)]
- declareIdxConstraints :: Flist -> PolMap
- detectIdxConstraints :: Flist -> Flist -> PolMap
- showLite :: ShowLite a => a -> String
- showLitePm :: PolMap -> String
- showPolPaths :: BitVector -> String
- showPolPaths' :: BitVector -> Int -> [Int]
- automatonPaths :: (Ord st, Ord ab) => NFA st ab -> [[ab]]
- finalSt :: NFA st ab -> [st]
- data NFA st ab
Entry point
type PolResult = ([AutDebug], PolAut, PolAut, Sem)Source
intermediate auts, seed aut, final aut, potentially modified sem
buildAutomaton :: SemInput -> [TagElem] -> Flist -> PolMap -> PolResultSource
Constructs a polarity automaton from the surface realiser's input: input semantics, lexical selection, extra polarities and index constraints. For debugging purposes, it returns all the intermediate automata produced by the construction algorithm.
Inner stuff (exported for debugging?)
makePolAut :: [TagElem] -> Sem -> PolMap -> PolResultSource
fixPronouns :: (Sem, [TagElem]) -> (Sem, [TagElem])Source
Returns a modified input semantics and lexical selection in which pronouns are properly accounted for.
detectSansIdx :: [TagElem] -> [TagElem]Source
detectPolFeatures :: [TagElem] -> [String]Source
detectPols :: [TagElem] -> [TagElem]Source
detectPolPaths :: [[TagElem]] -> [(TagElem, BitVector)]Source
Given a list of paths (i.e. a list of list of trees) return a list of trees such that each tree is annotated with the paths it belongs to.
declareIdxConstraints :: Flist -> PolMapSource
detectIdxConstraints :: Flist -> Flist -> PolMapSource
showLitePm :: PolMap -> StringSource
Display a PolMap in human-friendly text. The advantage is that it displays fewer quotation marks.
showPolPaths :: BitVector -> StringSource
Render the list of polarity automaton paths as a string
showPolPaths' :: BitVector -> Int -> [Int]Source
automatonPaths :: (Ord st, Ord ab) => NFA st ab -> [[ab]]Source