13.1.2 Path equations

In the text above, we've associated a whole feature term with a lexical word. In practice however, it is more common to use path equations. A path equation is an equation of the form:

  
  X.feat1. ... .featN = Value

where X names a feature term, feat1, ... ,featN are features and Value can either be a feature term, a path equation or a macro i.e. an abbreviation for some feature terms.

Using path equations, we can then rewrite the information associated with "she" as follows:

  
  X.cat=np
  X.agr.pers=third
  X.agr.nb=sg
  X.agr.'case'=nom

Of course in this case it is not so clear why path equations are better than feature terms. We'll see some more convincing examples in the next section where path equations are combined with macros to structure the lexicon.

Path equations can be written down immediately in Oz by using record selection. Note that the record selection on X suspends if the arity of X is unknown. In the above example, thus, X must be constrained a priori to be of the form

Label(cat:_  
       agr:Label1(pers:_  
                  nb:_   
                  'case':_  
                  ...)
            ...)

This restriction can be avoided by using feature constraints in Oz where the selecting operator is written by a hat ^ instead of the .. But using the hat will probably slow down your program. In practice it is much better to determine all arities by some types to be specified and compiled away before parsing starts.


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)