Input Products for Weighted Extended Top-down Tree Transducers - - PowerPoint PPT Presentation

input products for weighted extended top down tree
SMART_READER_LITE
LIVE PREVIEW

Input Products for Weighted Extended Top-down Tree Transducers - - PowerPoint PPT Presentation

Input Products for Weighted Extended Top-down Tree Transducers Andreas Maletti Universitat Rovira i Virgili Tarragona, Spain andreas.maletti@urv.cat London, ON August 17, 2010 Input Products for WXTT A. Maletti 1 Machine


slide-1
SLIDE 1

Input Products for Weighted Extended Top-down Tree Transducers

Andreas Maletti

Universitat Rovira i Virgili Tarragona, Spain andreas.maletti@urv.cat

London, ON — August 17, 2010

Input Products for WXTT

  • A. Maletti

· 1

slide-2
SLIDE 2

Machine translation

Schema

Input − → Machine translation system − → Output

Question

How does the system handle input sentences containing “system”?

Some answer

take regular language L = ∗ system ∗ turn into a regular tree language use forward application

Input Products for WXTT

  • A. Maletti

· 2

slide-3
SLIDE 3

Machine translation

Schema

Input − → WXTT − → Output

Question

How does the system handle input sentences containing “system”?

Some answer

take regular language L = ∗ system ∗ turn into a regular tree language use forward application

Input Products for WXTT

  • A. Maletti

· 2

slide-4
SLIDE 4

Machine translation

Schema

Input − → WXTT − → Output

Question

How does the system handle input sentences containing “system”?

Some answer

take regular language L = ∗ system ∗ turn into a regular tree language use forward application

Input Products for WXTT

  • A. Maletti

· 2

slide-5
SLIDE 5

Machine translation

Schema

Input − → WXTT − → Output

Question

How does the system handle input sentences containing “system”?

Some answer

take regular language L = ∗ system ∗ turn into a regular tree language use forward application

Input Products for WXTT

  • A. Maletti

· 2

slide-6
SLIDE 6

Machine translation (cont’d)

Question

How does the system handle input sentences containing “system”?

Forward application

Problem: we obtain only output trees ⇒ not informative enough

Another answer

regular language, regular tree language as before input product restricts input to regular tree language ⇒ retains full translation information

Input Products for WXTT

  • A. Maletti

· 3

slide-7
SLIDE 7

Machine translation (cont’d)

Question

How does the system handle input sentences containing “system”?

Forward application

Problem: we obtain only output trees ⇒ not informative enough

Another answer

regular language, regular tree language as before input product restricts input to regular tree language ⇒ retains full translation information

Input Products for WXTT

  • A. Maletti

· 3

slide-8
SLIDE 8

Input product

Applications

parsing (one-sided, both-sided) translation forward application (input product + domain projection) regular look-ahead computation of interesting parameters (inside/outside weights)

Input Products for WXTT

  • A. Maletti

· 4

slide-9
SLIDE 9

Input product

Applications

parsing (one-sided, both-sided) translation forward application (input product + domain projection) regular look-ahead computation of interesting parameters (inside/outside weights)

Input Products for WXTT

  • A. Maletti

· 4

slide-10
SLIDE 10

Input product

Applications

parsing (one-sided, both-sided) translation forward application (input product + domain projection) regular look-ahead computation of interesting parameters (inside/outside weights)

Input Products for WXTT

  • A. Maletti

· 4

slide-11
SLIDE 11

Contents

1

Motivation

2

Weighted Tree Automaton

3

Weighted Extended Top-down Tree Transducer

4

Input Product

Input Products for WXTT

  • A. Maletti

· 5

slide-12
SLIDE 12

Weight structure

Definition

Commutative semiring (C, +, ·, 0, 1) if (C, +, 0) and (C, ·, 1) commutative monoids · distributes over finite (incl. empty) sums Idempotent if c + c = c

Example

BOOLEAN semiring ({0, 1}, max, min, 0, 1) (idempotent) Semiring (N, +, ·, 0, 1) of natural numbers Tropical semiring (N ∪ {∞}, min, +, ∞, 0) (idempotent) Any field, ring, etc.

Input Products for WXTT

  • A. Maletti

· 6

slide-13
SLIDE 13

Weight structure

Definition

Commutative semiring (C, +, ·, 0, 1) if (C, +, 0) and (C, ·, 1) commutative monoids · distributes over finite (incl. empty) sums Idempotent if c + c = c

Example

BOOLEAN semiring ({0, 1}, max, min, 0, 1) (idempotent) Semiring (N, +, ·, 0, 1) of natural numbers Tropical semiring (N ∪ {∞}, min, +, ∞, 0) (idempotent) Any field, ring, etc.

Input Products for WXTT

  • A. Maletti

· 6

slide-14
SLIDE 14

Weighted tree automaton

Definition (BERSTEL, REUTENAUER 1982)

Weighted tree automaton (WTA) A = (Q, Σ, I, δ) with rules σ c

q

·q1 . . . ·qk q, q1, . . . , qk ∈ Q are states c ∈ C is a weight σ ∈ Σk is a k-ary input symbol

Input Products for WXTT

  • A. Maletti

· 7

slide-15
SLIDE 15

Run

S NP JJ Colorless NNS ideas VP VBP sleep ADVP RB furiously

Input Products for WXTT

  • A. Maletti

· 8

slide-16
SLIDE 16

Run

Sq NPq′ JJq′ Colorlessw NNSq′′ ideasw VPq1 VBPq′

1

sleepw ADVPq2 RBq2 furiouslyw

Input Products for WXTT

  • A. Maletti

· 8

slide-17
SLIDE 17

Run

S.4

q

NP.2

q′

JJ.3

q′

Colorless.1

w

NNS.3

q′′

ideas.1

w

VP.4

q1

VBP.2

q′

1

sleep.1

w

ADVP.3

q2

RB.2

q2

furiously.1

w

Definition

Weight wt(r) of a run r = product of its weights

Input Products for WXTT

  • A. Maletti

· 8

slide-18
SLIDE 18

Run

S.4

q

NP.2

q′

JJ.3

q′

Colorless.1

w

NNS.3

q′′

ideas.1

w

VP.4

q1

VBP.2

q′

1

sleep.1

w

ADVP.3

q2

RB.2

q2

furiously.1

w

Example (Weight of the run)

wt(r) = 0.4 · 0.2 · 0.3 · 0.1 · 0.3 · 0.1 · 0.4 · 0.2 · 0.1 · 0.3 · 0.2 · 0.1

Input Products for WXTT

  • A. Maletti

· 8

slide-19
SLIDE 19

Semantics

Definition

The weight A(t) of input tree t = sum of weights of all runs ending in initial state A(t) =

  • r run on t

root(r)∈I

wt(r)

Note

Weighted tree language regular if computable by WTA

Input Products for WXTT

  • A. Maletti

· 9

slide-20
SLIDE 20

Semantics

Definition

The weight A(t) of input tree t = sum of weights of all runs ending in initial state A(t) =

  • r run on t

root(r)∈I

wt(r)

Note

Weighted tree language regular if computable by WTA

Input Products for WXTT

  • A. Maletti

· 9

slide-21
SLIDE 21

Contents

1

Motivation

2

Weighted Tree Automaton

3

Weighted Extended Top-down Tree Transducer

4

Input Product

Input Products for WXTT

  • A. Maletti

· 10

slide-22
SLIDE 22

Syntax

Definition (ARNOLD, DAUCHET 1976, GRAEHL, KNIGHT 2004)

Weighted extended top-down tree transducer (WXTT) M = (Q, Σ, ∆, I, R) with finitely many rules

q Σ x1 . . . xk

c

→ ∆ q′(xi) . . . p(xj)

q, q′, p ∈ Q are states i, j ∈ {1, . . . , k}

Input Products for WXTT

  • A. Maletti

· 11

slide-23
SLIDE 23

Syntax (cont’d)

Definition (ROUNDS 1970, THATCHER 1970)

Weighted top-down tree transducer (WTT) if all rules

q σ x1 . . . xk

c

→ ∆ q′(xi) . . . p(xj)

Input Products for WXTT

  • A. Maletti

· 12

slide-24
SLIDE 24

Semantics

Example

States {qS, qV, qNP} of which only qS is initial qS S x1 x2

0.4

→ S′ qV x2 qNP x1 qNP x2 qV VP x1 x2

1

→ qV x1 qNP VP x1 x2

1

→ qNP x2

Derivation

qS S t1 VP t2 t3

0.4

⇒ S′ qV VP t2 t3 qNP t1 qNP VP t2 t3

1

⇒ S′ qV t2 qNP t1 qNP VP t2 t3

1

⇒ S′ qV t2 qNP t1 qNP t3

Input Products for WXTT

  • A. Maletti

· 13

slide-25
SLIDE 25

Semantics (cont’d)

Definition

Computed transformation (t ∈ TΣ and u ∈ T∆): M(t, u) =

  • q∈I

q(t)

c1

⇒···

cn

⇒u left-most derivation

c1 · . . . · cn

Input Products for WXTT

  • A. Maletti

· 14

slide-26
SLIDE 26

Contents

1

Motivation

2

Weighted Tree Automaton

3

Weighted Extended Top-down Tree Transducer

4

Input Product

Input Products for WXTT

  • A. Maletti

· 15

slide-27
SLIDE 27

Input product

Definition

Given WTA A and WTT M, their input product is WTT N with N(t, u) = M(t, u) · A(t)

Notes

Input product . . . is special composition is like regular look-ahead can be used for parsing can be used for preservation of regularity

Input Products for WXTT

  • A. Maletti

· 16

slide-28
SLIDE 28

Input product

Definition

Given WTA A and WTT M, their input product is WTT N with N(t, u) = M(t, u) · A(t)

Notes

Input product . . . is special composition is like regular look-ahead can be used for parsing can be used for preservation of regularity

Input Products for WXTT

  • A. Maletti

· 16

slide-29
SLIDE 29

Nondeletion

Example

qS S x1 x2

0.4

→ S′ qV x2 qNP x1 qNP x2 qV VP x1 x2

1

→ qV x1 qNP VP x1 x2

1

→ qNP x2 nondeleting linear linear

Definition

WTT M is nondeleting if var(l) = var(r) for all rules l → r linear if no variable appears twice in r for all rules l → r

Input Products for WXTT

  • A. Maletti

· 17

slide-30
SLIDE 30

Nondeletion

Example

qS S x1 x2

0.4

→ S′ qV x2 qNP x1 qNP x2 qV VP x1 x2

1

→ qV x1 qNP VP x1 x2

1

→ qNP x2 nondeleting deletes x2 deletes x1

Definition

all-copies nondeleting = nondeleting = every copy of an input subtree is fully explored some-copy nondeleting = one copy of each input subtree is fully explored

Input Products for WXTT

  • A. Maletti

· 17

slide-31
SLIDE 31

Nondeletion (cont’d)

Example

qS S x1 x2

0.4

→ S′ qV x2 qNP x1 qNP x2 qV VP x1 x2

1

→ qV x1 qNP VP x1 x2

1

→ qNP x2

is not some-copy nondeleting

Input Products for WXTT

  • A. Maletti

· 18

slide-32
SLIDE 32

Nondeletion (cont’d)

Example

qS S x1 x2

0.4

→ S′ qV x2 qNP x1 qNP x2 qV VP x1 x2

1

→ qV x1 qNP VP x1 x2

1

→ VP qNP x2 qV x1

can be some-copy nondeleting

Input Products for WXTT

  • A. Maletti

· 18

slide-33
SLIDE 33

Scenario 1

Theorem (ENGELFRIET 1977)

For nondeleting WTT and WTA we can construct their input product.

Proof.

qS Sc

p

x1 p1 x2 p2

0.4

→ S′ qV x2 qNP x1 qNP x2

  • riginal rules

qS, p S x1 x2 → S′ qV, p2 x2 qNP, p1 x1 qNP x2

0.4 c

constructed rule

for original nondeleting rules construct new rules mark one state for each variable; one possibility x2a x1b x2d → x2 e

a

x1 f

b

x2d

Input Products for WXTT

  • A. Maletti

· 19

slide-34
SLIDE 34

Scenario 1

Theorem (ENGELFRIET 1977)

For nondeleting WTT and WTA we can construct their input product.

Proof.

qS Sc

p

x1 p1 x2 p2

0.4

→ S′ qV x2 qNP x1 qNP x2

  • riginal rules

qS, p S x1 x2 → S′ qV, p2 x2 qNP, p1 x1 qNP x2

0.4 c

constructed rule

for original nondeleting rules construct new rules mark one state for each variable; one possibility x2a x1b x2d → x2 e

a

x1 f

b

x2d

Input Products for WXTT

  • A. Maletti

· 19

slide-35
SLIDE 35

Scenario 2

Theorem

For some-copy nondeleting WXTT and WTA over idempotent semiring we can construct their input product.

Proof.

for original nondeleting rules construct new rules mark one state for each variable; all possibilities x2a x1b x2d → x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

at least one exploration will succeed (somy-copy nondeletion) aebfd + abfde = abdef if several succeed (idempotency)

Input Products for WXTT

  • A. Maletti

· 20

slide-36
SLIDE 36

Scenario 2

Theorem

For some-copy nondeleting WXTT and WTA over idempotent semiring we can construct their input product.

Proof.

for original nondeleting rules construct new rules mark one state for each variable; all possibilities x2a x1b x2d → x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

at least one exploration will succeed (somy-copy nondeletion) aebfd + abfde = abdef if several succeed (idempotency)

Input Products for WXTT

  • A. Maletti

· 20

slide-37
SLIDE 37

Scenario 2

Theorem

For some-copy nondeleting WXTT and WTA over idempotent semiring we can construct their input product.

Proof.

for original nondeleting rules construct new rules mark one state for each variable; all possibilities x2a x1b x2d → x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

at least one exploration will succeed (somy-copy nondeletion) aebfd + abfde = abdef if several succeed (idempotency)

Input Products for WXTT

  • A. Maletti

· 20

slide-38
SLIDE 38

Scenario 3

Theorem

For some-copy nondeleting WXTT and WTA over ring we can construct their input product.

Proof.

for original nondeleting rules construct several new rules mark states according to elimination scheme x2a x1b x2d → x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

| x2

e a

x1

f b

x2

−1 d

at least one exploration will succeed

Input Products for WXTT

  • A. Maletti

· 21

slide-39
SLIDE 39

Scenario 3

Theorem

For some-copy nondeleting WXTT and WTA over ring we can construct their input product.

Proof.

for original nondeleting rules construct several new rules mark states according to elimination scheme x2a x1b x2d → x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

| x2

e a

x1

f b

x2

−1 d

at least one exploration will succeed

Input Products for WXTT

  • A. Maletti

· 21

slide-40
SLIDE 40

Scenario 3

Theorem

For some-copy nondeleting WXTT and WTA over ring we can construct their input product.

Proof.

if several succeed, then x2

e a

x1

f b

x2d | x2a x1

f b

x2

e d

| x2

e a

x1

f b

x2

−1 d

aebfd abfde aebfd abfde −aebfd

Input Products for WXTT

  • A. Maletti

· 21

slide-41
SLIDE 41

Elimination schemes

Question

Do elimination schemes exist?

Answer

001 010 100 011 101 110 111

  • +

+ + − − − + 001 a a 010 a a 100 a a 011 a a −a a 101 a a −a a 110 a a −a a 111 a a a −a −a −a a a

Input Products for WXTT

  • A. Maletti

· 22

slide-42
SLIDE 42

Elimination schemes

Question

Do elimination schemes exist?

Answer

001 010 100 011 101 110 111

  • +

+ + − − − + 001 a a 010 a a 100 a a 011 a a −a a 101 a a −a a 110 a a −a a 111 a a a −a −a −a a a

Input Products for WXTT

  • A. Maletti

· 22

slide-43
SLIDE 43

Elimination schemes

Question

Do elimination schemes exist?

Answer

001 010 100 011 101 110 111

  • +

+ + − − − + 001 a a 010 a a 100 a a 011 a a −a a 101 a a −a a 110 a a −a a 111 a a a −a −a −a a a

Input Products for WXTT

  • A. Maletti

· 22

slide-44
SLIDE 44

References

ARNOLD, DAUCHET: Bi-transductions de forêts. ICALP 1976 BERSTEL, REUTENAUER: Recognizable formal power series on

  • trees. Theor. Comput. Sci. 18, 1982

ENGELFRIET: Top-down tree transducers with regular look-ahead.

  • Math. Systems Theory 10, 1977

GRAEHL, KNIGHT: Training tree transducers. HLT-NAACL 2004 MALETTI, SATTA: Parsing and translation algorithms based on weighted extended tree transducers. ATANLP 2010 MAY, KNIGHT: TIBURON — a weighted tree automata toolkit. CIAA 2006 ROUNDS: Mappings and grammars on trees. Math. Systems Theory 4, 1970 THATCHER Generalized 2 sequential machine maps. J. Comput. System Sci. 4, 1970

Thank you for your attention!

Input Products for WXTT

  • A. Maletti

· 23