Historically, lexical rules were not allowed to apply recursively, because it was unclear how such recursive applications were to be implemented. For example, if the effect of all lexical rules is compiled off-line, recursive lexical rules cannot be applied because an infinite lexicon might result. An alternative approach in which lexical rules are treated as non-branching syntax rules gives rise to a similar problem during parsing: non-branching derivations of unbounded length can easily surface.
The basic insight behind our implementation was that the problem is less severe: typically both the input and the output of the lexical rule applications is known. For example, consider a lexical rule that adds adjuncts to a subcat list. Given that there can be an unbounded number of adjuncts for any given verb, such a lexical rule must apply recursively. This does not neccessarily lead to problems, because, of course, in any given sentence there is a given number of adjuncts which determines the number of times the lexical rule can be applied. Using insights from logic programming (delayed evalution of complex constraints) it becomes feasible to implement this intuition.
In our previous work, complex constraints were produced (on the basis of a number of lexical rules) by hand, for two reasons. Firstly this enabled the use of delayed evaluation. Secondly, this allowed control to be added concerning the interaction of lexical rules (for example: to state that a lexical rule applies obligatorily, to reduce the number of spurious ambiguities, etc.).
Here we show that such complex constraints can be derived automatically. Thus, on the basis of a set of lexical rules (in a traditional format) an equivalent definite-clause program can be constructed in which simple annotations are provided to enable delayed evaluation. This result generalizes our previous work, and solves the first problem.
In order to solve the second problem, we allow an (optional) finite-state control over the applications of lexical rules. This can be incorporated in the compilation straightforwardly.