Characterizations of subregular tree languages Andreas Maletti - - PowerPoint PPT Presentation

characterizations of subregular tree languages
SMART_READER_LITE
LIVE PREVIEW

Characterizations of subregular tree languages Andreas Maletti - - PowerPoint PPT Presentation

Characterizations of subregular tree languages Andreas Maletti Universitt Leipzig, Germany andreas.maletti@uni-leipzig.de CAALM, Chennai January 24, 2019 Constituent Syntax Tree Syntax tree for We must bear in mind the Community as a


slide-1
SLIDE 1

Characterizations of subregular tree languages

Andreas Maletti

Universität Leipzig, Germany andreas.maletti@uni-leipzig.de

CAALM, Chennai — January 24, 2019

slide-2
SLIDE 2

Constituent Syntax Tree

Syntax tree for We 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

slide-3
SLIDE 3

Constituent Syntax Tree

Tree

TΣ(V) for sets Σ and V is least set T of trees s.t.

1

Variables: V ⊆ T

2

Top concatenation: σ(t1, . . . , tk) ∈ T for k ∈ N, σ ∈ Σ, t1, . . . , tk ∈ T

slide-4
SLIDE 4

Constituent Syntax Tree

Tree

TΣ(V) for sets Σ and V is least set T of trees s.t.

1

Variables: V ⊆ T

2

Top concatenation: σ(t1, . . . , tk) ∈ T for k ∈ N, σ ∈ Σ, t1, . . . , tk ∈ T tree language = set of trees

slide-5
SLIDE 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

slide-6
SLIDE 6

Parses

Representations enumeration

slide-7
SLIDE 7

Parses

Representations enumeration proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages

slide-8
SLIDE 8

Parses

Representations enumeration proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages

Regular tree language

L ⊆ TΣ(∅) regular iff ∃ congruence ∼ = (top-concatenation) on TΣ(∅) s.t.

1

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

2

∼ = saturates L; i.e. L =

t∈L[t]∼ =

slide-9
SLIDE 9

Regular Tree Languages

Examples for Σ = {σ, δ, α}: 2 equivalence classes (L and TΣ(∅) \ L) L = {t ∈ TΣ(∅) | t contains odd number of α}

slide-10
SLIDE 10

Regular Tree Languages

Examples for Σ = {σ, δ, α}: 2 equivalence classes (L and TΣ(∅) \ L) L = {t ∈ TΣ(∅) | t contains odd number of α} 3 equivalence classes (“no σ”, “some σ, but legal”, illegal) L′ = {t ∈ TΣ(∅) | σ never below δ}

slide-11
SLIDE 11

Regular Tree Languages

Regular tree grammar [Brainerd, 1969]

G = (Q, Σ, I, P) alphabet Q of nonterminals and initial nonterminals I ⊆ Q alphabet of terminals Σ finite set of productions P ⊆ TΣ(Q) × Q (we write r → q for productions (r, q))

slide-12
SLIDE 12

Regular Tree Languages

Regular tree grammar [Brainerd, 1969]

G = (Q, Σ, I, P) alphabet Q of nonterminals and initial nonterminals I ⊆ Q alphabet of terminals Σ finite set of productions P ⊆ TΣ(Q) × Q (we write r → q for productions (r, q)) Example productions

VP3 q5 NP1 q2 q3 → q4 S NP1 q1 q4 → q0 S q6 VP2 q2 q4 → q0

slide-13
SLIDE 13

Regular Tree Languages

Derivation semantics and recognized tree language Regular tree grammar G = (Q, Σ, I, P) for each production r → q ∈ P

r = ⇒G q

slide-14
SLIDE 14

Regular Tree Languages

Derivation semantics and recognized tree language Regular tree grammar G = (Q, Σ, I, P) for each production r → q ∈ P

r = ⇒G q

generated tree language L(G) = {t ∈ TΣ(∅) | ∃q ∈ I : t ⇒∗

G q}

slide-15
SLIDE 15

Regular Tree Languages

Recall 3 equivalence classes (“no σ”, “some σ, but legal”, illegal) L′ = {t ∈ TΣ(∅) | σ never below δ} C1 = [α] C2 = [σ(α, α)] C3 = [δ(σ(α, α), α)]

slide-16
SLIDE 16

Regular Tree Languages

Recall 3 equivalence classes (“no σ”, “some σ, but legal”, illegal) L′ = {t ∈ TΣ(∅) | σ never below δ} C1 = [α] C2 = [σ(α, α)] C3 = [δ(σ(α, α), α)] Productions with nonterminals C1, 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

slide-17
SLIDE 17

Regular Tree Languages

Properties ✓ simple ✓ most expressive class we consider ✗ ambiguity, (several explanations for a generated tree) but can be removed ✓ closed under all Boolean operations (union/intersection/complement: ✓/✓/✓) ✓ all relevant properties decidable (emptiness, inclusion, ...)

slide-18
SLIDE 18

Regular Tree Languages

Characterizations

finite index congruences regular tree grammars (deterministic) tree automata regular tree expressions monadic second-order formulas ...

slide-19
SLIDE 19

Parses

Representations enumeration proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages

slide-20
SLIDE 20

Parses

Representations enumeration proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages Categories category = tree of TS(A) with S = {/, / } and atomic categories A e.g. D/E/E / C corresponds to /

  • /(/(D, E), E), C
slide-21
SLIDE 21

Combinatory Categorial Grammars

Combinators (Compositions)

Composition rules of degree k are ax/c, cy → axy (forward rule) cy, ax / c → axy (backward rule) with y = |1c1 |2 · · · |kck

slide-22
SLIDE 22

Combinatory Categorial Grammars

Combinators (Compositions)

Composition rules of degree k are ax/c, cy → axy (forward rule) cy, ax / c → axy (backward rule) with y = |1c1 |2 · · · |kck Examples: C D/E/D / C D/E/D

  • degree 0

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

  • degree 2
slide-23
SLIDE 23

Combinatory Categorial Grammars

Combinatory Categorial Grammar (CCG)

(Σ, A, k, I, L) terminal alphabet Σ and atomic categories A maximal degree k ∈ N ∪ {∞} of composition rules initial categories I ⊆ A lexicon L ⊆ Σ × C(A) with C(A) categories over A

slide-24
SLIDE 24

Combinatory Categorial Grammars

Combinatory Categorial Grammar (CCG)

(Σ, A, k, I, L) terminal alphabet Σ and atomic categories A maximal degree k ∈ N ∪ {∞} of composition rules initial categories I ⊆ A lexicon L ⊆ Σ × C(A) with C(A) categories over A Notes: always all rules up to the given degree k allowed k-CCG = CCG using all composition rules up to degree k

slide-25
SLIDE 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 L with L ∩ 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}

slide-26
SLIDE 26

Combinatory Categorial Grammars

allow (deterministic) relabeling (to allow arbitrary labels) tree t min-height bounded by k if the minimal distance from each node to a leaf is at most k

Theorem

(Under relabeling) Class of proof trees of 0-CCGs = class of min-height bounded binary regular tree languages joint work with Marco Kuhlmann

slide-27
SLIDE 27

Combinatory Categorial Grammars

Theorem

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

slide-28
SLIDE 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 with Marco Kuhlmann

slide-29
SLIDE 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 with Marco Kuhlmann

slide-30
SLIDE 30

Combinatory Categorial Grammars

Properties ✓ simple ✗ ambiguity (several explanations for each recognized tree) ✗ not closed under Boolean operations (union/intersection/complement: ✓/?/✗∗) ✓ closed under (non-injective) relabelings ? decidability of membership for subregular classes (0-CCG & 1-CCG)

  • f a regular tree language
slide-31
SLIDE 31

Tree Languages

Representations enumerate trees proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages

slide-32
SLIDE 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) with I ⊆ Σ and P ⊆

k∈N Σ × Σk

slide-33
SLIDE 33

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP VP3 → VB PP NP2 MD → must . . .

slide-34
SLIDE 34

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP 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

slide-35
SLIDE 35

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP 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

slide-36
SLIDE 36

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP 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

slide-37
SLIDE 37

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP 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

slide-38
SLIDE 38

Local Tree Languages

Example (with root label S)

S → NP1 VP2 VP2 → MD VP3 NP2 → NP2 PP 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

slide-39
SLIDE 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

slide-40
SLIDE 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)

slide-41
SLIDE 41

Local Tree Languages

Properties ✓ simple ✓ no ambiguity (unique explanation for each recognized tree) ✗ not closed under Boolean operations (union/intersection/complement: ✗/✓/✗) ✗ not closed under (non-injective) relabelings ✓ locality of a regular tree language decidable

slide-42
SLIDE 42

Tree Languages

Representations enumerate trees proof trees of combinatory categorial grammars local tree languages tree substitution languages regular tree languages

slide-43
SLIDE 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) with I ⊆ Σ and finite P ⊆ TΣ(Σ)

slide-44
SLIDE 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 fragment t ∈ P
slide-45
SLIDE 45

Tree Substitution Languages

Tree substitution grammar G = (Σ, I, P) for each fragment t ∈ P with root label σ

σ = ⇒G t

slide-46
SLIDE 46

Tree Substitution Languages

Tree substitution grammar G = (Σ, I, P) for each fragment t ∈ P with root label σ

σ = ⇒G t

generated tree language L(G) = {t ∈ TΣ(∅) | ∃σ ∈ I : σ ⇒∗

G t}

slide-47
SLIDE 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

slide-48
SLIDE 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

slide-49
SLIDE 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

slide-50
SLIDE 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

slide-51
SLIDE 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

slide-52
SLIDE 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

slide-53
SLIDE 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

slide-54
SLIDE 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

slide-55
SLIDE 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

slide-56
SLIDE 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

slide-57
SLIDE 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

slide-58
SLIDE 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

slide-59
SLIDE 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

slide-60
SLIDE 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

slide-61
SLIDE 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)

slide-62
SLIDE 62

Tree Substitution Languages

not closed under intersection these languages L1 and L2 are tree substitution languages individually for n ≥ 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

slide-63
SLIDE 63

Tree Substitution Languages

not closed under intersection these languages L1 and L2 are tree substitution languages individually for n ≥ 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 with x1 = x2 = · · · = xn and is not a tree substitution language

slide-64
SLIDE 64

Tree Substitution Languages

not closed under complement this language L is a tree substitution language

S A A A′ A′ a ∈ L S B B B′ B′ b ∈ L

but its complement is not

slide-65
SLIDE 65

Tree Substitution Languages

not closed under complement this language L is a tree substitution language

S A A A′ A′ a ∈ L S B B B′ B′ b ∈ L S A A A′ A′ b / ∈ L S B B A′ A′ a / ∈ L

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

slide-66
SLIDE 66

Tree Substitution Languages

Properties ✓ simple ✓ contain all finite and co-finite tree languages ✗ ambiguity (several explanations for a generated tree) ✗ not closed under Boolean operations (union/intersection/complement: ✗/✗/✗) ✓ can express many finite-distance dependencies (extended domain of locality)

slide-67
SLIDE 67

Tree Substitution Languages

Open questions

multiple intersections more expressive? which regular tree languages are tree substitution languages? relation to local tree languages?

slide-68
SLIDE 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

slide-69
SLIDE 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!

slide-70
SLIDE 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)

slide-71
SLIDE 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 [Cohn et 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 Carreras et al., 2008 91.1 Charniak, Johnson, 2005 92.0 91.4 Huang, 2008 92.3 91.7