next up previous contents
Next: Bottom-up Parsing Up: TRALE Lexical Rule Compiler Previous: TRALE-EXTENSION:Step Three: Word Class   Contents


TRALE-EXTENSION:Step Four: Definite Relations

In the final step of the lexical rule compilation process, we convert the output of step three into the Prolog definite relations referred to as interaction predicates. We then alter the lexical entries to call the interaction predicates, which in turn call the lexical rule predicates. In order to avoid storing redundant interaction predicates, we collect lexical entries into word classes. That is, we determine which lexical entries are associated with the same local finite-state automaton, and alter those lexical entries to call a single interaction predicate. To do this, we translate the local finite-state automata into compound terms. This allows us to find identical finite-state automata via simple term unification.

When we assert an interaction predicate, we also assert its canonical representation. This gives us an inventory of finite-state automata represented as compound terms, which we can check any finite-state automaton against. If the local finite-state automaton associated with a particular lexical entry has already been translated to an interaction predicate (and asserted as such), we do not translate the finite-state automaton in question to an interaction predicate, retracting it instead. If, on the other hand, none of the previously asserted compound terms unify with the canonical representation of the finite-state automaton in question, we assert the compound term. Additionally, we translate the arcs of that local finite-state automaton to clauses defining an interaction predicate, asserting each clause in turn. In either case, we assert a new representation of the current lexical entry, modified to call the preexisting or newly translated interaction predicate, as the case may be.


next up previous contents
Next: Bottom-up Parsing Up: TRALE Lexical Rule Compiler Previous: TRALE-EXTENSION:Step Three: Word Class   Contents
TRALE Reference Manual