--# -path=.:../common:../abstract:../../prelude --1 Dutch Lexical Paradigms -- -- Aarne Ranta 2009 -- -- This is an API for the user of the resource grammar -- for adding lexical items. It gives functions for forming -- expressions of open categories: nouns, adjectives, verbs. -- -- Closed categories (determiners, pronouns, conjunctions) are -- accessed through the resource syntax API, $Structural.gf$. -- -- The structure of functions for each word class $C$ is the following: -- first we give a handful of patterns that aim to cover all -- cases, from the most regular (with just one argument) to the worst. -- The name of this function is $mkC$. -- -- There is also a module [``IrregDut`` IrregDut.gf] -- which covers irregular verbs. resource ParadigmsDut = open (Predef=Predef), Prelude, ResDut, CatDut in { --2 Parameters -- To abstract over gender names, we define the following identifiers. oper masculine : Gender ; --% feminine : Gender ; --% neuter : Gender ; --% utrum : Gender ; --% de : Gender ; -- non-neutrum het : Gender ; -- neutrum nominative : Case ; -- nominative of nouns genitive : Case ; -- genitive of nouns --2 Nouns mkN : overload { mkN : (bank : Str) -> N ; -- de bank-banken, with some predictable exceptions mkN : (bit : Str) -> Gender -> N ; -- if gender is not predictable mkN : (gat, gaten : Str) -> Gender -> N ; -- worst-case for nouns mkN : (werk, plaats : N) -> N ; -- compound werkplaats mkN : (station, hal : N) -> Case -> N ; -- compound stationshal } ; -- Relational nouns need a preposition. The most common is "van". mkN2 : overload { mkN2 : N -> N2 ; -- relational noun with preposition van mkN2 : N -> Prep -> N2 -- other preposition than van } ; ---- Use the function $mkPrep$ or see the section on prepositions below to ---- form other prepositions. ---- Some prepositions are moreover constructed in [StructuralDut StructuralDut.html]. ---- ---- Three-place relational nouns ("die Verbindung von x nach y") need two prepositions. -- mkN3 : N -> Prep -> Prep -> N3 ; -- e.g. afstand + van + naar --3 Proper names and noun phrases mkPN : overload { mkPN : Str -> PN ; -- proper name mkPN : N -> PN ; -- proper name from noun } ; --2 Adjectives mkA : overload { mkA : (vers : Str) -> A ; -- regular adjective mkA : (tweed,tweede : Str) -> A ; -- with deviant second form mkA : (goed,goede,goeds,beter,best : Str) -> A ; -- irregular adjective } ; -- Invariable adjective are a special case. invarA : Str -> A ; -- adjective with just one form ---- Two-place adjectives are formed by adding a preposition to an adjective. mkA2 : A -> Prep -> A2 ; -- e.g. getrouwd + met --2 Adverbs -- Adverbs are formed from strings. mkAdv : Str -> Adv ; --2 Prepositions -- A preposition is formed from a string. mkPrep : Str -> Prep ; ---- A couple of common prepositions (always with the dative). -- van_Prep : Prep ; te_Prep : Prep ; -- --2 Verbs mkV : overload { mkV : (aaien : Str) -> V ; -- regular verb mkV : (aaien,aait : Str) -> V ; -- regular verb with third person sg pres (giving stem) mkV : (breken,brak,gebroken : Str) -> V ; -- theme of irregular verb mkV : (breken,brak,braken,gebroken : Str) -> V ; -- also past plural irregular mkV : (aai,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V ; -- almost worst-case verb, Sg2=Sg3 mkV : (aai,aait,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V ; -- worst-case verb -- To add a movable suffix e.g. "auf(fassen)". mkV : Str -> V -> V -- add movable suffix, e.g. af + stappen } ; -- To remove the past participle prefix "ge", e.g. for the verbs -- prefixed by "be-, ver-". no_geV : V -> V ; -- no participle "ge", e.g. "vertrekken" -- To add a fixed prefix such as "be-, ver-"; this implies $no_geV$. fixprefixV : Str -> V -> V ; -- add prefix such as "be"; implies no_ge zijnV : V -> V ; -- force zijn as auxiliary (default hebben) reflV : V -> V ; -- reflexive verb e.g. zich afvragen -- -- --3 Three-place verbs -- Three-place (ditransitive) verbs need two prepositions, of which -- the first one or both can be absent. mkV3 : overload { mkV3 : V -> V3 ; -- geven,(accusative),(dative) mkV3 : V -> Prep -> V3 ; -- sturen,(accusative),naar mkV3 : V -> Prep -> Prep -> V3 ; -- praten, met, over } ; ----3 Other complement patterns ---- ---- Verbs and adjectives can take complements such as sentences, ---- questions, verb phrases, and adjectives. mkV0 : V -> V0 ; --% mkVS : V -> VS ; mkVV : V -> VV ; -- with "te" auxVV : V -> VV ; -- without "te" mkV2V : overload { mkV2V : V -> Prep -> V2V ; mkV2V : V -> V2V ; } ; auxV2V : overload { -- without "te" auxV2V : V -> V2V ; auxV2V : V -> Prep -> V2V ; } ; mkV2S : overload { mkV2S : V -> Prep -> V2S ; mkV2S : V -> V2S ; } ; mkV2A : overload { mkV2A : V -> Prep -> V2A ; mkV2A : V -> V2A ; } ; mkV2Q : overload { mkV2Q : V -> Prep -> V2Q ; mkV2Q : V -> V2Q ; } ; mkVA : V -> VA ; mkVQ : V -> VQ ; -- -- mkAS : A -> AS ; -- mkA2S : A -> Prep -> A2S ; -- mkAV : A -> AV ; -- mkA2V : A -> Prep -> A2V ; -- ---- Notice: categories $AS, A2S, AV, A2V$ are just $A$, ---- and the second argument is given as an adverb. Likewise ---- $V0$ is just $V$. -- -- V0 : Type ; -- AS, A2S, AV, A2V : Type ; -- -- --. mkOrd : A -> Ord = \a -> lin Ord {s = a.s ! Posit} ; mkN = overload { mkN : (bank : Str) -> N = \a -> lin N (regNoun a) ; mkN : (bit : Str) -> Gender -> N = \a,b -> lin N (regNounG a b) ; mkN : (bit : Str) -> Gender -> Gender -> N = \a,g1,g2 -> lin N (regNounG a g1) | lin N (regNounG a g2) ; -- there are many nouns with variant genders mkN : (gat,gaten : Str) -> Gender -> N = \a,b,c -> lin N (mkNoun a b c) ; mkN : (werk,plaats : N) -> N = \werk,plaats -> lin N {s = \\n => werk.s ! NF Sg Nom + plaats.s ! n ; g = plaats.g} ; mkN : (werk,plaats : N) -> Case -> N = \werk,plaats,c -> lin N {s = \\n => werk.s ! NF Sg c + plaats.s ! n ; g = plaats.g} ; } ; mkN2 = overload { mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = "van"}) ; mkN2 : N -> Prep -> N2 = \n,p -> lin N2 (n ** {c2 = p.s}) ; } ; mkN3 n p q = lin N3 (n ** {c2 = p.s ; c3 = q.s}) ; mkPN = overload { mkPN : Str -> PN = \s -> lin PN {s = \\_ => s} ; mkPN : N -> PN = \n -> lin PN {s = \\_ => n.s ! NF Sg Nom} ; } ; masculine = Utr ; feminine = Utr ; het,neuter = Neutr ; de,utrum = Utr ; nominative = Nom ; genitive = Gen ; mkA = overload { mkA : (vers : Str) -> A = \a -> lin A (regAdjective a) ; mkA : (vers,verse : Str) -> A = \a,b -> lin A (reg2Adjective a b) ; mkA : (goed,goede,goeds,beter,best : Str) -> A = \a,b,c,d,e -> lin A (mkAdjective a b c d e) ; } ; mkPrep s = lin Prep (ss s) ; van_Prep = mkPrep "van" ; te_Prep = mkPrep "te" ; mkV = overload { mkV : (aaien : Str) -> V = \s -> lin V (v2vv (regVerb s)) ; mkV : (aaien, aait : Str) -> V = \s,t -> lin V (v2vv (smartVerb s (init t))) ; mkV : (breken,brak,gebroken : Str) -> V = \a,b,c -> lin V (v2vv (irregVerb a b c)) ; mkV : (breken,brak,braken,gebroken : Str) -> V = \a,b,c,d -> lin V (v2vv (irregVerb2 a b c d)) ; mkV : (aai,aait,aaien,aaide,aaiden,geaaid : Str) -> V = \a,b,c,d,f,g -> lin V (v2vv (mkVerb a b c d d f g)) ; mkV : (aai,aait,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V = \a,b2,b3,c,d2,d3,f,g -> lin V (v2vv (mkVerb8 a b2 b3 c d2 d3 f g)) ; mkV : Str -> V -> V = \v,s ->lin V (prefixV v s) ; mkV : V -> Str -> V = \s,v ->lin V (prefixV v s) ; ---- the same, in order matching Wiktionary-generated lexicon } ; zijnV v = lin V (v2vvAux v VZijn) ; reflV v = lin V {s = v.s ; aux = v.aux ; particle = v.particle ; prefix = v.prefix ; vtype = VRefl} ; partV = overload { partV : Str -> V -> V = \leuk,vinden -> vinden ** {particle = leuk} ; partV : V -> Str -> V = \vinden,leuk -> vinden ** {particle = leuk} ; } ; no_geV v = let vs = v.s in { s = table { VPerf => Predef.drop 2 (vs ! VPerf) ; p => vs ! p } ; prefix = v.prefix ; lock_V = v.lock_V ; particle = v.particle ; aux = v.aux ; vtype = v.vtype } ; fixprefixV s v = let vs = v.s in { s = table { VPerf => s + Predef.drop 2 (vs ! VPerf) ; p => s + vs ! p } ; prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; particle = v.particle ; vtype = v.vtype } ; zijn_V : V = lin V ResDut.zijn_V ; hebben_V : V = lin V ResDut.hebben_V ; mkV2 = overload { mkV2 : Str -> V2 = \s -> lin V2 (v2vv (regVerb s) ** {c2 = <[],False>}) ; mkV2 : V -> V2 = \s -> lin V2 (s ** {c2 = <[],False>}) ; mkV2 : V -> Prep -> V2 = \s,p -> lin V2 (s ** {c2 =