13.1.3 Organising the lexicon

As already mentioned, unification-based grammars tend to concentrate information in the lexicon rather than in the syntactic rules. It is therefore particularly important to structure the lexicon and minimise redundancy. To do this a common practice consists in (i) introducing abbreviations for feature terms i.e. "macros" and (ii) structuring these macros into an inheritance hierarchy.

Here is a simple example. We have first to specify the set of features of different types of feature terms. The symbol @ prefixes type or macro names.

  
  @type.verb: unit(cat:_
                   phon:_  
                   subcat:_  
                   form:_  
                   agr:@type.agr)
  @type.phrase: unit(cat:_  
                   phon:_  
                   agr:@type.agr)
  @type.agr: unit(nb:_  
                  gender:_
                  'case':_  
                  pers:_) 

Next, define macros for feature terms of a particular type.

  @verb(X):    @type.verb(X), 
               X.cat=v
  @finite(X):  @verb(X),  
               X.form=finite
  @intrans(X): @verb(X),  
               X.subcat = [Y], 
               type.phrase(Y), 
               Y.cat=np,  
               Y.agr.'case'=nom
  @3pers(X):   X.agr.pers=3
  @sg(X):      X.agr.nb=sg
 
  runs(X): @finite(X), @intrans(X), @3pers(X), @sg(X)

In this lexicon, the feature term associated with "runs" is defined by a set of macros and a path equation. The path equation says that the semantics of "runs" is the predicate "run"; the macros @intrans says that intransitive verbs subcategorise for a single element namely an np in the nominative case. Further it inherits from @verb which requires that the category be a verb. The rest should be self-explanatory.

Macros and inheritance can be implemented in Oz using procedural abstraction: macros are procedure which when called (recursively) expand the current feature term. Here is an example:

<Lexicon >=
declare 
Type = type(verb:fun{$}
                    unit(cat:_  
                         phon:_
                         agr:{Type.agr}
                         subcat:_  
                         form:_ )
                 end 
 
            phrase:fun{$}
                      unit(cat:_
                           phon:_  
                           agr:{Type.agr})
                   end 
            agr: fun{$}
                    unit(nb:_  
                         gender:_
                         'case':_  
                         pers:_)
                 end 
            )
 
proc{Verb X}
   X ={Type.verb}
   X.cat = v
end 
 
proc{Finite X}
   {Verb X}
   X.form = finite
end 
 
proc{Intrans X}
   {Verb X}
    Y  
in  
    X.subcat = [Y]
    Y={Type.phrase}
    Y.cat = np
end 
 
proc{ThirdSg X}
   X.agr.pers=3
   X.agr.nb=sg
end 
 
fun{PhonToCat Phon}
   X
in 
   case Phon
   of runs then  
      {Finite X} {Intrans X} {ThirdSg X}  
   end  
   X.phon=Phon
   X  
end 
 
/*
 
declare X in {Browse {PhonToCat runs}}
 
*/


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