How does a chart for an ambigous sentence look for an Earley Parser

92 views Asked by At

I've got a pretty basic question concerning the Earley parser: In case of syntactic ambiguity ( S -> NP VP(V NP(NP PP)) vs. S -> NP VP(VP((V NP) PP) ), are both parses stored in one chart or in two?

the grammar im talking about is the following:

S -> VP NP
VP -> V VP
VP -> VP PP
NP -> NP PP
NP -> Det N
PP -> P NP

so you while parsing could either attach a PP to an NP or to an VP.

my question is detail is how the graphical chart would look like, meaning the positions of predict, scan and complete. I was assuming that both parses would be stored in one (big) chart. So S' will then be found in, let's say, s[0][8] and s[0][16] ? Is that right? An attached image or link with a graphical chart parsing through an ambigous sentence would help.

greetings

0

There are 0 answers