Linguistics 581

Earley Parsing


Homework assignment

Earley Parsing

A. Explain what gave rise to S24 and S25 for the parser chart in Figure 10.18. Note that analagous edges arise for the recognizer chart in Figure 10.17, so that the answer doesn't have anything to do with using the algorithm for parsing rather than recognition. Also note that the answer isn't just: The predicter put S24 and S25 there. Why does the predictor put S24 and S25 in the chart? Don't be a scared to look at the algorithm in Figure 10.16 to get your answer.

B. For this next part, use the following grammar

S -> NP VP
S -> Aux NP VP
NP -> Det Nom
Nom -> N Nom
NP -> ProperNoun
NP -> NP PP
VP -> Verb
VP -> Verb NP
Det -> this | that | a
Noun -> book | flight | meal | money
Verb => book | include | prefer | landed
ProperNoun => Houston | TWA | Denver
but add the word landed as a Verb and the city Denver as a proper name. This means the Verb and Proper-Noun rules in the second column are now:

Note that not all the NP rules are together and not all the Nominal rules are together in the grammar. Make sure when you run through the algorithm you use all possible rules for each category.

Also the grammar has a bug in it. It mentions pp and prep but has no rules connecting the two. Here's the rule you should use.

Be an Earley parser. Parse the sentence:

Show the Earley parsing chart in the same format as is used in Figure 10.18. Assign names to all the edges and show them. Organize the edges, as in Figure 10.18, according to what index they end at. But don't try to give them in the order they're created.

C. Now be an Earley parser and parse the NP part of:

This means I only need to see the chart up to chart[6] (all the edges ending at index 6, the one right after the word Denver).

D. Extra for programmer types. Exercise 10.4, p. 394.