A Tree Transducer Model for Synchronous Tree-Adjoining Grammars Andreas Maletti Universitat Rovira i Virgili Tarragona, Spain
[email protected] Uppsala, Sweden — July 13, 2010
A Tree Transducer Model for STAG
A. Maletti
·
1
Synchronous Tree Substitution Grammar S
A Tree Transducer Model for STAG
S
A. Maletti
·
2
Synchronous Tree Substitution Grammar S
S CONJ
S
wa
Used rule S S
—
CONJ
S
wa A Tree Transducer Model for STAG
A. Maletti
·
2
Synchronous Tree Substitution Grammar S NP
1
S CONJ
VP
V
NP
wa
2
S V
NP
1
NP
2
Used rule S NP
VP
S
— V
V
NP
NP
NP
A Tree Transducer Model for STAG
A. Maletti
·
2
Synchronous Tree Substitution Grammar S NP
1
S CONJ
VP V
NP
wa
2
S V
NP
1
NP
2
ra’aa
saw
Used rule V saw
A Tree Transducer Model for STAG
—
V ra’aa
A. Maletti
·
2
Synchronous Tree Substitution Grammar S
S
NP DT the
VP N
V
CONJ wa
NP
saw
S V
NP
ra’aa
N
NP
Used rule NP DT
N
—
NP N
the A Tree Transducer Model for STAG
A. Maletti
·
2
Synchronous Tree Substitution Grammar S
S
NP
VP
DT
N
V
the
boy
saw
CONJ wa
NP
S V
NP
ra’aa
N
NP
atefl
Used rule N boy
A Tree Transducer Model for STAG
—
N atefl
A. Maletti
·
2
Synchronous Tree Substitution Grammar S
S
NP
VP
DT
N
V
the
boy
saw
CONJ wa
NP N
DT the
S V
NP
NP
ra’aa
N
N
atefl
Used rule NP DT
N
—
NP N
the A Tree Transducer Model for STAG
A. Maletti
·
2
Synchronous Tree Substitution Grammar S
S
NP
VP
DT
N
V
the
boy
saw
CONJ wa
NP DT
N
the
door
S V
NP
NP
ra’aa
N
N
atefl
albab
Used rule N door
A Tree Transducer Model for STAG
—
N albab
A. Maletti
·
2
Synchronous Tree Substitution Grammar (cont’d) Advantages simple and natural model easy to train (from linguistic resources) symmetric
Implementation extended top-down tree transducer in T IBURON [M AY, K NIGHT ’06]
A Tree Transducer Model for STAG
A. Maletti
·
3
Synchronous Tree Substitution Grammar (cont’d) Synchronous tree substitution grammar rule: S NP
1
S VP
V
w
—
NP
V
NP
1
NP
2
2
Corresponding extended top-down tree transducer rule: qS S S x1
VP x2
w −→ qV
x3
A Tree Transducer Model for STAG
x2
qNP
qNP
x1
x3
A. Maletti
·
4
Synchronous Tree-Adjoining Grammar S
A Tree Transducer Model for STAG
S
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
S VP
NP
VP
Used substitution rule S NP
S
— VP
A Tree Transducer Model for STAG
NP
VP
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
1
V
S VP NP
NP 2
1
VP
V
NP
2
Used substitution rule VP V
NP
A Tree Transducer Model for STAG
VP
— V
NP
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
1
S NP
VP V
NP
2
1
VP V
likes
NP
2
aime
Used substitution rule V likes
A Tree Transducer Model for STAG
—
V aime
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
S VP
NP
VP
V
NP
V
likes
N
aime
NP DT
N
les
Used substitution rule NP NP
—
DT
N
N les A Tree Transducer Model for STAG
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
S VP
NP
V
NP
V
likes
N
aime
candies
VP NP DT
N
les
bonbons
Used substitution rule N candies
A Tree Transducer Model for STAG
—
N bonbons
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
S VP
NP
V
NP
V
likes
N
aime
ADJ
VP NP DT les
N candies
N N
ADJ
bonbons
Used adjunction rule N ADJ
N
— N?
A Tree Transducer Model for STAG
N?
ADJ
A. Maletti
·
5
Synchronous Tree-Adjoining Grammar S NP
S VP
NP
V
NP
V
likes
N
aime
VP NP DT les
ADJ
N
red
candies
N N
ADJ
bonbons
rouges
Used substitution rule ADJ red
A Tree Transducer Model for STAG
—
ADJ rouges
A. Maletti
·
5
Main Question Theorem Every STSG is an STAG.
Question Are they further related?
A Tree Transducer Model for STAG
A. Maletti
·
6
Roadmap 1
Motivation
2
Explicit Substitution
3
Synchronous Tree-Adjoining Grammar
4
Main Result
5
Application
A Tree Transducer Model for STAG
A. Maletti
·
7
First-Order Substitution Definition t[v1 ← t1 , . . . , vk ← tk ] denotes the result obtained by replacing (in parallel) all occurrences of leaves labelled vi in t by ti .
Example S S
NP
NP
VP V
NP
DT the
saw
NP N
DT the
VP N
V saw
NP DT
N
the t
u
A Tree Transducer Model for STAG
t[NP ← u]
A. Maletti
·
8
Second-Order Substitution Example ·[NP ← ·] S NP
NP VP
V
NP
DT
N
the
saw
Explicit substitution keep an explicit representation of substitutions in tree any number of substitutions allowed at any level
A Tree Transducer Model for STAG
A. Maletti
·
9
Second-Order Substitution Example ·[NP ← ·] S NP
NP VP
V
NP
DT
N
the
saw
Evaluation eval(·[x ← ·](t, u)) = eval(t)[x ← eval(u)] eval(σ(t1 , . . . , tk )) = σ(eval(t1 ), . . . , eval(tk ))
A Tree Transducer Model for STAG
A. Maletti
·
9
Second-Order Substitution Example
Evaluation ·[NP ← ·]
S NP
S NP
NP VP
V
NP
DT
N
the
DT the
VP N
NP
V saw
saw
DT
N
the
Evaluation eval(·[x ← ·](t, u)) = eval(t)[x ← eval(u)] eval(σ(t1 , . . . , tk )) = σ(eval(t1 ), . . . , eval(tk ))
A Tree Transducer Model for STAG
A. Maletti
·
9
Roadmap 1
Motivation
2
Explicit Substitution
3
Synchronous Tree-Adjoining Grammar
4
Main Result
5
Application
A Tree Transducer Model for STAG
A. Maletti
·
10
Tree-Adjoining Grammar Intuition A TAG has two types of rules: substitution rules (as in TSG) adjunction rules
Example (Adjunction) NP N
NP
DT DT
N
les
bonbons derived tree
N?
N
ADJ rouges
auxiliary tree
A Tree Transducer Model for STAG
les
N
ADJ
bonbons
rouges
adjunction A. Maletti
·
11
Tree-Adjoining Grammar (cont’d) Simplifications (see [S HIEBER ’06]) no substitution rules adjunction mandatory (if possible) each adjunction spot used at most once root nodes of auxiliary trees are never adjunction spots
Definition A TAG is a finite set of derived trees (initial trees) and auxiliary trees (those containing a starred node)
A Tree Transducer Model for STAG
A. Maletti
·
12
Tree-Adjoining Grammar (cont’d) Simplifications (see [S HIEBER ’06]) no substitution rules adjunction mandatory (if possible) each adjunction spot used at most once root nodes of auxiliary trees are never adjunction spots
Definition A TAG is a finite set of derived trees (initial trees) and auxiliary trees (those containing a starred node)
A Tree Transducer Model for STAG
A. Maletti
·
12
Tree-Adjoining Grammar (cont’d) Example
Derivation S
S a
T c
S
auxiliary tree
T
S S
a ⇒
b
S S
a
⇒
S
S
c
T
b
S
⇒
a
c
S?
S
S S
T
S S?
a
S
b S
c b
a
S a
S?
initial tree
S
S
b
S S
a
T c
b
auxiliary tree
auxiliary tree
A Tree Transducer Model for STAG
String language {wcw | w ∈ {a, b}∗ }
A. Maletti
·
13
Synchronous Tree-Adjoining Grammar Example S T
—
c
S
S
T
S
c
a
S?
S —
a
a
S S?
—
a
S?
auxiliary tree pair
initial tree pair
S
S
S
S
—
S
b
S
S? b
auxiliary tree pair A Tree Transducer Model for STAG
S?
b
S?
b
auxiliary tree pair A. Maletti
·
14
Synchronous Tree-Adjoining Grammar (cont’d) Example S S S T c
T c
a
S
S —
S
a
S
a
—
T
T
c
c
a
S S
S
S
b
S a
S
b
S
b
a
S
a
—
S b
S S
T
T
c
c
a
String translation {(wcw R , wcw) | w ∈ {a, b}∗ }
A Tree Transducer Model for STAG
A. Maletti
·
15
Roadmap 1
Motivation
2
Explicit Substitution
3
Synchronous Tree-Adjoining Grammar
4
Main Result
5
Application
A Tree Transducer Model for STAG
A. Maletti
·
16
Simulation
Question Can we simulate an STAG by some STSG?
A Tree Transducer Model for STAG
A. Maletti
·
17
Simulation of Adjunction Example (TAG)
Correspondence (TSG) S
S a
T c
S
S
a
S
a
T
auxiliary tree
c
S?
initial tree
S
·[S? ← ·]
·[S? ← ·] S
S S?
a
S S S b
b
·[S? ← ·]
S S? S?
S
S S?
S
b
auxiliary tree
auxiliary tree
A Tree Transducer Model for STAG
S?
b
A. Maletti
·
18
Simulation of Adjunction (cont’d) Example ·[S? ← ·] S
·[S? ← ·]
S T c ⇒
a
·[S? ← ·]
S
S
·[S? ← ·]
T
a
c ⇒
S
S
S S?
a
b
S
S
·[S? ← ·]
T
a
c ⇒
S
S
·[S? ← ·] S
S?
a
b
S
S
·[S? ← ·]
T
b
·[S? ← ·]
S?
c
S
S
S S?
A Tree Transducer Model for STAG
·[S? ← ·]
S?
a
S S?
b
A. Maletti
·
19
Simulation of Adjunction (cont’d) Evaluation
TSG result ·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S
S?
a
c
S
·[S? ← ·]
S?
·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S S?
c
S S?
S
a
S b
S?
b
Note coincides with the result obtained by TAG A Tree Transducer Model for STAG
A. Maletti
·
20
Simulation of Adjunction (cont’d) Evaluation
TSG result ·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S
S?
a
c
S
·[S? ← ·]
S?
·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S S?
·[S? ← ·]
c
S S?
S
S a
S b
S?
T
S b
S b
c
S
a
S b
S
S?
a
Note coincides with the result obtained by TAG A Tree Transducer Model for STAG
A. Maletti
·
20
Simulation of Adjunction (cont’d) Evaluation
TSG result ·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S
S?
a
c
S
·[S? ← ·]
S?
·[S? ← ·]
a
S
S
·[S? ← ·]
T
S b
S S?
·[S? ← ·]
c
S S?
S
S a
S b
S?
T
S b
S?
b
S b
a
S S
S S
b
a
c
S
a
S b
S
S
S
a
T c
Note coincides with the result obtained by TAG A Tree Transducer Model for STAG
A. Maletti
·
20
Main Result Theorem For every TAG G there exists a TSG G0 such that L(G) = {eval(t) | t ∈ L(G0 )}
A Tree Transducer Model for STAG
A. Maletti
·
21
Main Result Theorem For every TAG G there exists a TSG G0 such that L(G) = {eval(t) | t ∈ L(G0 )}
Theorem For every STAG G there exists a STSG G0 such that T (G) = {(eval(t), eval(u)) | (t, u) ∈ T (G0 )}
A Tree Transducer Model for STAG
A. Maletti
·
21
Main Result Theorem For every STAG G there exists a STSG G0 such that T (G) = {(eval(t), eval(u)) | (t, u) ∈ T (G0 )}
Proof. EMB
HOM
HOM
EMB
STSG eval
eval STAG
A Tree Transducer Model for STAG
A. Maletti
·
21
Main Result Theorem For every STAG G there exists a STSG G0 such that T (G) = {(eval(t), eval(u)) | (t, u) ∈ T (G0 )}
Proof. EMB
HOM
HOM
EMB
STSG eval
eval STAG
A Tree Transducer Model for STAG
A. Maletti
·
21
Main Result Theorem For every STAG G there exists a STSG G0 such that T (G) = {(eval(t), eval(u)) | (t, u) ∈ T (G0 )}
Proof. EMB
HOM
HOM
EMB
STSG eval
eval STAG
A Tree Transducer Model for STAG
A. Maletti
·
21
Main Result Theorem For every STAG G there exists a STSG G0 such that T (G) = {(eval(t), eval(u)) | (t, u) ∈ T (G0 )}
Proof. EMB
HOM
HOM
EMB
STSG eval
eval STAG
A Tree Transducer Model for STAG
A. Maletti
·
21
Roadmap 1
Motivation
2
Explicit Substitution
3
Synchronous Tree-Adjoining Grammar
4
Main Result
5
Application
A Tree Transducer Model for STAG
A. Maletti
·
22
Application Overview run an STAG in T IBURON (which can run STSGs) translate STSG algorithms to STAGs (factorization, etc.) integrate explicit substitution into semantics separate “context-free” and “context-sensitive” behavior
A Tree Transducer Model for STAG
A. Maletti
·
23
References A RNOLD, DAUCHET: Morphismes et bimorphismes d’arbres. Theoret. Comput. Sci. 20. 1982 C HIANG, K NIGHT: An introduction to synchronous grammars. Tutorial at ACL. 2006 E NGELFRIET, VOGLER: Macro tree transducers. J. Comput. Syst. Sci. 31. 1985 M AY, K NIGHT: T IBURON — a weighted tree automata toolkit. In CIAA, LNCS 4094. 2006 N EDERHOF: Weighted parsing of trees. In IWPT. 2009 S HIEBER, S CHABES: Synchronous tree-adjoining grammars. Computational Linguistics 3. 1990 S HIEBER: Unifying synchronous tree adjoining grammars and tree transducers via bimorphisms. In EACL. 2006
Thank you for your attention! A Tree Transducer Model for STAG
A. Maletti
·
24