Slot Grammar - A specific type of Dependency...

50
Slot Grammar Slot Grammar A specific type of Dependency Grammar Kurt Eberle October 26 2017 1 / 50

Transcript of Slot Grammar - A specific type of Dependency...

Page 1: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Slot GrammarA specific type of Dependency Grammar

Kurt Eberle

October 26 2017

1 / 50

Page 2: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Outline

Slot GrammarBackgroundDesignLiteratureDependency TreesTwo Level AnalysisRealization

Data Structures and ParsingLexiconGrammar

2 / 50

Page 3: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Outline

Slot GrammarBackgroundDesignLiteratureDependency TreesTwo Level AnalysisRealization

Data Structures and ParsingLexiconGrammar

3 / 50

Page 4: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Background

HistoryI A version of Dependency GrammarI Michael McCordI from the eighties onI IBM Thomas J. Watson Research CenterI IBM research centers EuropeI Spinoff companies: Synthema (IT), linguatec, lingenio (DE)I projects:

Logic based Machine Translation (LMT),Deep analysis in Watson question answering system

I Grammars for many languages. . . ESG, GSG, FSG, . . . Italian,Spanish, Danish, Hebrew, Arabian, .̇.

4 / 50

Page 5: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Design

Design

I Design closely related to implementation issuesI Implementation in PrologI . . . and later in C

5 / 50

Page 6: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Design

Design

I Own set of fine-grained dependency relationsclassified into

I subcategorized argument slotssubj, obj, auxcomp, nobj, . . .

I free modifier slotsvadv, vsubconj, ndet, nadj, . . .

I lexicalized theoryI passivization rule, . . .

I Exptraposition handlingI . . .

6 / 50

Page 7: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Literature

LiteratureMcCord 1980 Slot Grammars

Computational Linguistics, vol. 6, pp. 31-43.McCord 1982 Using Slots and Modifiers in Logic Grammars for Natural Language

Artificial Intelligence, vol. 18, pp. 327-367.McCord 1989 Design of LMT: A Prolog-based Machine Translation System

Computational Linguistics, vol. 15, pp. 33-52.McCord 1989 A New Version of Slot Grammar

Research Report RC 14506, IBM Research Division, Yorktown HeightsMcCord 1990 Slot Grammar: A System for Simpler Construction of Practical Natural

Language Grammarsin: Proceedings of the International Symposium on Natural Language andLogic, Springer, London

McCord 2006 The Slot Grammar Lexical FormalismResearch Report RC 23977, IBM Research Division, Yorktown Heights

McCord, Cavalli-Sforza 2007 An Arabic Slot Grammar ParserProceedings of the 5th Workshop on Important Unresolved Matters,pp. 81-88,Prague, Czech Republic

McCord 2010 Using Slot GrammarResearch Report RC 23978, IBM Research Division, Yorktown Heights

McCord, Murdock, Boguraev 2012 Deep Parsing in WatsonIBM J. RES. & DEV. VOL. 56 NO. 3/4 7 / 50

Page 8: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Dependency Trees

Dependency TreesExample (’Watson Tree’)

8 / 50

Page 9: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Dependency Trees

Dependency Trees

Tree visualization:I 90 ◦ rotation, left-to-right = top-to-bottomI 4 ’columns’:

I dependency relationsI labels (slots)I node descriptions (predicates),I node descriptions (morphosyntactic and semantic features)

9 / 50

Page 10: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Dependency Trees

Dependency Trees’Columns’:

I slotsI slot names

arguments (1-pl): subj, obj, comp, auxcomp, pred, objprep, . . .modifiers (0-pl): lconj, rconj, vadv, ndet, nrel, . . .

I slot fillersn (nominal), a (adjectival), en (participle),binf (bare infinitive), p (prepositional), . . .

I word ’predicates’I word reading

(optionally with link to the corresponding word sense in thelexicon)

I ’functional’/semantic arguments(positions of the corresponding (head) words)

I node descriptions10 / 50

Page 11: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Dependency Trees

Dependency Trees

’Columns’:I slotsI word ’predicates’I node descriptions

I morphosyntactic features(PoS + subclassifyication + agreement) noun cn pl, verb vfinpres pl, . . .

I semantic types physobj artf, sta, neg, . . .

11 / 50

Page 12: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Dependency Trees

Dependency Trees

Example (LMT Tree’)

12 / 50

Page 13: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level AnalysisI syntactic levelI ’functional’ semantic level

13 / 50

Page 14: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level AnalysisExample: Passive Voice’Deep’ and ’Surface’ Structure

14 / 50

Page 15: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . .control phenomena

15 / 50

Page 16: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysisused for . . .control phenomena: subject control vs object control

16 / 50

Page 17: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysisused for . . .control phenomena in extended auxiliary structures (with/withoutpassive)

17 / 50

Page 18: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . .(local and long-distance) extraposition

18 / 50

Page 19: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysisused for . . .combining extraposition and control

19 / 50

Page 20: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . .extraposition over several levels

20 / 50

Page 21: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . .extraposition over several levels + passivization . . .

21 / 50

Page 22: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . .coordination (scope and re-entrancy) . . .

22 / 50

Page 23: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Two Level Analysis

Two Level Analysis

used for . . . extraposition and coordination . . .

23 / 50

Page 24: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Realization

I lexicon and grammarI data structuresI parsing

24 / 50

Page 25: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Data Structures and ParsingI words (’wframe’)I phrasesI parser turns lexical words into phrases and combines these

phrases to phrases representing substrings of the sentenceI only one type of phrase:

’categorial’ differences expressed by PoS-type and bydifferent/differently instantiated lists of argumentssaturated phrases: list of subcategorized arguments completelyinstantiated

I modular composition (using filler rules, extraposition rules,coordination rules, ordering constraints . . . )

I extraposition done via a second list consisting of locally notrealized and (presumably) extraposed elements

25 / 50

Page 26: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Words

Example

26 / 50

Page 27: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Phrases

27 / 50

Page 28: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

PhrasesExample

28 / 50

Page 29: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Parse Results

29 / 50

Page 30: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Lexicon

I lexical entriesI lexical rules

30 / 50

Page 31: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Words

I Lexicondifferent formats

I (Prolog) data base with word records (using defaults, seebelow: ’Watson’-version)

I Relational data base with tables for different types of lexicalinformation

→ morphological analysis→ wframe: interface to grammar

31 / 50

Page 32: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-words (’Watson’-version)Word < PoS SlotFrame SynDescrs SemDescrs

32 / 50

Page 33: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-words

ambiguities represented by alternative descriptions

33 / 50

Page 34: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-wordsI Word < PoS SlotFrame SynDescrs SemDescrsI PoS : v, n, adj, adv, . . .I SlotFrame: [SlotNameOb(Opts) : SLConds, . . . ]I Ob = obligatory (=1) / optional (∅): ex: (obj1(n) vs obj(n))I Opts = n | v | p(. . . ) . . . (PoS of filler)I SynDescrs = Boolean combination of syntactic types (ss, so,

attr, . . . )I SemDescr = conjunction of semantic types (sent obj &

artefact)I SLConds = Boolean combination of semantic types,

SynDescrs, WordDescrs

34 / 50

Page 35: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Syntactic Types

35 / 50

Page 36: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Semantic Types

Watson

36 / 50

Page 37: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Relational Database

LMT/Lingenio version

37 / 50

Page 38: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Relational Database’Secondary’ Table (built from ’primary tables, used duringmorphological analysis)

38 / 50

Page 39: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Relational Database

’Secondary’ Table (built from ’primary tables, used duringmorphological analysis)

39 / 50

Page 40: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Morphological Analysis

Result (= input to syntactic analysis)I type informationI wframe representation:

wframe(Position,Sense,FeatureDescription,SlotFrame)

40 / 50

Page 41: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Morphological Analysis

Result (= input to syntactic analysis)

41 / 50

Page 42: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Lexical rules→ applied in morphological analysis

42 / 50

Page 43: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar phrase compositionDifferent types of rules (stored in modules)

I declaration of adjunctsI Slot filler rulesI or-slot rulesI slot ordering rulesI declaration of obligatory slotsI extraposition rulesI coordination rulesI punctuation rulesI evaluation rules

43 / 50

Page 44: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-composition

44 / 50

Page 45: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-composition

45 / 50

Page 46: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-composition

46 / 50

Page 47: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-extraposition

47 / 50

Page 48: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-extraposition

I Declaration of extraposer slots(extraposer(obj) :- Conds.)

I Extraposition rules

48 / 50

Page 49: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Slot Grammar-extraposition

Example

49 / 50

Page 50: Slot Grammar - A specific type of Dependency Grammarsfs.uni-tuebingen.de/~keberle/NLPTools/slides/slotgram.pdfSlot Grammar Slot Grammar A specific type of Dependency Grammar Kurt

Slot Grammar

Realization

Weighting of rules

Evaluation RulesSlot +++ Val (:- Conds)

obj( ) +++ 3.

50 / 50