Grammar Implementation with Lexicalized Tree Adjoining Grammars and - - PowerPoint PPT Presentation

grammar implementation with lexicalized tree adjoining
SMART_READER_LITE
LIVE PREVIEW

Grammar Implementation with Lexicalized Tree Adjoining Grammars and - - PowerPoint PPT Presentation

Grammar Implementation with Lexicalized Tree Adjoining Grammars and Frame Semantics Grammar implementation with XMG: Syntax Laura Kallmeyer, Timm Lichte, Rainer Osswald & Simon Petitjean University of Dsseldorf DGfS Fall School, September


slide-1
SLIDE 1

Grammar Implementation with Lexicalized Tree Adjoining Grammars and Frame Semantics

Grammar implementation with XMG: Syntax Laura Kallmeyer, Timm Lichte, Rainer Osswald & Simon Petitjean

University of Düsseldorf

DGfS Fall School, September 19, 2017

SFB 991

slide-2
SLIDE 2

Recapitulation of yesterday

two meanings of “implementation” two techniques of grammar implementation: metarules versus metagrammar introduction to grammar engineering with XMG

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 2 2

slide-3
SLIDE 3

Two kinds of grammar implementation

grammar/ linguistic theory specifications in accordance with a grammar formalism evaluation

  • f the theory

“implementation” As is frequently pointed out but cannot be overemphasized, an important goal

  • f formalization in linguistics is to enable subsequent researchers to see the

defects of an analysis as clearly as its merits; only then can progress be made

  • efficiently. (Dowty 1979: 322)

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 3 3

slide-4
SLIDE 4

Two kinds of grammar implementation

grammar/ linguistic theory specifications in accordance with a grammar formalism evaluation

  • f the theory

grammar resource computational application “implementation” “implementation”

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 4 3

slide-5
SLIDE 5

What kind of grammar resource?

tree template S NP VP V⋄ NP lexical insertion anchor repairs

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 5 4

slide-6
SLIDE 6

Today

XTAG: an example for a manually constructed grammar Examples with XMG: active-passive alternation, wh-movement, multi-word expressions

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 6 5

slide-7
SLIDE 7

The XTAG-project

was located at the University of Pennsylvania (ca. 1988-2001)

grammar (set of tree templates/families) tools (browser, editor, parser, ...)

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 7 6

slide-8
SLIDE 8

The XTAG-project

was located at the University of Pennsylvania (ca. 1988-2001)

grammar (set of tree templates/families) tools (browser, editor, parser, ...)

URL: http://www.cis.upenn.edu/~xtag/ [Manual: XTAG Research Group [14]]

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 8 6

slide-9
SLIDE 9

The XTAG-project

was located at the University of Pennsylvania (ca. 1988-2001)

grammar (set of tree templates/families) tools (browser, editor, parser, ...)

URL: http://www.cis.upenn.edu/~xtag/ [Manual: XTAG Research Group [14]] the architecture of the XTAG-grammar

Tree Database Syntactic Database Morph Database list of tree templates and tree families root form, POS → list of tree templates or

  • r tree families, list of feature equations

inflected form → root form, POS, inflectional information

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 9 6

slide-10
SLIDE 10

The architecture of the XTAG-grammar

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 10 7

slide-11
SLIDE 11

The architecture of the XTAG-grammar

Example: Tree template for the declarative transitive verb (αnx0Vnx1), where ⋄ marks the lexical insertion site:

S NP VP V⋄ NP

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 11 8

slide-12
SLIDE 12

The architecture of the XTAG-grammar

Example: Tree template for the declarative transitive verb (αnx0Vnx1), where ⋄ marks the lexical insertion site:

S NP VP V⋄ NP

A tree family is a set of tree templates, represents a subcategorization frame, and contains all syntactic configurations the subcategorization frame can be realized in. Example: αnx0Vnx1 ∈ Tnx0Vnx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 12 8

slide-13
SLIDE 13

Tree families

Example tree families intransitive: Tnx0V tree set containing: base tree, wh-moved subject, imperative, determiner gerund, ... etc.

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 13 9

slide-14
SLIDE 14

Tree families

Example tree families intransitive: Tnx0V tree set containing: base tree, wh-moved subject, imperative, determiner gerund, ... etc. transitive: Tnx0Vnx1 tree set containing: base tree, wh-moved subject, wh-moved

  • bject, imperative, determiner gerund, passive with by, passive

without by ... etc.

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 14 9

slide-15
SLIDE 15

Tree families

Example tree families intransitive: Tnx0V tree set containing: base tree, wh-moved subject, imperative, determiner gerund, ... etc. transitive: Tnx0Vnx1 tree set containing: base tree, wh-moved subject, wh-moved

  • bject, imperative, determiner gerund, passive with by, passive

without by ... etc. Some figures [Prolo [12]]

  • subcat. group
  • no. of families
  • no. of trees

intransitive 1 12 transitive 1 39 ditransitive 1 46 light verb constr. 2 53 . . . . . . . . . TOTAL: 57 1008

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 15 9

slide-16
SLIDE 16

The situation: templates ...

12 templates 39 tree templates for intransitive verbs for transitive verbs

S NP VP V S NP VP V NP S NP S NP ε VP V S NP S NP ε VP V NP

... ... Basically, XTAG defines a set of 1008 unrelated tree templates.

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 16 10

slide-17
SLIDE 17

The situation: templates with features

αW0nx0V:

Sq

      inv

4

wh

3

extr +        NP        agr

2

wh

3 +

trace

5

       Sr

  • inv

4

wh

3

  • inv

– agr

2

  • NP
  • trace

5

  • ϵ

VP

  • agr

2

  • V⋄

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 17 11

slide-18
SLIDE 18

The situation: templates with many features

See full entries here:

http://xmg.phil.hhu.de/index.php/upload/xmg_xtag

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 18 12

slide-19
SLIDE 19

Metarules for LTAG

Idea from GPSG[10], later applied to XTAG[2,3,12] tree fragments core grammar (tree templates) expanded grammar (tree templates) accumulation metarules metarules metarules connect tree templates of a tree family

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 19 13

slide-20
SLIDE 20

Metarules for LTAG: Example

αnx0Vnx1 αW0nx0Vnx1 αnx1Vbynx0 αW1nx1Vbynx0

extraction passivization extraction

Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 20 14

slide-21
SLIDE 21

Metagrammars for LTAG

Candito (1996)[7,8,13] tree fragments tree templates tree families arbitrary disjunction accumulation of descriptions

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 21 15

slide-22
SLIDE 22

Metagrammars for LTAG: Properties

no deletion, no copying, no recursion declarative, order insensitive The number of minimal models is finite. BUT: the number of minimal models can grow exponentially (O(n!)) in terms of the number of described nodes. Does it suffice? How to express passivization?

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 22 16

slide-23
SLIDE 23

Metagrammar for LTAG: Example

αnx0Vnx1 αW0nx0Vnx1 αnx1Vbynx0 αW1nx1Vbynx0

extraction passivization extraction

Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 23 17

slide-24
SLIDE 24

Metagrammars for LTAG: Passivization

|=

S NP VP V⋄ NP S NP VP V⋄ PP P by NP

Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 24 18

slide-25
SLIDE 25

Metagrammars for LTAG: Passivization

S NP VP ∧ VP V⋄ ∧

  • VP

V⋄ NP ∨ VP V⋄ PP P by NP

  • |=

S NP VP V⋄ NP S NP VP V⋄ PP P by NP

Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 25 18

slide-26
SLIDE 26

Metagrammars for LTAG: Passivization

S NP VP ∧ VP V⋄ ∧

  • VP

V⋄ NP ∨ VP V⋄ PP P by NP

  • disjunction

does the trick! |=

S NP VP V⋄ NP S NP VP V⋄ PP P by NP

Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 26 18

slide-27
SLIDE 27

Metagrammar for LTAG: Classes

Tnx0Vnx1:

S NP VP

VP V⋄

  • VP

V⋄ NP ∨ VP V⋄ PP P by NP

  • Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf)

27 19

slide-28
SLIDE 28

Metagrammar for LTAG: Classes

Tnx0Vnx1:

S NP VP

VP V⋄

  • VP

V⋄ NP ∨ VP V⋄ PP P by NP

  • Tnx0Vnx1: Subject

∧ VerbProjection ∧ (Object ∨ by-Phrase) Tnx0Vnx1: nx0V ∧ (Object ∨ by-Phrase)

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 28 19

slide-29
SLIDE 29

Metagrammar for LTAG: Classes

Tnx0Vnx1:

S NP VP

VP V⋄

  • VP

V⋄ NP ∨ VP V⋄ PP P by NP

  • Tnx0Vnx1: Subject

∧ VerbProjection ∧ (Object ∨ by-Phrase) Tnx0Vnx1: nx0V ∧ (Object ∨ by-Phrase) Subject VerbProjection Object by-Phrase nx0V Tnx0Vnx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 29 19

slide-30
SLIDE 30

Metagrammar for LTAG: Class hierarchies

There are very many possible class hierarchies ...

Subject WhNP+EmptyWord Object BaseSubject WhSubject WhObject BaseObject VerbProjection alphanx0V alphaW0nx0V Tnx0V alphaW0nx0Vnx1 alphanx0Vnx1 alphaW1nx0Vnx1 Tnx0Vnx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 30 20

slide-31
SLIDE 31

Metagrammar for LTAG: Class hierarchies

There are very many possible class hierarchies ...

Subject VerbProjection Object nx0V alphanx0V WhNP+EmptyWord nx0Vnx1 Wnx0Vnx1 alphanx0Vnx1 alphaW0nx0V alphaW0nx0Vnx1 alphaW1nx0Vnx1 Tnx0V Tnx0Vnx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 31 20

slide-32
SLIDE 32

Metagrammar for LTAG: Class hierarchies

There are very many possible class hierarchies ...

WhNP+EmptyWord BaseSubject WhSubject WhObject BaseObject Subject VerbProjection Object Tnx0V Tnx0Vnx1

[1]

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 32 20

slide-33
SLIDE 33

Metagrammar for LTAG: Class hierarchies

There are very many possible class hierarchies ...

Subject WhNP+EmptyWord Object BaseSubject WhSubject WhObject BaseObject VerbProjection Tnx0V Tnx0Vnx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 33 20

slide-34
SLIDE 34

Metagrammar for LTAG: Class hierarchies

...but not everything is possible: alphanx0Vnx1 alphaW0nx0Vnx1 alphanx1Vbynx0 alphaW1nx1Vbynx0 Tnx0nx1

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 34 21

slide-35
SLIDE 35

Let’s play with XMG

Subject VerbProjection Object by-Phrase nx0V Tnx0Vnx1

=⇒

1

class alphanx0v

2

import VerbProjection[]

3

declare ?Subj

4

{

5

?Subj = Subject[];

6

?Subj.?VP = ?VP

7

}

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 35 22

slide-36
SLIDE 36

Let’s play with XMG

S NP↓ VP

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 36 23

slide-37
SLIDE 37

Let’s play with XMG

S NP↓ VP

1

class Subject

2

export ?S

3

declare ?S ?NP ?VP

4

{ <syn>{

5

node ?S [cat=s]{

6

node ?NP (mark=subst) [cat=np]

7

node ?VP [cat=vp]

8

}

9

}

10

}

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 37 23

slide-38
SLIDE 38

eXtensible Metagrammar (XMG): Example

S NP↓ VP

1

class Subject

2

export ?S

3

declare ?S ?NP ?VP

4

{ <syn>{

5

node ?S [cat=s];

6

node ?NP (mark=subst) [cat=np];

7

node ?VP [cat=vp];

8

?S -> ?NP;

9

?S -> ?VP;

10

?NP >> ?VP

11

}

12

}

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 38 24

slide-39
SLIDE 39

eXtensible Metagrammar (XMG): Example

S NP↓ VP VP V⋄ |= S NP↓ VP V⋄

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 39 25

slide-40
SLIDE 40

eXtensible Metagrammar (XMG): Example

S NP↓ VP VP V⋄ |= S NP↓ VP V⋄

1

class alphanx0V

2

import VerbProjection[]

3

declare ?Subj

4

{

5

?Subj = Subject[];

6

?Subj.?VP = ?VP

7

}

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 40 25

slide-41
SLIDE 41

eXtensible Metagrammar (XMG): Example

S NP↓ VP VP V⋄ VP V⋄ NP↓ |= S NP↓ VP V⋄ NP↓

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 41 26

slide-42
SLIDE 42

eXtensible Metagrammar (XMG): Example

S NP↓ VP VP V⋄ VP V⋄ NP↓ |= S NP↓ VP V⋄ NP↓

1

class alphanx0Vnx1

2

import VerbProjection[]

3

declare ?Subj

4

{

5

?Subj = Subject[];

6

?Subj.?VP = ?VP

7

?Obj = Object[];

8

?Obj.?V = ?V

9

}

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 42 26

slide-43
SLIDE 43

eXtensible Metagrammar (XMG): Further examples

tree families agreement, case marking passive extraction

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 43 27

slide-44
SLIDE 44

Adjacent topics

LTAG + Metagrammar = Constructionist Grammar grammar induction from treebanks[5,6,11,13] automatic metagrammar factorization of templates

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 44 28

slide-45
SLIDE 45

Tomorrow

Mon: introduction to grammar engineering and XMG Tue: implementing syntax with XMG Wed: implementing semantics with XMG Thu: parsing implemented grammars with TuLiPA Fri: conclusion

Kallmeyer, Lichte, Osswald & Petitjean (HHU Düsseldorf) 45 29

slide-46
SLIDE 46

[1] Alahverdzhieva, Katya. 2008. XTAG using XMG. A core Tree-Adjoining Grammar for

  • English. University of Nancy 2 / University of Saarland Master’s Thesis.

http://homepages.inf.ed.ac.uk/s0896251/pubs/msc-sb2008.pdf.

[2] Becker, Tilman. 1994. Hytag: a new type of tree adjoining grammars for hybrid syntactic representations of free word order languages. Universität des Saarlandes dissertation.

http://www.dfki.de/~becker/becker.diss.ps.gz.

[3] Becker, Tilman. 2000. Paterns in metarules for TAG. In Anne Abeillé & Owen Rambow (eds.), Tree Adjoining Grammars: Formalisms, linguistic analyses and processing (CSLI Lecture Notes 107), 331–342. Stanford, CA: CSLI Publications. [4] Candito, Marie-Hélène. 1996. A principle-based hierarchical representation of LTAGs. In Proceedings of the 16th international Conference on Computational Linguistics (COLING 96). Copenhagen. http://aclweb.org/anthology-new/C/C96/C96-1034.pdf. [5] Chen, John, Srinivas Bangalore & K. Vijay-Shanker. 2006. Automated extraction of Tree-Adjoining Grammars from treebanks. Natural Language Engineering 12. 251–299. [6] Chiang, David. 2000. Statistical parsing with an automatically-extracted Tree Adjoining

  • Grammar. In Proceedings of the 38th annual meeting of the Association for

Computational Linguistics, 456–463. Hong Kong. [7] Crabbé, Benoît. 2005. Représentation informatique de grammaires d’arbres fortement lexicalisées: Le cas de la grammaire d’arbres adjoints. Université Nancy 2 dissertation. [8] Crabbé, Benoit, Denys Duchier, Claire Gardent, Joseph Le Roux & Yannick Parmentier.

  • 2013. XMG: eXtensible MetaGrammar. Computational Linguistics 39(3). 1–66.

http://hal.archives-ouvertes.fr/hal-00768224/en/.

[9] Dowty, David R. 1979. Word meaning and Montague Grammar. Reprinted 1991 by Kluwer Academic Publishers. Dordrecht: D. Reidel Publishing Company.

slide-47
SLIDE 47

[10] Gazdar, Gerald. 1981. Unbounded dependencies and coordinated structure. Linguistic Inquiry 12. 155–182. [11] Kaeshammer, Miriam & Vera Demberg. 2012. German and English treebanks and lexica for Tree-Adjoining Grammars. In Nicoleta Calzolari, Khalid Choukri, Thierry Declerck, Mehmet Uğur Doğan, Bente Maegaard, Joseph Mariani, Asuncion Moreno, Jan Odijk & Stelios Piperidis (eds.), Proceedings of the eighth international Conference on Language Resources and Evaluation (LREC’12). Istanbul, Turkey: European Language Resources Association (ELRA). [12] Prolo, Carlos A. 2002. Generating the XTAG English grammar using metarules. In Proceedings of the 19th international Conference on Computational Linguistics (COLING 2002), 814–820. Taipei. Taiwan. [13] Xia, Fei. 2001. Automatic grammar generation from two different perspectives. University

  • f Pennsylvania dissertation.

http://faculty.washington.edu/fxia/papers_from_penn/thesis.pdf.

[14] XTAG Research Group. 2001. A Lexicalized Tree Adjoining Grammar for English.

  • Tech. rep. Philadelphia, PA: Institute for Research in Cognitive Science, University of

Pennsylvania.