<< Prev | - Up - |
The top-down program is better.
We used this same grammar with our bottom-up recognizer --- and we saw that it was very easy to grind bottomup_recognizer.pl
into the dust (see Section 6.4). Try this example sentence again:
``Jules believed the robber who shot Marsellus fell. ''
The bottom-up recognizer takes a long time on this examples. But the top-down program handles it without problems:
recognize_bottomup([jules,believed,the,robber,who,shot,marsellus,fell]).
recognize_topdown([jules,believed,the,robber,who,shot,marsellus,fell]).
The following sentence is not admitted by the grammar, because the last word is spelled wrong (felll instead of fell).
``Jules believed the robber who shot Marsellus felll.''
Unfortunately it takes our bottom-up recognizer a long time to find that out, and hence to reject the sentence. The top-down program is far better:
recognize_bottomup([jules,believed,the,robber,who,shot,marsellus,felll]).
recognize_topdown([jules,believed,the,robber,who,shot,marsellus,felll]).
<< Prev | - Up - |