DyAlog can compile Feature Tree Adjoining Grammars [FTAGs]. This extension is based on ftp://ftp.inria.fr/INRIA/Projects/Atoll/Eric.Clergerie/SD2SA.ps.gz. TAGs are compiled into (meta) transitions of a 2-stack automaton, which are then compiled into DyALog objects and application functions for a run-time tabular evaluation.
For instance, the following grammar defines the langage a^nb^nec^nd^n
tree s("e"). auxtree -s("a",s("b",*s,"c"),"d").
The first tree of this program is an initial tree reading the terminal "e" and allowing an adjonction on the node s.
The second tree is an auxiliary tree. Its foot node is the one marked by
*
and adjonction is not allowd on the node marked by -
.
Mandatory adjonction may be marked by prefixing a node by ++
.
TAG non terminals may be called from a Prolog program using predicate
tag_phrase/3
.
Nodes may be named and decorated with a pair of top
and
bot
attributes.
Following the XTAG architecture, trees may be named and grouped in set
of families. Each tree may have an anchor node, a distinguished node
marked <>
. Tree are related to lemma
The following is a fragment from a small french FTAG for verb
donne
(gives).
%% Specify wich parameter of trees in tn1pn2 may be instanciated %% with information from the lexicon :-tag_anchor{ name => tn1pn2, coanchors => [ p_2 ], equations => [ [A]^(top=np{ restr => A } at np_2), [B]^(top=np{ restr => B } at np_0) ] }. %% Define tree tn1pn2 in family tn1pn2 %% anchored on a verb tag_tree{ name => tn1pn2, family => tn1pn2, tree=> tree bot=s{mode => X2, inv => (-)} at s( id=np_0 and top=np{num => X0, pers => X1, wh => (-)} at np, top=vp{num => X0, pers => X1, mode => X2} and bot=vp{mode => X3, num => X6, pers => X7} at vp( bot=v{mode => X3, num => X6, pers => X7} at <> v, np, pp( id=p_2 at p, id=np_2 at np ) ) ) }. %% Define lemma entry in the lexicon for verb DONNER (to give) tag_lemma('*DONNER*',v, tag_anchor{ name=>tn1pn2, coanchors=>[p_2=à], equations=>[top = np{ restr=>plushum } at np_0, top = np{ restr=>plushum } at np_2]} ). %% Define morph entry in the lexicon for verb donne (gives) tag_lexicon(donne, '*DONNER*', v, v{ mode => mode[ind, subj], num => sing }).
Modulation may be applied on TAG non terminals.
Go to the first, previous, next, last section, table of contents.