Upload
vukien
View
291
Download
4
Embed Size (px)
Citation preview
Natural Language Processing
>> Syntax << >> from transformation to unification <<
part III
Prof. Dr. Bettina Harriehausen-Mühlbauer
Univ. of Applied Sciences, Darmstadt, Germany
https://www.fbi.h-da.de/organisation/personen/harriehausen-muehlbauer-bettina.html
winter / fall 2015/2016
41.4268
content
1 What is syntax ?
2 Grammar theories and formalisms
• Dependency Grammar
• Transformational Grammar
• Phrase Structure Grammar (RTNs / ATNs)
• Case Grammar
• Unification Based Grammar
Unification Grammar (chapter 11.4 Jurafsky / Martin)
Unification Grammar
5. Unification Grammar / Unification Based Grammar
• constraint-based grammar formalisms are also often subsumed under the term unification grammars
Background:
• parallel development in: Computational Linguistics, Theoretical Linguistics, A.I. (ATNs)
• Unification is used to control the flow of data
• in theorem proving • knowledge representation • theory about data types
Unification Grammar
Genealogy of grammar theories (and their influence on A.I.
Unification Grammar
How did it all start?
• ATN
• Joan Bresnan: lexically oriented, non-transformational grammar (later: Bresnan/Kaplan: LFG - lexical functional grammar)
• Martin Kay: FUG (functional unification grammar)
• Alan Colmerauer: Q-system / „metamorphosis grammar formalisms“
• Pereira/Warren: DCG (definite clause grammar) – based on PROLOG
• others: „Slot-“, „Extraposition-“, „Gapping-“ grammars
Unification Grammar
What does a unification based formalism have to offer?
• = a tool for the exact description of natural language.
• it has to limit the class of possible natural languages
• offer a „characterization“ of natural language, which the computer can interpret
• linguistic adequacy
• computational efficiency -----------------------------------
• has to concentrate on the surface structure
• has to carry information
• has to be declarative
• has to be „complex-feature-based“ (*)
(*): The information elements, which are based on complex feature bundles, are differently called in different theories: „attribute-value-matrices“, „f-structures“ (LFG), „functional structure“ (FUG), „terms“ (DCG),„feature matrices“/“feature bundles“ (GPSG), „directed (acyclic) graphs“/“dags“; structures (C-programming language).
Unification Grammar
• One essential ingredient of all these formalisms are complex formal descriptions of grammatical units (words, phrases, sentences) by means of sets of attribute-value pairs, so called feature terms. These feature terms can be nested, i.e., values can be atomic symbols or feature terms. ... example
• The formalisms share a uniform operation for the merging and checking of grammatical information, which is commonly referred to as unification.
• Inheritance
• no negation
Criteria for unification based grammars
Unification Grammar
These feature terms can be nested...
Adj + NP -> NP
Det + N -> NP
NP (NOM, MASC, SING)
DET(NOM, MASC, SING) NP(NOM, MASC, SING)
Adj(Nom, MASC, SING) N(NOM, MASC, SING)
the intelligent boy
Case:
Number:
Gender:
+ + +
cover indicator:
CANUGE
• One essential ingredient of all these formalisms is complex formal descriptions of grammatical units (words, phrases, sentences) by means of sets of attribute-value pairs, so called feature terms. These feature terms can be nested, i.e., values can be atomic symbols or feature terms. ...
• The formalisms share a uniform operation for the merging and checking of grammatical information, which is commonly referred to as unification. -> shown in error checking
• Inheritance (the head principle !)
• no negation example
Unification Grammar
No negation
Counter example: Declination type as (non-unifiable) feature
der alte Mann ein alter Mann
(the) (old) (man) (an) (old) (man)
NOM NOM NOM NOM NOM NOM MASC MASC MASC MASC MASC MASC SING SING SING SING SING SING STRONG WEAK WEAK STRONG
Pure unification doesn‘t allow for negation!
* der alter Mann
* ein alte Mann
Unification Grammar
Example of a Unification Based Grammar :
LFG (Lexical Frunctional Grammar)
(chapter 11 Jurafsky / Martin)
Unification Grammar
LFG
Typical applications, that are based on unification:
• pattern-matching
• tests for equality (hint: rigid unification based grammars don‘t test for negation ! (problem)
• inheritance of features
• substitute for string-operations (concatenation)
additional reading:
Michael Wescoat. Practical Instructions for Working with the Formalism of Lexical Functional Grammar
Unification Grammar
LFG : The Information Domain
Formalisms based on unification use a system based on features and values as the information domain.
The elements of this domain are called feature structures (in LFG: f-structures).
e.g.: we can have a function, which maps the feature NUMBER onto the value SINGULAR and PERSON on THIRD:
NUMBER : SINGULAR PERSON : THIRD
The feature values can have embeddings:
CAT : NP
AGREEMENT :NUMBER : SINGULAR :PERSON : THIRD
= D3sg
= DNP3sg
LFG : Lexical Functional Grammar
LFG : Combinatory rules
cat: NP
head: Agreement: Number: Singular Person: third
cat: VP
form: finite
head: Subject: Agreement: Number: Singular Person: third
LFG : Combinatory rules
cat: NP
Paul
head: Agreement: Number: Singular Person: third
cat: VP
sleeps form: finite
head: Subject: Agreement: Number: Singular Person: third
cat: VP
sleep form: finite
head: Subject: Agreement: [Number: Plural]
LFG : Subcategorization in LFG (1)
Completeness: all grammatical functions which are controlled by a predicate (e.g. SUBJ, OBJ, OBJ2) are included in the corresponding F-structure.
Coherency: all grammatical functions in an F-structure, that can be controlled, are controlled by the corresponding predicate.
Sample:
OBJ [SPEC... NUMERUS ... PRED...]
OBJ2 [SPEC... NUMERUS... PRED...]
TEMP ...
PRED `love <( SUBJ), ( OBJ)>`
LFG : Subcategorization in LFG (2)
NP VP -> S
N -> NP
Det N -> NP
Vtrans NP -> VP
Vintrans -> VP
* S * S
NP VP NP VP
?
N Vtrans NP N Vintrans NP
Bob sees. Bob snores the dog.
?
LFG : control in LFG
VP‘ -> IPA VP ( zu) = + = ( inf) = c +
VP -> V (NP) VP‘
( OBJ) = ( XCOMP) =
promises: V, ( TEMP) = pres,
( PRED) =
`promise < ( SUBJ), ( XCOMP)>`
( XCOMP ZU) = c +
( XCOMP SUBJ) = ( SUBJ)
SUBJ [PRED `he`]
XCOMP SUBJ PRED `go<( SUBJ)>` ZU + INF + PRED `promise<( SUBJ), ( XCOMP)>`
LFG : agreement in LFG (1)
Adj + NP -> NP
Det + N -> NP
NP (NOM, MASC, SING)
DET(NOM, MASC, SING) NP(NOM, MASC, SING)
Adj(Nom, MASC, SING) N(NOM, MASC, SING)
the intelligent boy
BUT...
Case:
Number:
Gender:
+ + +
cover indicator:
CANUGE
LFG : agreement in LFG (2)
Counter example: Declination type as (non-unifiable) feature
der alte Mann ein alter Mann
(the) (old) (man) (an) (old) (man)
NOM NOM NOM NOM NOM NOM MASC MASC MASC MASC MASC MASC SING SING SING SING SING SING STRONG WEAK WEAK STRONG
Pure unification doesn‘t allow for negation!
* der alter Mann
* ein alte Mann