- data GNode = GN {}
- data GType
- type NodeName = String
- data Ttree a = TT {}
- type MTtree = Ttree GNode
- type SemPols = [Int]
- data TestCase = TestCase {}
- data Ptype
- = Initial
- | Auxiliar
- | Unspecified
- type Pred = (GeniVal, GeniVal, [GeniVal])
- type Flist = [AvPair]
- type AvPair = (String, GeniVal)
- data GeniVal
- type Lexicon = Map String [ILexEntry]
- data ILexEntry = ILE {}
- type MorphLexEntry = (String, String, Flist)
- type Macros = [MTtree]
- type Sem = [Pred]
- type LitConstr = (Pred, [String])
- type SemInput = (Sem, Flist, [LitConstr])
- type Subst = Map String GeniVal
- emptyLE :: ILexEntry
- emptyGNode :: GNode
- emptyMacro :: MTtree
- gCategory :: Flist -> Maybe GeniVal
- showLexeme :: [String] -> String
- lexemeAttributes :: [String]
- gnnameIs :: NodeName -> GNode -> Bool
- plugTree :: Tree NodeName -> NodeName -> Tree NodeName -> Tree NodeName
- spliceTree :: NodeName -> Tree NodeName -> NodeName -> Tree NodeName -> Tree NodeName
- root :: Tree a -> a
- rootUpd :: Tree a -> a -> Tree a
- foot :: Tree GNode -> GNode
- setLexeme :: [String] -> Tree GNode -> Tree GNode
- setAnchor :: [String] -> Tree GNode -> Tree GNode
- toKeys :: Sem -> [String]
- subsumeSem :: Sem -> Sem -> [(Sem, Subst)]
- sortSem :: Sem -> Sem
- showSem :: Sem -> String
- showPred :: Pred -> String
- emptyPred :: Pred
- sortFlist :: Flist -> Flist
- unify :: Monad m => [GeniVal] -> [GeniVal] -> m ([GeniVal], Subst)
- unifyFeat :: Monad m => Flist -> Flist -> m (Flist, Subst)
- mergeSubst :: Subst -> Subst -> Subst
- showFlist :: Flist -> String
- showPairs :: Flist -> String
- showAv :: AvPair -> String
- class Replacable a where
- replace :: Subst -> a -> a
- replaceMap :: Map String GeniVal -> a -> a
- replaceOne :: (String, GeniVal) -> a -> a
- replaceList :: [(String, GeniVal)] -> a -> a
- replaceOneAsMap :: Replacable a => (String, GeniVal) -> a -> a
- class Collectable a where
- class Idable a where
- alphaConvert :: (Collectable a, Replacable a) => String -> a -> a
- alphaConvertById :: (Collectable a, Replacable a, Idable a) => a -> a
- fromGConst :: GeniVal -> [String]
- fromGVar :: GeniVal -> String
- isConst :: GeniVal -> Bool
- isVar :: GeniVal -> Bool
- isAnon :: GeniVal -> Bool
- prop_unify_anon :: [GeniVal] -> Bool
- prop_unify_self :: [GeniVal] -> Property
- prop_unify_sym :: [GeniVal] -> [GeniVal] -> Property
Documentation
Typeable1 Ttree | |
Data a => Data (Ttree a) | |
Show a => Show (Ttree a) | |
Binary a => Binary (Ttree a) | |
Replacable a => Replacable (Ttree a) | |
Collectable a => Collectable (Ttree a) | |
GeniShow a => GeniShow (Ttree a) |
type MorphLexEntry = (String, String, Flist)Source
A null GNode
which you can use for various debugging or display purposes.
A null tree which you can use for various debugging or display purposes.
showLexeme :: [String] -> StringSource
lexemeAttributes :: [String]Source
Attributes recognised as lexemes, in order of preference
plugTree :: Tree NodeName -> NodeName -> Tree NodeName -> Tree NodeNameSource
Plug the first tree into the second tree at the specified node. Anything below the second node is silently discarded. We assume the trees are pluggable; it is treated as a bug if they are not!
:: NodeName | foot node of the aux tree |
-> Tree NodeName | aux tree |
-> NodeName | place to adjoin in target tree |
-> Tree NodeName | target tree |
-> Tree NodeName |
Given two trees auxt
and t
, splice the tree auxt
into
t
via the TAG adjunction rule.
setLexeme :: [String] -> Tree GNode -> Tree GNodeSource
Given a lexical item l
and a tree node n
(actually a subtree
with no children), return the same node with the lexical item as
its unique child. The idea is that it converts terminal lexeme nodes
into preterminal nodes where the actual terminal is the given lexical
item
setAnchor :: [String] -> Tree GNode -> Tree GNodeSource
Given a lexical item s
and a Tree GNode t, returns the tree t'
where l has been assigned to the anchor node in t'
toKeys :: Sem -> [String]Source
Given a Semantics, return the string with the proper keys (propsymbol+arity) to access the agenda
Sort semantics first according to its predicate, and then to its handles.
mergeSubst :: Subst -> Subst -> SubstSource
Note that the first Subst is assumed to come chronologically
before the second one; so merging { X -> Y }
and { Y -> 3 }
should give us { X -> 3; Y -> 3 }
;
See prependToSubst
for a warning!
class Replacable a whereSource
replace :: Subst -> a -> aSource
replaceMap :: Map String GeniVal -> a -> aSource
replaceOne :: (String, GeniVal) -> a -> aSource
replaceList :: [(String, GeniVal)] -> a -> aSource
Here it is safe to say (X -> Y; Y -> Z) because this would be crushed down into a final value of (X -> Z; Y -> Z)
Replacable Pred | |
Replacable GeniVal | |
Replacable AvPair | |
Replacable GNode | |
Replacable ILexEntry | |
Replacable TagElem | |
Replacable TagSite | |
Replacable SimpleItem | |
Replacable a => Replacable [a] | |
Replacable a => Replacable (Maybe a) | |
Replacable a => Replacable (Tree a) | |
Replacable a => Replacable (Ttree a) | |
Replacable (String, ([String], Flist)) |
replaceOneAsMap :: Replacable a => (String, GeniVal) -> a -> aSource
Default implementation for replaceOne but not a good idea for the core stuff; which is why it is not a typeclass default
class Collectable a whereSource
Collectable GeniVal | |
Collectable GNode | |
Collectable ILexEntry | |
Collectable TagElem | |
Collectable a => Collectable [a] | |
Collectable a => Collectable (Maybe a) | |
Collectable a => Collectable (Tree a) | |
Collectable a => Collectable (Ttree a) | |
Collectable (String, GeniVal) | |
(Collectable a, Collectable b, Collectable c) => Collectable (a, b, c) |
alphaConvert :: (Collectable a, Replacable a) => String -> a -> aSource
alphaConvertById :: (Collectable a, Replacable a, Idable a) => a -> aSource
fromGConst :: GeniVal -> [String]Source
(assumes that it's a GConst!)
prop_unify_anon :: [GeniVal] -> BoolSource
prop_unify_self :: [GeniVal] -> PropertySource
prop_unify_sym :: [GeniVal] -> [GeniVal] -> PropertySource