• Tidak ada hasil yang ditemukan

Characterizations of subregular tree languages

N/A
N/A
Protected

Academic year: 2024

Membagikan "Characterizations of subregular tree languages"

Copied!
71
0
0

Teks penuh

(1)

Characterizations of subregular tree languages

Andreas Maletti

Universität Leipzig, Germany [email protected]

CAALM, Chennai — January 24, 2019

(2)

Constituent Syntax Tree

Syntax tree forWe must bear in mind the Community as a whole

S NP1

PRP We

VP2

MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2

DT the

NN Community

PP IN as

NP2 DT

a NN whole

(3)

Constituent Syntax Tree

Tree

TΣ(V)for sets ΣandV is least setT oftreess.t.

1 Variables:VT

2 Top concatenation:σ(t1, . . . ,tk)∈T fork ∈N,σ ∈Σ,t1, . . . ,tkT

tree language= set of trees

(4)

Constituent Syntax Tree

Tree

TΣ(V)for sets ΣandV is least setT oftreess.t.

1 Variables:VT

2 Top concatenation:σ(t1, . . . ,tk)∈T fork ∈N,σ ∈Σ,t1, . . . ,tkT

tree language= set of trees

(5)

Constituent Syntax Trees

Syntax tree is not unique

(weights are used for disambiguation)

S NP1

PRP We

VP2

VBD saw

NP2

PRP$

her NN duck

S NP1

PRP We

VP2

VBD saw

S-BAR S NP1

PRP her

VP1

VBP duck

(6)

Parses

Representations enumeration

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Regular tree language

LTΣ(∅)regulariff∃congruence∼=(top-concatenation)onTΣ(∅)s.t.

1 ∼=has finite index(finitely many equiv. classes)

2 ∼=saturatesL; i.e.L =S

tL[t]=

(7)

Parses

Representations enumeration

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Regular tree language

LTΣ(∅)regulariff∃congruence∼=(top-concatenation)onTΣ(∅)s.t.

1 ∼=has finite index(finitely many equiv. classes)

2 ∼=saturatesL; i.e.L =S

tL[t]=

(8)

Parses

Representations enumeration

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Regular tree language

LTΣ(∅)regulariff∃congruence∼=(top-concatenation)onTΣ(∅)s.t.

1 ∼=has finite index(finitely many equiv. classes)

2 ∼=saturatesL; i.e.L =S

tL[t]=

(9)

Regular Tree Languages

Examples for Σ ={σ, δ, α}:

2 equivalence classes(L andTΣ(∅)\L)

L={tTΣ(∅)|t contains odd number ofα}

3 equivalence classes(“noσ”, “someσ, but legal”, illegal) L0={tTΣ(∅)|σ never belowδ}

(10)

Regular Tree Languages

Examples for Σ ={σ, δ, α}:

2 equivalence classes(L andTΣ(∅)\L)

L={tTΣ(∅)|t contains odd number ofα}

3 equivalence classes(“noσ”, “someσ, but legal”, illegal) L0={tTΣ(∅)|σ never belowδ}

(11)

Regular Tree Languages

Regular tree grammar [Brainerd, 1969]

G = (Q,Σ,I,P)

alphabetQof nonterminals and initial nonterminals IQ alphabet of terminalsΣ

finite set of productionsPTΣ(QQ (we writerqfor productions(r,q))

Example productions VP3 q5 NP1 q2

q3 q4

S NP1

q1

q4 q0

S q6 VP2

q2 q4

q0

(12)

Regular Tree Languages

Regular tree grammar [Brainerd, 1969]

G = (Q,Σ,I,P)

alphabetQof nonterminals and initial nonterminals IQ alphabet of terminalsΣ

finite set of productionsPTΣ(QQ (we writerqfor productions(r,q))

Example productions VP3 q5 NP1 q2

q3 q4

S NP1

q1

q4 q0

S q6 VP2

q2 q4

q0

(13)

Regular Tree Languages

Derivation semantics and recognized tree language Regular tree grammarG = (Q,Σ,I,P)

for each productionrqP

r

=G

q

generated tree language

L(G) ={tTΣ(∅)| ∃qI:tG q}

(14)

Regular Tree Languages

Derivation semantics and recognized tree language Regular tree grammarG = (Q,Σ,I,P)

for each productionrqP

r

=G

q

generated tree language

L(G) ={tTΣ(∅)| ∃qI:tG q}

(15)

Regular Tree Languages

Recall 3 equivalence classes(“noσ”, “someσ, but legal”, illegal) L0 ={tTΣ(∅)|σ never belowδ}

C1= [α] C2= [σ(α, α)] C3 = [δ(σ(α, α), α)]

Productions with nonterminalsC1,C2,C3 α→ C1 δ(C1,C1)→ C1

σ(C1,C1)→ C2 σ(C1,C2)→ C2 σ(C2,C1)→ C2 σ(C2,C2)→ C2

δ(C1,C2)→ C3 δ(C1,C3)→ C3 δ(C2,C1)→ C3 δ(C2,C2)→ C3 δ(C2,C3)→ C3 δ(C3,C1)→ C3 δ(C3,C2)→ C3 δ(C3,C3)→ C3 σ(C1,C3)→ C3 σ(C2,C3)→ C3 σ(C3,C1)→ C3 σ(C3,C2)→ C3 σ(C3,C3)→ C3

(16)

Regular Tree Languages

Recall 3 equivalence classes(“noσ”, “someσ, but legal”, illegal) L0 ={tTΣ(∅)|σ never belowδ}

C1= [α] C2= [σ(α, α)] C3 = [δ(σ(α, α), α)]

Productions with nonterminalsC1,C2,C3 α→ C1 δ(C1,C1)→ C1

σ(C1,C1)→ C2 σ(C1,C2)→ C2 σ(C2,C1)→ C2 σ(C2,C2)→ C2

δ(C1,C2)→ C3 δ(C1,C3)→ C3 δ(C2,C1)→ C3 δ(C2,C2)→ C3 δ(C2,C3)→ C3 δ(C3,C1)→ C3 δ(C3,C2)→ C3 δ(C3,C3)→ C3 σ(C1,C3)→ C3 σ(C2,C3)→ C3 σ(C3,C1)→ C3 σ(C3,C2)→ C3 σ(C3,C3)→ C3

(17)

Regular Tree Languages

Properties 3 simple

3 most expressive class we consider

7 ambiguity,(several explanations for a generated tree) but can be removed

3 closed under all Boolean operations (union/intersection/complement: 3/3/3)

3 all relevant properties decidable(emptiness, inclusion, . . . )

(18)

Regular Tree Languages

Characterizations

finite index congruences regular tree grammars (deterministic)tree automata regular tree expressions

monadic second-order formulas . . .

(19)

Parses

Representations enumeration

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Categories

category= tree ofTS(A)withS={/, / }and atomic categoriesA e.g.D/E/E / C corresponds to / /(/(D,E),E),C

(20)

Parses

Representations enumeration

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Categories

category= tree ofTS(A)withS ={/, / }and atomic categoriesA e.g.D/E/E / C corresponds to / /(/(D,E),E),C

(21)

Combinatory Categorial Grammars

Combinators (Compositions) Composition rules of degreek are

ax/c, cyaxy (forward rule)

cy, ax / caxy (backward rule) withy=|1c1|2· · · |kck

Examples:

C D/E/D / C D/E/D

| {z }

degree 0

D/E/D D/E / C D/E/E / C

| {z }

degree 2

(22)

Combinatory Categorial Grammars

Combinators (Compositions) Composition rules of degreek are

ax/c, cyaxy (forward rule)

cy, ax / caxy (backward rule) withy=|1c1|2· · · |kck

Examples:

C D/E/D / C D/E/D

| {z }

degree 0

D/E/D D/E / C D/E/E / C

| {z }

degree 2

(23)

Combinatory Categorial Grammars

Combinatory Categorial Grammar (CCG) (Σ,A,k,I,L)

terminal alphabetΣand atomic categoriesA maximal degreek ∈N∪ {∞}of composition rules initial categoriesIA

lexiconL ⊆Σ× C(A)withC(A)categories overA

Notes:

always all rules up to the given degreek allowed k-CCG= CCG using all composition rules up to degreek

(24)

Combinatory Categorial Grammars

Combinatory Categorial Grammar (CCG) (Σ,A,k,I,L)

terminal alphabetΣand atomic categoriesA maximal degreek ∈N∪ {∞}of composition rules initial categoriesIA

lexiconL ⊆Σ× C(A)withC(A)categories overA

Notes:

always all rules up to the given degreek allowed k-CCG= CCG using all composition rules up to degreek

(25)

Combinatory Categorial Grammars

c..

....

..

C c..

C

d..

D/E/D / C D/E/D

d..

... D/E / C D/E/E / C D/E/E

e..

....

....

. E D/E

e..

....

....

....

E D

2-CCG generates string language LwithL ∩c+d+e+ ={cidiei|i≥1}

for initial categories {D}

L(c) ={C}

L(d) ={D/E / C, D/E/D / C} L(e) ={E}

(26)

Combinatory Categorial Grammars

allow (deterministic) relabeling(to allow arbitrary labels) treet min-height bounded byk

if the minimal distance from each node to a leaf is at mostk

Theorem

(Under relabeling)Class of proof trees of 0-CCGs

=class of min-height bounded binary regular tree languages

joint work withMarco Kuhlmann

(27)

Combinatory Categorial Grammars

Theorem

(Under relabeling)Class of proof trees of 1-CCGs (class of binary regular tree languages

Theorem

(Under relabeling)Class of proof trees of∞-CCGs (class of simple context-free tree languages

joint work withMarco Kuhlmann

(28)

Combinatory Categorial Grammars

Theorem

(Under relabeling)Class of proof trees of 1-CCGs (class of binary regular tree languages

Theorem

(Under relabeling)Class of proof trees of∞-CCGs (class of simple context-free tree languages

joint work withMarco Kuhlmann

(29)

Combinatory Categorial Grammars

ax/(by) byα/c

axα/c c

axα

−→R1 ax/(by)

byα/c c byα axα

c

byα / c ax / (by) axα / c axα

−→R2

c byα / c

byα ax / (by) axα

c

ax/(by) byα / c axα / c axα

−→R3 ax/(by)

c byα / c byα axα

byα/c ax / (by)

axα/c c

axα

−→R4

byα/c c

byα ax / (by) axα

joint work withMarco Kuhlmann

(30)

Combinatory Categorial Grammars

Properties 3 simple

7 ambiguity(several explanations for each recognized tree) 7 not closed under Boolean operations

(union/intersection/complement: 3/?/7) 3 closed under (non-injective) relabelings

? decidability of membership for subregular classes (0-CCG & 1-CCG) of a regular tree language

(31)

Tree Languages

Representations enumerate trees

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Local tree grammar [Gécseg, Steinby 1984] Local tree grammar= finite set of legal branchings (together with a set of root labels)

G = (Σ,I,P)withI ⊆ΣandP ⊆S

kNΣ×Σk

(32)

Tree Languages

Representations enumerate trees

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Local tree grammar [Gécseg, Steinby 1984]

Local tree grammar= finite set of legal branchings (together with a set of root labels)

G = (Σ,I,P)withI ⊆ΣandP ⊆S

kNΣ×Σk

(33)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

(34)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

S NP1 PRP We

VP2 MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2 DT the

NN Community

PP IN as

NP2 DT

a NN whole

(35)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

S NP1 PRP We

VP2 MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2 DT the

NN Community

PP IN as

NP2 DT

a NN whole

(36)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

S NP1 PRP We

VP2 MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2 DT the

NN Community

PP IN as

NP2 DT

a NN whole

(37)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

S NP1 PRP We

VP2 MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2 DT the

NN Community

PP IN as

NP2 DT

a NN whole

(38)

Local Tree Languages

Example (with root label S)

S→NP1VP2 VP2→MD VP3 NP2 →NP2PP VP3→VB PP NP2

MD→must . . .

S NP1 PRP We

VP2 MD must

VP3 VB

bear PP IN in

NP1 NN mind

NP2 NP2 DT the

NN Community

PP IN as

NP2 DT

a NN whole

(39)

Local Tree Languages

not closed under union these singletons are local

S NP2 PRP$

My NN dog

VP1 VBZ sleeps

S NP2

DT The

NN candidates

VP2 VBD scored

ADVP RB well

but their union cannot be local

(as we also generate these trees — overgeneralization)

(40)

Local Tree Languages

not closed under union these singletons are local

S NP2 DT The

NN candidates

VP1 VBZ sleeps

S NP2 PRP$

My NN dog

VP2 VBD scored

ADVP RB well

but their union cannot be local

(as we also generate these trees — overgeneralization)

(41)

Local Tree Languages

Properties 3 simple

3 no ambiguity(unique explanation for each recognized tree) 7 not closed under Boolean operations

(union/intersection/complement: 7/3/7) 7 not closed under (non-injective) relabelings 3 locality of a regular tree language decidable

(42)

Tree Languages

Representations enumerate trees

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Tree substitution grammar [Joshi, Schabes 1997] Tree substitution grammar= finite set of legal fragments (together with a set of root labels)

G = (Σ,I,P)withI ⊆Σand finitePTΣ(Σ)

(43)

Tree Languages

Representations enumerate trees

proof trees of combinatory categorial grammars local tree languages

tree substitution languages regular tree languages

Tree substitution grammar [Joshi, Schabes 1997]

Tree substitution grammar= finite set of legal fragments (together with a set of root labels)

G = (Σ,I,P)withI ⊆Σand finitePTΣ(Σ)

(44)

Tree Substitution Languages

Typical fragments [Post 2011]

VP VBD NP CD

PP

S NP PRP

VP

S NP VP

TO VP

Derivation step ξ ⇒G ζ ξ =c

root(t)

andζ =c t

for some context c and fragmenttP

(45)

Tree Substitution Languages

Tree substitution grammarG = (Σ,I,P) for each fragmenttP with root labelσ

σ

=G

t

generated tree language

L(G) ={tTΣ(∅)| ∃σ∈I:σ ⇒G t}

(46)

Tree Substitution Languages

Tree substitution grammarG = (Σ,I,P) for each fragmenttP with root labelσ

σ

=G

t

generated tree language

L(G) ={tTΣ(∅)| ∃σ∈I:σ ⇒G t}

(47)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(48)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(49)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(50)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(51)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(52)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(53)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(54)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(55)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(56)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(57)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(58)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(59)

Tree Substitution Languages

Fragments

S NP1(PRP),VP2

PRP(We) VP2 MD,VP3(VB,PP,NP2)

MD(must)

Derivation

S NP1 PRP We

VP2 MD must

VP3 VB PP NP2

(60)

Tree Substitution Languages

not closed under union

these languages are tree substitution languages individually

S C C C a

a

S C C C b

b

L1={S(Cn(a),a)|n∈N} L2={S(Cn(b),b)|n∈N} but their union is not

(exchange subtrees below the indicated cuts)

(61)

Tree Substitution Languages

not closed under union

these languages are tree substitution languages individually

S C C C a

a

S C C C b

b

L1={S(Cn(a),a)|n∈N} L2={S(Cn(b),b)|n∈N} but their union is not

(exchange subtrees below the indicated cuts)

(62)

Tree Substitution Languages

not closed under intersection

these languagesL1andL2are tree substitution languages individually forn≥1 and arbitrary x1, . . . ,xn ∈ {a,b}

S’

x1 S x1 S

x2 S x2 S

x3 S xn−1 S

xn S xn c

L1

S’

x1 S x2 S

x2 S x3 S

x3 S xn−1 S

xn−1 S xn c

L2

but their intersection only contains trees withx1=x2=· · ·=xn and is not a tree substitution language

(63)

Tree Substitution Languages

not closed under intersection

these languagesL1andL2are tree substitution languages individually forn≥1 and arbitrary x1, . . . ,xn ∈ {a,b}

S’

x1 S x1 S

x2 S x2 S

x3 S xn−1 S

xn S xn c

L1

S’

x1 S x2 S

x2 S x3 S

x3 S xn−1 S

xn−1 S xn c

L2

but their intersection only contains trees withx1=x2=· · ·=xn and is not a tree substitution language

(64)

Tree Substitution Languages

not closed under complement

this languageLis a tree substitution language

S A A A0 A0 a

L

S B B B0 B0 b

L

but its complement is not

(exchange as indicated in red)

(65)

Tree Substitution Languages

not closed under complement

this languageLis a tree substitution language

S A A A0 A0 a

L

S B B B0 B0 b

L

S A A A0 A0 b

/L

S B B A0 A0 a

/L

but its complement is not (exchange as indicated in red)

(66)

Tree Substitution Languages

Properties 3 simple

3 contain all finite and co-finite tree languages

7 ambiguity(several explanations for a generated tree) 7 not closed under Boolean operations

(union/intersection/complement: 7/7/7)

3 can express many finite-distance dependencies (extended domain of locality)

(67)

Tree Substitution Languages

Open questions

multiple intersections more expressive?

which regular tree languages are tree substitution languages?

relation to local tree languages?

extension to weights application to parsing

Thank you for your attention!

(68)

Tree Substitution Languages

Open questions

multiple intersections more expressive?

which regular tree languages are tree substitution languages?

relation to local tree languages?

extension to weights application to parsing

Thank you for your attention!

(69)

Tree Substitution Languages

Open questions

multiple intersections more expressive?

which regular tree languages are tree substitution languages?

relation to local tree languages?

extension to weights application to parsing

Thank you for your attention!

(70)

Tree Substitution Languages

Experiment [Post, Gildea 2009]

grammar size Prec. Recall F1 local 46k 75.37 70.05 72.61

“spinal” TSG 190k 80.30 78.10 79.18

“minimal subset” TSG 2,560k 76.40 78.29 77.33

(on WSJ Sect. 23)

(71)

Tree Substitution Languages with Latent Variables

Experiment [Shindo et al. 2012]

F1 score

grammar |w| ≤40 full

TSG [Post, Gildea, 2009] 82.6 TSG [Cohnet al., 2010] 85.4 84.7 CFGlv [Collins, 1999] 88.6 88.2 CFGlv [Petrov, Klein, 2007] 90.6 90.1

CFGlv [Petrov, 2010] 91.8

TSGlv (single) 91.6 91.1

TSGlv (multiple) 92.9 92.4

Discriminative Parsers

Carreraset al., 2008 91.1

Charniak, Johnson, 2005 92.0 91.4

Huang, 2008 92.3 91.7

Referensi

Dokumen terkait

11, Issue 06, June 2023 55 ABOUT TEACHING OF LANGUAGES Eraliyeva Istatoy Oblokul Samarkand State Institute Foreign Languages Teacher АBSTRACT This article discusses the

iv 4.1 INTRODUCTION 100 4.2 THE EXISTENCE OF THE LANGUAGE POLICY 103 4.3 PARITY AND EQUITABLE USE OF OFFICIAL LANGUAGES AT THE UNIVERSITY OF LIMPOPO 104 4.4 USING OFFICIAL

20 Journal of Tropical Forest Science 11:1:11-25 1999 In general, about 0.1 to 39% sampling intensity is required in order to enumerate tree density of all trees of different size

A separate linear model was constructed to determine if fruit pro- duction numbers of trees producing or not pro- ducing ripe fruit within tree size classes was similar among islands

Our observations demonstrate that kit foxes are capable of climbing trees and of agile mobility among tree branches.. Our observations also provide an example of the behavioral

OXFORD JOURNALS OXFORD UNIVERSITY PRESS Development of a Local Size Hierarchy Causes Regular Spacing of Trees in an Even-aged Abies Forest: Analyses Using Spatial Autocorrelation

We quantified the effects of lianas in tree crowns n= 2907 and rooted within 2 m of trees n= 1086 on growth and mortality of 30 tree species from 1995 to 2005 on Barro Colorado Island

Tree Quality The quality of trees in the green lane can be known from 2 assessment criteria, namely in terms of tree health which includes trunk health and header health, as well as