Unification-Based Grammar Engineering
Dan Flickinger
Stanford University & Redbird Advanced Learning
danf@stanford.edu
Stephan Oepen
Oslo University
- e@ifi.uio.no
ESSLLI 2016; August 15–19, 2016
Unification-Based Grammar Engineering Dan Flickinger Stanford - - PowerPoint PPT Presentation
Unification-Based Grammar Engineering Dan Flickinger Stanford University & Redbird Advanced Learning danf@stanford.edu Stephan Oepen Oslo University oe@ifi.uio.no ESSLLI 2016; August 1519, 2016 Recognizing the Language of a Grammar
Dan Flickinger
Stanford University & Redbird Advanced Learning
danf@stanford.edu
Stephan Oepen
Oslo University
ESSLLI 2016; August 15–19, 2016
Recognizing the Language of a Grammar C, Σ, P, S
P :
✬ ✫ ✩ ✪
S → NP VP VP → V NP VP → VP PP NP → NP PP PP → P NP NP → kim | sushi | chopsticks V → snores | eats P → with All Complete Derivations
gories ∈ C, leafs with words ∈ Σ;
each local subtree of depth one.
S NP kim VP VP V eats NP sushi PP P with NP chopsticks S NP kim VP V eats NP NP sushi PP P with NP chopsticks
esslli — -aug-
Grammar Engineering (2)
Limitations of Context-Free Grammar
Agreement and Valency (For Example) That dog barks. ∗That dogs barks. ∗Those dogs barks. The dog chased a cat. ∗The dog barked a cat. ∗The dog chased. ∗The dog chased a cat my neighbors. The cat was chased by a dog. ∗The cat was chased of a dog. ...
esslli — -aug-
Grammar Engineering (3)
Structured Categories in a Unification Grammar
word
HEAD noun SPR
HEAD det
phrase
HEAD verb SPR
phrase
HEAD verb SPR
HEAD noun
‘N’ ‘S’ ‘VP’ ‘lexical’ ‘maximal’ ‘intermediate’
esslli — -aug-
Grammar Engineering (4)
Interaction of Lexicon and Phrase Structure Schemata
phrase
HEAD 1 SPR
− → 2 phrase
SPR
,
phrase
HEAD 1 SPR 2 COMPS 3
phrase
ORTH “the dog” HEAD noun
AGR 3sg
SPR
phrase
ORTH “barks” HEAD verb
AGR 1 3sg
SPR
HEAD noun
AGR 1
SPR
esslli — -aug-
Grammar Engineering (5)
The Type Hierarchy: Fundamentals
*top* *string* feat-struc *list* expression pos noun verb det *ne-list* *null* phrase root word
esslli — -aug-
Grammar Engineering (6)
Multiple Inheritance
no common descendants: they are incompatible;
stand in hierarchical relationship: they unify to subtype;
have a unique greatest common descendant. *top* animal swimmer invertebrate flyer vertebrate bee fish cod guppy
esslli — -aug-
Grammar Engineering (7)
Typed Feature Structure Subsumption
is the most general feature structure (while ⊥ is inconsistent);
Feature structure F subsumes feature structure G (F ⊑ G) iff: (1) if path p is defined in F then p is also defined in G and the type of the value
(2) all paths that are reentrant in F are also reentrant in G.
esslli — -aug-
Grammar Engineering (8)
Feature Structure Subsumption: Examples
TFS1:
a
FOO x BAR x
TFS2:
a
FOO x BAR y
TFS3:
b
FOO y BAR x BAZ x
TFS4:
a
FOO 1 x BAR 1
Signature *top* a b x y Feature structure F subsumes feature structure G (F ⊑ G) iff: (1) if path p is defined in F then p is also defined in G and the type of the value
(2) all paths that are reentrant in F are also reentrant in G.
esslli — -aug-
Grammar Engineering (9)
Typed Feature Structure Unification
structure which retains all information which they individually contain;
the unification of two structures F and G is the most general TFS which is subsumed by both F and G (if it exists).
esslli — -aug-
Grammar Engineering (10)
Typed Feature Structure Unification: Examples
TFS1:
a
FOO x BAR x
TFS2:
a
FOO x BAR y
TFS3:
b
FOO y BAR x BAZ x
TFS4:
a
FOO 1 x BAR 1
Signature *top* a b x y
TFS1 ⊓ TFS2 ≡ TFS2 TFS1 ⊓ TFS3 ≡ TFS3 TFS3 ⊓ TFS4 ≡
b
FOO 1 y BAR 1 BAZ x
esslli — -aug-
Grammar Engineering (11)
Notational Conventions
< a, b > ≡ [ FIRST a, REST [ FIRST b, REST *null* ] ]
< a ... > ≡ [ FIRST a, REST *list* ]
<! a !> ≡ [ LIST [ FIRST a, REST #tail ], LAST #tail ]
esslli — -aug-
Grammar Engineering (12)