Professional Documents
Culture Documents
Bernd Kiefer
{Bernd.Kiefer}@dfki.de
S⇒
G
S ⇒ N VP ⇒
G G
S ⇒ N VP ⇒ john VP ⇒
G G G
S ⇒ N VP ⇒ john VP ⇒ john V NP ⇒
G G G G
S S
NP VP NP VP
N V NP N VP PP
john saw NP PP john V NP P NP
D N P NP saw D N in D N
the girl in D N the girl a car
a car
For i = 1 to n
For each Rj −→ ai , set C(i − 1, i, j) = true
For l = 2 to n – Length of new constituent
For i = 0 to n − l – Start of new constituent
For m = 1 to l − 1 – Length of first subconstituent
For each production Ra −→ Rb Rc
If C(i, i + m, b) and C(i + m, i + l, c) then
set C(i, i + l, a) = true
set B(i, i + l, i + m) = true
If C(1, n, S) is true, w ∈ L(G)
C B
N V D N P D N
0 john 1 saw 2 the 3 girl 4 in 5 a 6 car 7
S NP NP
N V D N P D N
0 john 1 saw 2 the 3 girl 4 in 5 a 6 car 7
VP PP
S NP NP
N V D N P D N
0 john 1 saw 2 the 3 girl 4 in 5 a 6 car 7
S NP
VP PP
S NP NP
N V D N P D N
0 john 1 saw 2 the 3 girl 4 in 5 a 6 car 7
NP
S NP
VP PP
S NP NP
N V D N P D N
0 john 1 saw 2 the 3 girl 4 in 5 a 6 car 7
S
NP VP
N V NP
john sees D N PP
the girl P NP
in D N
a car
N
john saw the girl in a car
S→ rNP VP
NP→ rD N PP
NP→ rN
NP→ rD N
NP→ rN PP
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
NP
N
john saw the girl in a car
S→ rNP VP
NP→ rD N PP
NP→ rN
NP→ rD N
NP→ rN PP
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
NP→N rPP
NP
N
john saw the girl in a car
S→ rNP VP NP→ rP NP
NP→ rD N PP
NP→ rN
NP→ rD N
NP→ rN PP
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
S→NP rVP
NP→N rPP
NP
N
john saw the girl in a car
S→ rNP VP NP→ rP NP
NP→ rD N PP VP→ rV
NP→ rN VP→ rV NP PP
NP→ rD N VP→ rV NP
NP→ rN PP V→ rsaw
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
S→NP rVP
NP→N rPP
NP VP
N V
john saw the girl in a car
S→ rNP VP NP→ rP NP
NP→ rD N PP VP→ rV
NP→ rN VP→ rV NP PP
NP→ rD N VP→ rV NP
NP→ rN PP V→ rsaw
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
S
S→NP rVP VP→V rNP PP
NP→N rPP VP→V rNP
NP VP
N V
john saw the girl in a car
S→ rNP VP NP→ rP NP
NP→ rD N PP VP→ rV
NP→ rN VP→ rV NP PP
NP→ rD N VP→ rV NP
NP→ rN PP V→ rsaw
N→ rjohn
N→ rgirl
N→ rcar
D→ rthe
D→ ra
S
S→NP rVP VP→V rNP PP
NP→N rPP VP→V rNP
NP VP
N V
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP
NP→ rD N PP VP→ rV NP→ rD N
NP→ rN VP→ rV NP PP NP→ rN
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
S→NP rVP VP→V rNP PP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN
N V D
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP
NP→ rD N PP VP→ rV NP→ rD N
NP→ rN VP→ rV NP PP NP→ rN
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
S→NP rVP VP→V rNP PP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN
N V D
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ john
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl
NP→ rN VP→ rV NP PP NP→ rN N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
S→NP rVP VP→V rNP PP NP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN
N V D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ john
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl
NP→ rN VP→ rV NP PP NP→ rN N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
VP→V NP rPP
VP
S NP→D N rPP
S→NP rVP VP→V rNP PP NP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN
N V D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl
NP→ rN VP→ rV NP PP NP→ rN N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
VP→V NP rPP
VP
S NP→D N rPP
S→NP rVP VP→V rNP PP NP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN PP→P rNP
N V D N P
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP
NP→ rN VP→ rV NP PP NP→ rN N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP
NP→ rN PP V→ rsaw N→ rjohn
N→ rjohn N→ rgirl
N→ rgirl N→ rcar
N→ rcar D→ rthe
D→ rthe D→ ra
D→ ra
S
VP→V NP rPP
VP
S NP→D N rPP
S→NP rVP VP→V rNP PP NP
NP→N rPP VP→V rNP NP→D rN PP
NP VP NP→D rN PP→P rNP
N V D N P
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
S
VP→V NP rPP
VP
S NP→D N rPP
S→NP rVP VP→V rNP PP NP NP
NP→N rPP VP→V rNP NP→D rN PP NP→D rN PP
NP VP NP→D rN PP→P rNP NP→D rN
N V D N P D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP N→ john
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N N→ rgirl
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
S
VP→V NP rPP
VP
S NP→D N rPP NP→D N rPP
S→NP rVP VP→V rNP PP NP NP
NP→N rPP VP→V rNP NP→D rN PP NP→D rN PP
NP VP NP→D rN PP→P rNP NP→D rN
N V D N P D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP N→ john P→ rin
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N N→ rgirl PP→ rP NP
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
S
VP→V NP rPP
VP PP
S NP→D N PP
r NP→D N rPP
S→NP rVP VP→V rNP PP NP NP
NP→N rPP VP→V rNP NP→D rN PP NP→D rN PP
NP VP NP→D rN PP→P rNP NP→D rN
N V D N P D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP N→ john P→ rin
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N N→ rgirl PP→ rP NP
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
NP
S
VP→V NP rPP
VP PP
S NP→D N PP
r NP→D N rPP
S→NP rVP VP→V rNP PP NP NP
NP→N rPP VP→V rNP NP→D rN PP NP→D rN PP
NP VP NP→D rN PP→P rNP NP→D rN
N V D N P D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP N→ john P→ rin
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N N→ rgirl PP→ rP NP
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
VP
NP
S
VP→V NP rPP
VP PP
S NP→D N PP
r NP→D N rPP
S→NP rVP VP→V rNP PP NP NP
NP→N rPP VP→V rNP NP→D rN PP NP→D rN PP
NP VP NP→D rN PP→P rNP NP→D rN
N V D N P D N
john saw the girl in a car
S→ rNP VP NP→ rP NP NP→ rD N PP N→ johnr P→ rin NP→ rD N PP N→ john P→ rin
r
NP→ rD N PP VP→ rV NP→ rD N N→ rgirl PP→ rP NP NP→ rD N N→ rgirl PP→ rP NP
NP→ rN VP→ rV NP PP NP→ rN N→ rcar NP→ rN PP N→ rcar
NP→ rD N VP→ rV NP NP→ rN PP NP→ rN
NP→ rN PP V→ rsaw N→ rjohn N→ rjohn
N→ rjohn N→ rgirl N→ rgirl
N→ rgirl N→ rcar N→ rcar
N→ rcar D→ rthe D→ rthe
D→ rthe D→ ra D→ ra
D→ ra
NP→N rPP
NP
NP→N rPP
S→NP rVP
NP
NP→N rPP
S→NP rVP
NP
NP→N rPP
N V
S→NP rVP
NP
NP→N rPP VP
N V
S→NP rVP
NP VP→V rNP
NP→N rPP VP
N V
NP VP→V rNP
NP→N rPP VP
N V
NP VP→V rNP
NP→N rPP VP
N V
NP VP→V rNP
NP→N rPP VP
N V D
NP VP→V rNP
N V D
N V D
N V D N
N V D N
S NP→D N rPP
N V D N
VP
S NP→D N rPP
N V D N
VP→V NP rPP
VP
S NP→D N rPP
N V D N
VP→V NP rPP
VP
S NP→D N rPP
N V D N
VP→V NP rPP
VP
S NP→D N rPP
N V D N P
VP→V NP rPP
VP
S NP→D N rPP
N V D N P
VP→V NP rPP
VP
S NP→D N rPP
N V D N P D
VP→V NP rPP
VP
S NP→D N rPP
N V D N P D
VP→V NP rPP
VP
S NP→D N rPP
N V D N P D
VP→V NP rPP
VP
S NP→D N rPP
N V D N P D N
VP→V NP rPP
VP
S NP→D N rPP
N V D N P D N
VP→V NP rPP
VP
N V D N P D N
VP→V NP rPP
VP PP
N V D N P D N
NP
VP→V NP rPP
VP PP
N V D N P D N
VP
NP
VP→V NP rPP
VP PP
N V D N P D N