3.4.1 Lexicon

Our small lexicon is made available as functor SmallLexicon (see Section A.2), exporting Get and Agreement. Get takes a word as an argument and returns a finite domain variable whose domain consists of the agreement tuples for that word (or more precisely, the integers encoding those tuples). Agreement is a DomainProduct object for the cartesian product of agreement information.

<SmallLexicon.oz>=
functor 
import Encode FS
export Get Agreement
define 
   Agreement = {New Encode.domainProduct
                init([[masc fem neut]
                      [sing plur]
                      [1 2 3]
                      [nom acc dat gen]
                      [def indef none]])}
 
   Lexicon = {Dictionary.new}
 
   proc {Enter W Desc}
      Lexicon.W := {Agreement encode(Desc $)}
   end 
 
   proc {Get W I}
      I::Agreement.range
      {FS.include I Lexicon.W}
   end 
 
   
<SmallLexicon nouns> 
   
<SmallLexicon definite articles> 
   
<SmallLexicon indefinite articles> 
   
<SmallLexicon no article> 
   
<SmallLexicon adjectives> 
end

We just enter the 4 forms of Mann in the lexicon:

<SmallLexicon nouns>=
{Enter mann    [[masc 3 sing [nom acc dat]]]}
{Enter mannes  [[masc 3 sing gen]]}
{Enter männer  [[masc 3 plur [nom acc gen]]]}
{Enter männern [[masc 3 plur dat]]}

Now all forms of the definite article der/die/das:

<SmallLexicon definite articles>=
{Enter der [[def [[masc sing 3 nom]
                  [fem  sing 3 [dat gen]]
                  [     plur 3 gen]]]]}
{Enter den [[def [[masc sing 3 acc]
                  [     plur 3 dat]]]]}
{Enter dem [[def [[[masc neut] sing 3 dat]]]]}
{Enter des [[def [[[masc neut] sing 3 gen]]]]}
{Enter die [[def [[fem sing 3 [nom acc]]
                  [    plur 3 [nom acc]]]]]}
{Enter das [[def [[neut sing 3 [nom acc]]]]]}

All forms of the indefinite article ein:

<SmallLexicon indefinite articles>=
{Enter ein [[indef [[masc sing 3 nom]
                    [neut sing 3 [nom acc]]]]]}
{Enter einen [[indef [[masc sing 3 acc]]]]}
{Enter einem [[indef [[[masc neut] sing 3 dat]]]]}
{Enter eines [[indef [[[masc neut] sing 3 gen]]]]}
{Enter eine  [[indef [[fem sing 3 [nom acc]]]]]}
{Enter einer [[indef [[fem sing 3 [dat gen]]]]]}

A dummy entry for the absence of article:

<SmallLexicon no article>=
{Enter '*no determiner*' none}

And all forms of adjective schön:

<SmallLexicon adjectives>=
{Enter schöne  [[none  [nom acc] [fem plur]]
                [def   sing [nom [acc [neut fem]]]]
                [indef plur [nom acc]]]}
{Enter schönen [[none  [[masc sing [acc gen]]
                        [fem  sing gen]
                        [plur dat]]]
                [def   [plur dat gen [masc sing acc]]]
                [indef sing [dat gen [masc acc]]]]}
{Enter schöner [[none  [[masc sing nom]
                        [fem sing [dat gen]]
                        [plur gen]]]
                [indef sing masc nom]]}
{Enter schönes [[neut sing [nom acc] [indef none]]]}
{Enter schönem [[[masc neut] sing dat none]]}


Denys Duchier
Version 1.2.0 (20010221)