Just-in-time Subgrammar
Extraction for HPSG
Vlado Keselj
Graduate Student Conference
Faculty of Mathematics
University of Waterloo
June 26, 2001
Vlado Keselj
slide 1
UW Math Grad Conference 2001
What is "just-in-time subgrammar
extraction”
NL text
===========
===========
===========
NL grammar
subgrammar extraction
parser
subgrammar
parsing results
Vlado Keselj
slide 2
UW Math Grad Conference 2001
Motivation
*
Vlado Keselj
Subgrammar extraction is defined within the
framework of grammar modularity.
1
managing complexity
2
parsing efficiency
3
context-based disambiguation
slide 3
UW Math Grad Conference 2001
Subgrammar Definition
Sentence:
s *
Grammar:
G(s)={(s,p1),…,(s,pn)}
Subgrammar:
any partial order: G1 G2
such that: G1 G2 implies
s*
Vlado Keselj
G1(s) G2 (s)
slide 4
UW Math Grad Conference 2001
Subgrammar Extraction Problem
Given a grammar G and a set of words W
find a minimal grammar G1 with the respect to
a subgrammar relation such that:
sW* G(s) = G1(s)
There can be no minimal grammars,
or more than one.
Vlado Keselj
slide 5
UW Math Grad Conference 2001
Subgrammar Extraction for CFGs
Context-Free Grammar: (V, , P, S)
Subgrammar definition:
G1G2 iff V1 V2, 1 2, P1 P2, S1=S2
Recipe for CFGs:
1. W
2. Apply the algorithm for removing useless
symbols* ( O(n3) time)
*E.g., Aho
Vlado Keselj
slide 6
Ullman 1979
UW Math Grad Conference 2001
HPSG Grammars
sentence
H: 2 AGR: 1 P: 3
N: sg
G: m
noun
H: AGR: 1 P: 3
N: sg
G: m
noun
H: AGR: P: 3
N: sg
G: m
verb
H: AGR: P: 3
N: sg
He
Vlado Keselj
verb
H: 2 AGR: 1 P: 3
N: sg
G: m
writes.
slide 7
UW Math Grad Conference 2001
NP Completeness for HPSGs
3-SAT problem:
(p q r) (q r s) (p q s)
t1
ASGN: p: t
(p q r)
t2
ASGN: q: f
(q r s)
t1
ASGN: q: t
(p q r)
t2
ASGN: r: t
(q r s)
t1
ASGN: r: f
(p q r)
t2
ASGN: s: f
(q r s)
start
ASGN: 1
Vlado Keselj
t1
ASGN: 1
slide 8
t2
ASGN: 1
t3
ASGN: 1
UW Math Grad Conference 2001
NP Completeness for HPSG (continued)
satisfied for: p=true q=false s=true
(p q r) (q r s) (p q s)
t1
ASGN: p: t
(p q r)
t2
ASGN: q: f
(q r s)
t1
ASGN: q: t
(p q r)
t2
ASGN: r: t
(q r s)
t1
ASGN: r: f
(p q r)
t2
ASGN: s: f
(q r s)
start
ASGN: 1 p: t
q: f
s: t
Vlado Keselj
t1
ASGN: 1 p: t
q: f
s: t
t1
ASGN: 1 p: t
q: f
s: t
slide 9
t1
ASGN: 1 p: t
q: f
s: t
UW Math Grad Conference 2001
An Approximate Efficient Solution
for HPSGs
1. remove all features from G and obtain G1
E.g., a rule: typeX
...
is mapped to: typeX
typeY1
...
typeY2
...
...
typeY1
typeY2
...
2. apply subgrammar extraction to G1 and obtain G2
3. recover features in G2 and obtain the solution G3
Running time complexity: O(size(G) . |Rule|)
Vlado Keselj
slide 10
UW Math Grad Conference 2001
Overview
•
•
•
•
•
Vlado Keselj
notion of subgrammar
notion of subgrammar extraction
efficient algorithm for CFGs
NP completeness for HPSGs
an approximate solution for HPSGs
slide 11
UW Math Grad Conference 2001
© Copyright 2026 Paperzz