Previous: Allomorph Rule File, Up: Files
A grammar system includes up to two combination rules files: one for morphological combination with the suffix .mor and (optionally) one for syntactic combination with the suffix .syn.
A combination rule file consists of an initial state and any number of combi-rules, subrules, and constant definitions. A syntax rule file may contain one optional pruning-rule, one optional input-filter and one optional output-filter; a morphology rule file may contain one optional robust-rule, one optional pruning-rule and one optional output-filter.
Beginning with the rules listed up in the initial state, the rules and
their successors are processed until a result
statement with the
keyword accept
is encountered in every path. A path dies if there is no
more input (from the lexicon or from the morphology) that can be processed.
In morphology, if analysis has created no result and robust analysis has been switched on, the robust-rule will be called with the analysis surface and can create a result.
In syntax, when a new wordfom has been imported from morphology, the input-filter can take a look at its feature structuress and create new result feature structures.
If a pruning-rule is present, pruning has been activated, and the
number of current LAG states is not less than mor-pruning
(in
morphology) or syn-pruning
(in syntax), the concatenation of
the next allomorph (in morphology) or word form (in syntax) is
preceded by the following step: The feature structures of all current
LAG states are merged into a list, which is the parameter of the
pruning rule. The pruning-rule must execute a return
statement
with a list of the symbols yes
and no
. Each state in the
feature structure list corresponds to a symbol in the result list. If
the symbol is yes
, the corresponding state is preserved. If the
symbol is no
, the state is abandoned.
After analysis has completed, the output-filter can take a look at all result feature structures and create new result feature structures. This can be used to merge similar feature structures or drop some results.