Linguistics 581

Earley Parsing and Top down parsing


Homework assignment

There are 2 problems below, labeled A and B. Parts A and B are about Earley parsing. You need to turn in written answers to both problems.

Earley Parsing

A. Explain what gave rise to 5 edges S28, S29, S33, S36, S37 in the parser chart in Figure 13.14. Note that for S28, the answer isn't just: The Scanner put S28 there. Why does the Scanner put S28 in the chart? What happens at previously created edges that leads the Scanner to create S28? Don't be scared to look at the algorithm in Figure 13.13 to get your answer. And note that the answers for these 5 edges might all be different. In other words, this question might really be 5 questions.

B. For this next part, use the following grammar

S -> NP VP
S -> Aux NP VP
NP -> Det Nom
Nom -> Noun Nom | Noun
NP -> ProperNoun
NP -> NP PP
VP -> Verb
VP -> Verb NP
PP -> Prep NP
Prep -> in | on | at | from | to
Det -> this | that | a
Noun -> book | flight | meal | money
Verb -> book | include | prefer | landed
ProperNoun -> Houston | TWA | Denver

Be an Earley parser. Parse the parse the NP part of:

  • A flight landed.
This means you only need to complete the chart up to chart[3] (all the edges ending at index 3, the one right after the word landed).

Show the Earley parsing chart in the same format as is used in Figure 13.14. Assign names like S1, S2, ... to all the edges and show them. Organize the edges, as in Figure 13.13, according to what index they end at. You should try to generate the edges in the actual order that the Earley algorithm in Figure 13.13 creates them, but I won't grade that. I will deduct for missing or incorrect edges. (Incorrect means the algorithm wouldn't actually propose such an edge; not that edge does not get used in the final parse).