A Minimalist Grammar (MG) as Interpreted Regular Tree ......Nov 24, 2018  · Meaghan Fowlie and...

Post on 02-Aug-2020

1 views 0 download

Transcript of A Minimalist Grammar (MG) as Interpreted Regular Tree ......Nov 24, 2018  · Meaghan Fowlie and...

A Minimalist Grammar (MG)as Interpreted Regular Tree Grammar (IRTG)

Martin van Harmelen

Language Science and TechnologyComputational Linguistics & Phonetics (CoLi)

Universitat des Saarlandes

22-11-2018

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 1 / 39

Minimalist Tree vs. String Grammar

1. Minimalist Tree vs. String Grammar

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 2 / 39

Minimalist Tree vs. String Grammar

Derived Tree vs. Derived String

〈make tortillas, =D V, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 3 / 39

Minimalist Tree vs. String Grammar

move: Deleting vs. Storing

〈Maria will make tortillas, T, ∅〉

〈will make tortillas, +nom T, {nom 7→ 〈Maria, ε〉}〉

〈will make tortillas, =D +nom V, ∅〉 〈Maria, D -nom, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 4 / 39

Minimalist String Grammar

2. Minimalist String Grammar

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 5 / 39

Minimalist String Grammar

Objects

Derived string: 〈string , stack , storage〉storage: {feature 7→ 〈string , stack〉}

Example

〈Matt presented, T, ∅〉〈will make tortillas, +nom T, {nom 7→ 〈Maria, ε〉}〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 6 / 39

Minimalist String Grammar

Derivation Tree

〈Matt presented, T, ∅〉move1

〈presented, +nom T, {nom 7→ 〈Matt, ε〉}〉merge1

〈ε, =V +nom T, ∅〉 〈presented, V, {nom 7→ 〈Matt, ε〉}〉merge2

〈presented, =D V, ∅〉 〈Matt, D -nom, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 7 / 39

Minimalist String Grammar

Lexicon

〈ε, =V +nom T, ∅〉〈klingon, D, ∅〉〈Matt, D -nom, ∅〉〈Teresa, D -nom, ∅〉〈presented, =D V, ∅〉〈presented, =D =D V, ∅〉〈speaks, =D =D V, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 8 / 39

Minimalist String Grammar

Grammar Rules: merge1

〈presented, +nom T, {nom 7→ 〈Matt, ε〉}〉merge1

〈ε, =V +nom T, ∅〉 〈presented, V, {nom 7→ 〈Matt, ε〉}〉

If the feature X matchesand the feature-stack is emptythen concatenate strings and combine storages

merge1 (〈s, =Xα,S〉 , 〈t, X,T〉) = 〈s · t, α,S⊕ T〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 9 / 39

Minimalist String Grammar

Grammar Rules: merge2

〈presented, V, {nom 7→ 〈Matt, ε〉}〉merge2

〈presented, =D V, ∅〉 〈Matt, D -nom, ∅〉

If the feature X matchesand there are more features on the stack

(starting with -)then store string t and remaining features β under f

(for when you find +f)

merge2 (〈s, =Xα,S〉 , 〈t, X -fβ,T〉) = 〈s, α,S⊕ T⊕ {f 7→ 〈t, β〉}〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 10 / 39

Minimalist String Grammar

Grammar Rules: move1

〈Matt presented, T, ∅〉move1

〈presented, +nom T, {nom 7→ 〈Matt, ε〉}〉

If the feature f exists in storageand the stored feature-stack is emptythen left-concatenate the stored string

move1 (〈s, +fα,S〉) = 〈t · s, α,S− f〉 if S(f) = 〈t, ε〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 11 / 39

Minimalist String Grammar

Grammar Rules: move2

〈presented, T, {wh 7→ 〈Who, ε〉}〉move2

〈presented, +nom T, {nom 7→ 〈Who, -wh〉}〉

If the feature f exists in storageand there are more features on the stored stack

(starting with -)then re-store string t and remaining features γ under g

(for when you find +g)

move2 (〈s, +fα,S〉) = 〈s, α, (S− f)⊕ {g 7→ 〈t, γ〉}〉 if S(f) = 〈t, -gγ〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 12 / 39

Minimalist String Grammar

Grammar Rules

merge(1|2): eat a =X, X feature-pair

move(1|2): eat a +f and stored (-)f

(merge|move)1: stick together strings

(merge|move)2: store strings (using features as index)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 13 / 39

IRTG

3. IRTG

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 14 / 39

IRTG

IRTG

Regular Tree Grammar (specifies allowed combinations)

Interpretation(s)

TreehomomorphismAlgebra

objects (things to be combined & result of evaluation)operations (different ways to combine)evaluation (specifies result of operations)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 15 / 39

IRTG Algebra

3.1. Algebra

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 16 / 39

IRTG Algebra

Algebra Functionality

merge(1|2): eat a =X, X feature-pair

move(1|2): eat a +f and stored (-)f

(merge|move)1: stick together strings

(merge|move)2: store strings (using features as index)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 17 / 39

IRTG Algebra

Algebra Terminology

object 〈string , stack , {feature 7→ 〈string , stack〉 }〉operation ≈ (merge|move)(1|2)

term combinations of above (= tree)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 18 / 39

IRTG Algebra

Algebra Evaluation: merge

merge1 (〈s,S〉 , 〈t,T〉) = 〈s · t, α,S⊕ T〉

If the feature X matchesand the feature-stack is emptythen concatenate strings and combine storages

merge2f (〈s,S〉 , 〈t,T〉) = 〈s,S⊕ T⊕ {f 7→ t}〉

If the feature X matchesand there are more features on the stack

(starting with -)then store string t and remaining features β under f

(for when you find +f)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 19 / 39

IRTG Algebra

Algebra Evaluation: move

move1f (〈s,S〉) = 〈t · s, α,S− f〉 where S(f) = t

If the feature f exists in storageand the stored feature-stack is emptythen left-concatenate the stored string

move2f-g (〈s,S〉) = 〈s, (S− f)⊕ {g 7→ t}〉 where S(f) = t

If the feature f exists in storageand there are more features on the stored stack

(starting with -)then re-store string t and remaining features γ under g

(for when you find +g)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 20 / 39

IRTG Regular Tree Grammar

3.2. Regular Tree Grammar

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 21 / 39

IRTG Regular Tree Grammar

Regular Tree Grammar Functionality

merge(1|2): eat a =X, X feature-pair

move(1|2): eat a +f and stored (-)f

(merge|move)1: stick together strings

(merge|move)2: store strings (using features as index)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 22 / 39

IRTG Regular Tree Grammar

RTG Terminology

non-terminal 〈string , stack , {feature 7→ 〈string , stack〉 }〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 23 / 39

IRTG Regular Tree Grammar

How-To

1 MG lexicon 7→strip strings RTG lexical rules

2 applications of (merge|move)(1|2) 7→ RTG non-lexical rules

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 24 / 39

IRTG Regular Tree Grammar

The Grammar

lexicon from minimalist grammar

〈ε, =V +nom T, ∅〉〈klingon, D, ∅〉〈Matt, D -nom, ∅〉〈Teresa, D -nom, ∅〉〈presented, =D V, ∅〉〈presented, =D =D V, ∅〉〈speaks, =D =D V, ∅〉

lexical rules of regular tree grammar

〈=V +nom T, ∅〉 → lexcase

〈D, ∅〉 → lexklingon

〈D -nom, ∅〉 → lexMatt

〈D -nom, ∅〉 → lexTeresa

〈=D V, ∅〉 → lexpresented

〈=D =D V, ∅〉 → lexpresented2

〈=D =D V, ∅〉 → lexspeaks

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 25 / 39

IRTG Regular Tree Grammar

Lexical Rules (condensed)

1 〈=V +nom T, ∅〉 → lexcase2 〈D, ∅〉 → lexklingon3 〈D -nom, ∅〉 → lexMatt |lexTeresa4 〈=D V, ∅〉 → lexpresented5 〈=D =D V, ∅〉 → lexpresented2|lexspeaks

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 26 / 39

IRTG Regular Tree Grammar

Non-Lexical Rules: merge1

〈V, ∅〉 → mg1.1 (〈=D V, ∅〉 , 〈D, ∅〉)〈=D V, ∅〉 → mg1.2 (〈=D =D V, ∅〉 , 〈D, ∅〉)〈V, {nom 7→ ε}〉 → mg1.3 (〈=D V, {nom 7→ ε}〉 , 〈D, ∅〉)〈+nom T, ∅〉 → mg1.4 (〈=V +nom T, ∅〉 , 〈V, ∅〉)〈+nom T, {nom 7→ ε}〉 → mg1.5 (〈=V +nom T, ∅〉 , 〈V, {nom 7→ ε}〉)

If the feature X matchesand the feature-stack is emptythen concatenate strings and combine storages

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 27 / 39

IRTG Regular Tree Grammar

Non-Lexical Rules: merge2

〈V, {nom 7→ ε}〉 → mg2.1 (〈=D V, ∅〉 , 〈D -nom, ∅〉)〈=D V, {nom 7→ ε}〉 → mg2.2 (〈=D =D V, ∅〉 , 〈D -nom, ∅〉)

If the feature X matchesand there are more features on the stackthen store string t and remaining features β under f

(for when you find +f)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 28 / 39

IRTG Regular Tree Grammar

Non-Lexical Rules: move1

〈T, ∅〉!→ mv1.1 (〈+nom T, {nom 7→ ε}〉)

If the feature f exists in storageand the stored feature-stack is emptythen left-concatenate the stored string

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 29 / 39

IRTG Regular Tree Grammar

Non-Lexical Rules: move2

Example

lexicon from minimalist grammar

〈〈Who, D -nom -wh〉, ∅〉 〈〈ε, =T +wh C〉, ∅〉

rules of regular tree grammar

〈V, {nom 7→ -wh}〉 → mg2.3 (〈=D V, ∅〉 , 〈D -nom -wh, ∅〉). . .

〈T, {wh 7→ ε}〉 → mv2.1 (〈+nom T, {nom 7→ -wh}〉)

If the feature f exists in storageand there are more features on the stored stack

(starting with -)then re-store string t and remaining features γ under g

(for when you find +g)

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 30 / 39

IRTG Arrows

3.3. Arrows

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 31 / 39

IRTG Arrows

Derivation Tree

mv1.1

mg1.5

lexcase mg2.1

lexpresented lexMatt

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 32 / 39

IRTG Arrows

Treehomomorphism

mv1.1 7→ move1nom(x1)

mg1.5 7→ merge1(x1, x2)

mg2.1 7→ merge2nom(x1, x2)

lexcase 7→ 〈ε, ∅〉lexpresented 7→ 〈presented, ∅〉

lexMatt 7→ 〈Matt, ∅〉. . .

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 33 / 39

IRTG Arrows

Term of Algebra

move1nom

merge1

〈ε, ∅〉 merge2nom

〈presented, ∅〉 〈Matt, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 34 / 39

IRTG Arrows

Evaluation

outcome of operations

Example

merge2nom

〈presented, ∅〉 〈Matt, ∅〉〈presented, {nom 7→ Matt}〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 35 / 39

IRTG Arrows

Object of Algebra

〈Matt presented, ∅〉

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 36 / 39

IRTG Arrows

Conclusion

RTG decides allowed combinations

Algebra decides outcome of combinations

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 37 / 39

IRTG Arrows

Exercise

Say we would add the following two items to our Minimalist Grammar:

〈〈Who, D -nom -wh〉, ∅〉〈〈ε, =T +wh C〉, ∅〉

Do the following:

Write down the extra RTG rules needed

Write down the full homomorphism

Show how the following sentence would be derived:

Who presented Klingon?

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 38 / 39

IRTG Arrows

References

Meaghan Fowlie and Alexander Koller. Parsing minimalist languages withinterpreted regular tree grammars. In Proceedings of the 13thInternational Workshop on Tree Adjoining Grammars and RelatedFormalisms (TAG), pages 11–20. Association for ComputationalLinguistics, September 2017. URLhttps://aclanthology.info/papers/W17-6202/w17-6202.

Martin van Harmelen (LST) Fowlie and Koller (2017) 22-11-2018 39 / 39