next up previous contents
Next: SEMANTICS Up: Chart Parsers Previous: CKY algorithm   Contents

Earley algorithm

The Earley algorithm does not need grammars to be in Chomsky Normal Form, and so overcomes the main disadvantage of the CKY approach. It is also an active chart parser, meaning that incomplete, as well as complete, edges are stored.

The concept of an active, or dotted, edge is introduced, where a dot is placed in the right hand side of each edge at the point in the rule where everything on it's left has been matched, and everything on it's right remains to be found. For example the edge shown in Figure 2.10 represents a grammar rule for the symbol \( s \) with the nonterminal \( np \) already been matched and with a \( vp \) yet to be found.

Once all possible edges have been added to the chart, to verify that the utterance has been accepted, the parser must merely check for the existence of an edge in the chart that starts with the root symbol and has a dot on its far right (indicating that all of the rule has been matched).

Figure 2.10: Partially recognised rule
\begin{figure}\begin{displaymath}
\begin{array}{ccccc}
s & \rightarrow & np & \bullet & vp
\end{array}\end{displaymath}\par\end{figure}


next up previous contents
Next: SEMANTICS Up: Chart Parsers Previous: CKY algorithm   Contents
Andrew P Coates (UG) 2002-07-17