next up previous contents
Next: Logical Variable Macro Compilation Up: Description Compilation Previous: Code Generation   Contents


ALE Lexical Rule Compilation

[User's Manual]
[Code]
Lexical rules are formulated in the form of lex_rule/2 predicates. These rules, which represent redundancies in the lexicon, operate on a subset of the items in the lexicon modifying their categories and/or their phonology/spelling. There are two lexical rule packages: one that belongs to ALE, and another that comes with the TRALE extension. This section deals with ALE lexical rules, which have the following format:

<RuleName> lex_rule <RewriteRule> morphs <MorphologicalRule>.
For more information on the syntax of lexical rules, refer to the user's guide.

During compilation, the predicate lex_rule/8 is called, when appropriate, to close the lexicon under the available lexical rules. This process simply involves threading together the input and output descriptions with procedural attachments and the phonological mapping rules if they are specified. Phonological mapping rules are handled by morph/3. More specifically, morph(Morphs,WordIn,WordOut) converts WordIn to a list of characters; then it calls morph_chars/3 to apply a pattern specified in Morphs, and finally it converts the resulting character list back to a word unifying it with WordOut. If Morphs contains more than one pattern, morph_chars/3 uses the first one that applies and succeeds.


next up previous contents
Next: Logical Variable Macro Compilation Up: Description Compilation Previous: Code Generation   Contents
TRALE Reference Manual