next up previous contents
Next: CKY algorithm Up: PARSING Previous: Left Corner Parsers   Contents

Chart Parsers

Intuitively, backtracking is the cause for the exponential complexity of the parsers discussed so far, since if a particular subgoal cannot be solved, all the work since the most recently solved goal (for which there are still alternatives) is undone.

The two sentences in Figure 2.9 and the two grammar rules, a standard method of covering the two constructions, illustrate how all three parsing algorithms would fall down in the efficiency stakes.

Figure 2.9: Example to show redundant computation
\begin{figure}{\centering\texttt{\footnotesize Bob gave a sweet to every dentist...
...
vp & \rightarrow & dv, & np, & np
\end{array}\end{displaymath}\par\end{figure}

Consider the case where the \( vp \) of in the second sentence in Figure 2.9 is being analysed using the two rules also shown, assuming that appropriate rules exist for the \( np \), Bob.

The top rule would be analysed first and the word gave assigned to the category \( dv \), followed by the phrase every dentist being assigned to the \( np \) category. The three parsers so far would then look for the word to which starts a preposition phrase (\( pp \)). However, since the next word is a, backtracking would occur. Assuming there are no alternatives for the \( np \) every dentist, or the \( dv \) gave, the second \( vp \) rule would be examined.

At this point the word gave would be reassigned to the category \( dv \), and likewise for the \( np \) every dentist. Redundant computation has clearly been done here.

In an attempt to remove the occurrence of such redundant work, chart, or table parsing was created. These methods use a chart to store the edges of all possible parse trees, and they iteratively scan the sentence to be parsed, building up the table of all possible parses as they go. Thus no backtracking is required, and the exponential complexity of parsing has effectively been removed (although, to actually enumerate every parse would still be an exponential operation).

Two chart parsing techniques are given a brief overview below.



Subsections
next up previous contents
Next: CKY algorithm Up: PARSING Previous: Left Corner Parsers   Contents
Andrew P Coates (UG) 2002-07-17