Figure 4.1 presents an intuitive example for
a very simple context-free grammar:
.
For the input string ``Ducks eat flies'', when looking for a matching
in the chart to complete a rule such as
,
the non-indexed parser first attempts to match the daughter category
with edges
and
stored in the chart. Only after these
attempts fail is the right match found. The indexed parser never
attempts the matches
and
, since its searches will
always be limited to a list containing compatible categories.
|
This example illustrates a ``perfect index'' (as the one described in Section 7.4.2). In a ``perfect'' index, all attempted unification between a daughter and all edges in the set selected by the daughter's key would be successful. Unfortunately, TFSs contain a large amount of information, not all of which is accessible before parsing, therefore a ``perfect'' index is unlikely for TFSGs. However, as it will be shown in the preliminary evaluation presented in Chapter 7, even if not all possible failed unifications are avoided, indexing can still improve parsing times.