You are on page 1of 1

8/3/2020 11.

4 A General Algorithm for Active Chart Parsing

<< Prev - Up - Next >>

11.4 A General Algorithm for Active Chart Parsing


A nice thing about using an agenda is that it is straightforward to specify a very
general algorithm for active chart parsing. We'll now present this algorithm. With
only minor changes --- or to be more accurate, simply by being a bit more
precise about how we are going to carry out the individual steps given below ---
it is very easy to convert this general algorithm into (say) a top-down or bottom-
up active charting parsing algorithm.

Here's the general algorithm:

1. Make initial chart and agenda.

2. Repeat until agenda is empty:

a. Take first arc from agenda.

b. Add arc to chart. (Only do this if edge is not already on the chart!)

c. Use the fundametal rule to combine this arc with arcs from the chart.
Any edges obtained in this way should be added to the agenda.

d. Make hypotheses (i.e., active edges) about new constituents based


on the arc and the rules of the grammar. Add these new arcs to the
agenda.

End repeat

3. See if the chart contains a passive edge from the first node to the last
node that has the label s. If ``yes'', succeed. If ``no'', fail.

This algorithm is very general; especially step (2d). By being more precise about
when and how we predict new hypotheses it is easy to try out different parsing
strategies. We'll soon see how 2c is carried out in the bottom-up case, and in
the next chapter we'll learn how it is carried out in the top-down case.

Actually, it's not only the way 2c is handled that leads to different concrete
algorithms. We also have to initialize the agenda slightly differently in the
bottom-up and top-down cases. That is, there are different ways of carrying out
step 1.

<< Prev - Up - Next >>

Patrick Blackburn and Kristina Striegnitz


Version 1.2.4 (20020829)

cs.union.edu/~striegnk/courses/nlp-with-prolog/html/node70.html#l9.sec.general.algorithm 1/1

You might also like