Grammar Engineering Frequently Asked Questions

When I try to parse a sentence, the LKB says "probable runaway rule". How do I debug this?

The LKB gives this error when the parse chart gets too big. With grammars the size we're looking at, this only happens when a rule or set of rules can apply recursively. Since the LKB is trying to parse exhaustively (find all parses licensed by the grammar for the input string), it will keep applying the recursive rules, even if it has already found (one or more) spanning parses.

To debug this, you'll need to find the rule that is applying to itself (e.g., a unary rule whose mother and daughter are compatible with each other) and stop the recursion by making the mother and daughter incompatible. If it's a set of rules which are causing the recursion, you'll need to decide which one(s) shouldn't be legitimate daughters of the others and make them incompatible.

To figure out which rules are spinning in this way, after you've tried to parse a sentence and gotten the error, select Parse > Show parse chart from the LKB top menu. If you don't immediately see the recursive chain in the chart, scroll to the right until you do.


Back to FAQs page

Back to main course page

-- EmilyBender - 02 Nov 2004

Topic revision: r1 - 2004-11-03 - 04:42:21 - TWikiGuest
 

This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Privacy Statement Terms & Conditions