- type Tags = Map String [TagElem]
- data TagElem = TE {}
- class TagItem t where
- data TagSite = TagSite {}
- type TagDerivation = [(Char, String, (String, String))]
- emptyTE :: TagElem
- ts_synIncomplete :: String
- ts_semIncomplete :: [Pred] -> String
- ts_tbUnificationFailure :: String
- ts_rootFeatureMismatch :: Flist -> String
- addToTags :: Tags -> String -> TagElem -> Tags
- tagLeaves :: TagElem -> [(String, UninflectedDisjunction)]
- setTidnums :: [TagElem] -> [TagElem]
- mapBySem :: TagItem t => [t] -> Map Pred [t]
- subsumedBy :: Sem -> Pred -> Bool
- showTagSites :: [TagSite] -> String
- collect :: Collectable a => a -> Set String -> Set String
- detectSites :: Tree GNode -> ([TagSite], [TagSite], [TagSite])
Documentation
type Tags = Map String [TagElem]Source
An anchored grammar. The grammar associates a set of semantic predicates to a list of trees each.
ts_semIncomplete :: [Pred] -> StringSource
addToTags :: Tags -> String -> TagElem -> TagsSource
addTags
tags key elem
adds elem
to the the list of elements associated
to the key
setTidnums :: [TagElem] -> [TagElem]Source
Assigns a unique id to each element of this list, that is, an integer between 1 and the size of the list.
mapBySem :: TagItem t => [t] -> Map Pred [t]Source
Sorts trees into a Map.Map organised by the first literal of their semantics. This is useful in at least three places: the polarity optimisation, the gui display code, and code for measuring the efficiency of GenI. Note: trees with a null semantics are filed under an empty predicate, if any.
subsumedBy :: Sem -> Pred -> BoolSource
subsumedBy
cs ts
determines if the candidate semantics cs
is
subsumed by the proposition semantics ts
. Notice how the proposition
semantics is only a single item where as the candidate semantics is a
list.
We assume
- most importantly that
cs
has already its semantics instatiated (all variables assigned) -
cs
andts
are sorted - the list in each element of cs and ts is itself sorted
showTagSites :: [TagSite] -> StringSource