next up previous contents
Next: Writing and Modifying Grammars Up: FDs, Unification and Linearization Previous: A Simple Example of

   
Linearization

Once the unification has succeeded, the unified fd is sent to the linearizer. The linearizer works by following the directives included in the pattern  . The exact way to define these features is explained in section [*]. The linearizer works as follows:

1.
Identify the pattern feature in the top level: for ir01, it is (pattern (prot verb goal)).

2.
If a pattern is found:
(a)
For each constituent of the pattern, recursively linearize the constituent. (That means linearize PROT, VERB and GOAL).

(b)
The linearization of the fd is the concatenation of the linearizations of the constituents in the order prescribed by the pattern feature.

3.
If no feature pattern is found:
(a)
Find the lex feature of the fd, and depending on the category of the constituent, the morphological features needed. For example, if fd is of (cat verb), the features needed are: person, number, tense.

(b)
Send the lexical item and the appropriate morphological features to the morphology module  . The linearization of the fd is the resulting string. For example, if lex=``give'' and the features are the default values (as it is in ir01), the result is ``gives.''

When the fd does not contain a morphological feature, the morphology module provides reasonable defaults. More details on morphology are provided in section [*].

If a pattern contains a reference to a constituent and that constituent does not exist, nothing happens: the linearization of an empty constituent is the empty string. The following example illustrates this feature:

          
Unified FD:
((cat s)
 (pattern (prot verb goal benef))
 (prot ((cat noun) (lex `John')))
 (verb ((cat verb) (lex `like'))))

Linearized string (note that constituents GOAL and BENEF are missing): John likes.

Finally, if one of the constituent sent to the morphology is not a known morphological category, the morphology module can not perform the necessary agreements. This is indicated by the following output:    

          
Unified FD:
((cat s)
 (pattern (prot verb goal))
 (prot ((cat noun) (lex `John')))
 (verb ((cat verb) (lex `like')))
 (goal ((cat zozo) (lex `trotteur'))))

Linearized string: John likes <unknown cat ZOZO: trotteur>

In general, when you find that in your output, it means that there is something wrong in the grammar. You should check the list of legal morphological categories (see section [*]) or you should check why a high level constituent is sent to the morphology (your fd is too flat). You can use the function morphology-help to receive on-line help on which categories are known to the morphology module.  


next up previous contents
Next: Writing and Modifying Grammars Up: FDs, Unification and Linearization Previous: A Simple Example of
Michael Elhadad - elhadad@cs.bgu.ac.il