Safe Haskell | None |
---|
This module provides basic datatypes specific to Tree Adjoining Grammar tree schemata.
- type Macros = [SchemaTree]
- type SchemaTree = Ttree SchemaNode
- type SchemaNode = GNode [GeniVal]
- data Ttree a = TT {}
- data Ptype
- root :: Tree a -> a
- rootUpd :: Tree a -> a -> Tree a
- foot :: Tree (GNode a) -> GNode a
- setLexeme :: [Text] -> Tree (GNode a) -> Tree (GNode a)
- setAnchor :: FullList Text -> Tree (GNode a) -> Tree (GNode a)
- lexemeAttributes :: [Text]
- crushTreeGNode :: Tree (GNode [GeniVal]) -> Maybe (Tree (GNode GeniVal))
- data GNode gv = GN {}
- gnnameIs :: NodeName -> GNode gv -> Bool
- type NodeName = Text
- data GType
- gCategory :: Flist GeniVal -> Maybe GeniVal
- showLexeme :: [Text] -> Text
- crushGNode :: GNode [GeniVal] -> Maybe (GNode GeniVal)
Documentation
type Macros = [SchemaTree]Source
type SchemaTree = Ttree SchemaNodeSource
type SchemaNode = GNode [GeniVal]Source
setLexeme :: [Text] -> Tree (GNode a) -> Tree (GNode a)Source
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 :: FullList Text -> Tree (GNode a) -> Tree (GNode a)Source
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'
lexemeAttributes :: [Text]Source
Attributes recognised as lexemes, in order of preference
A single node of a TAG tree.
Typeable1 GNode | |
Loadable Macros | |
Eq gv => Eq (GNode gv) | |
Data gv => Data (GNode gv) | |
Binary gv => Binary (GNode gv) | |
NFData gv => NFData (GNode gv) | A single node of a TAG tree. |
Pretty (GNode GeniVal) | The default show for GNode tries to be very compact; it only shows the value for cat attribute and any flags which are marked on that node. This is one the places where the pretty representation of a GenI object is different from its GenI-format one |
GeniShow (GNode GeniVal) | |
DescendGeniVal v => DescendGeniVal (GNode v) | |
Collectable gv => Collectable (GNode gv) |
gCategory :: Flist GeniVal -> Maybe GeniValSource
Return the value of the cat attribute, if available
showLexeme :: [Text] -> TextSource