next up previous contents
Next: Tracing and Debugging Up: Control in FUF Previous: Wait and Constituent Traversal

Conditional-Evaluation with Ignore

The ignore control annotation allows the grammar writer to evaluate certain decisions only under certain conditions. The idea is to just ignore certain decisions when there is not enough information, there is already enough information or there is not enough resources left. The 3 cases correspond to the annotations:

          

(alt (:ignore-when <path> ...) ...) (alt (:ignore-unless <path> ...) ...) (alt (:ignore-after <number>) ...)

Ignore-when is triggered when the paths listed in the annotation are already instantiated. It is used to check that the input already contains information and the grammar does not have to re-derive it.

Ignore-unless is triggered when a path is not instantiated. It is used when the input does not contain enough information at all, and the grammar can therefore just choose an arbitrary default. A real example of the use of ignore-unless is given below.

Ignore-after is triggered after a certain number of backtracking points have been consumed. It indicates that the decision encoded by the disjunction is a detail refinement that is not necessary to the completion of the unification, but would just add to its appropriateness or value. IGNORE-AFTER IS NOT IMPLEMENTED IN FUF5.2

 One characteristics of these annotations is that their evaluation may depend on the order in which evaluation proceeds. Since this order is not known to the grammar writer, their use can be delicate. To prevent unpredictable variations, the ignore annotations should be used in conjunction with wait, since wait establishes constraints on when a decision is evaluated. Therefore a wait annotation has priority over an ignore when both occur in the same alt. Adding a wait annotation can often ensure that the ignore annotation will only be considered when it is relevant.

The following example is extracted from grammar gr10. It is actually the same case of verb ellipsis in conjunction presented in the section on wait above. In this decision, we also want to specify that the whole decision of whether to use ellipsis or not is only relevant in the case of a conjunction of clauses. This is expressed by addition the ignore-unless annotation as shown in the following figure:

          

;; In conjunction: do verb ellipsis? ;; This decision ONLY applies to CLAUSEs. ;; Ignore it in conjunctions of NPs and other cats. (alt verb-ellipsis (:wait process) (:ignore-unless ((cat clause))) (((cat clause) ({^ constituent1 process lex} {^ ^ ^ ^ constituent2 process lex}) ({^ constituent2 process gap} yes) (verbal-ellipsis yes)) ((verbal-ellipsis no)))))


next up previous contents
Next: Tracing and Debugging Up: Control in FUF Previous: Wait and Constituent Traversal
Michael Elhadad - elhadad@cs.bgu.ac.il