started ParadigmsGer

This commit is contained in:
aarne
2006-01-15 12:11:43 +00:00
parent 1d60c8943f
commit 85d1084343

View File

@@ -1,455 +1,488 @@
----# -path=.:../abstract:../../prelude --# -path=.:../common:../abstract:../../prelude
-- --
----1 German Lexical Paradigms --1 German Lexical Paradigms
---- --
---- Aarne Ranta 2003--2005 -- Aarne Ranta 2003--2005
---- --
---- This is an API to the user of the resource grammar -- This is an API to the user of the resource grammar
---- for adding lexical items. It gives functions for forming -- for adding lexical items. It gives functions for forming
---- expressions of open categories: nouns, adjectives, verbs. -- expressions of open categories: nouns, adjectives, verbs.
---- --
---- Closed categories (determiners, pronouns, conjunctions) are -- Closed categories (determiners, pronouns, conjunctions) are
---- accessed through the resource syntax API, $Structural.gf$. -- accessed through the resource syntax API, $Structural.gf$.
---- --
---- The main difference with $MorphoGer.gf$ is that the types -- The main difference with $MorphoGer.gf$ is that the types
---- referred to are compiled resource grammar types. We have moreover -- referred to are compiled resource grammar types. We have moreover
---- had the design principle of always having existing forms, rather -- had the design principle of always having existing forms, rather
---- than stems, as string arguments of the paradigms. -- than stems, as string arguments of the paradigms.
---- --
---- The structure of functions for each word class $C$ is the following: -- The structure of functions for each word class $C$ is the following:
---- first we give a handful of patterns that aim to cover all -- first we give a handful of patterns that aim to cover all
---- regular cases. Then we give a worst-case function $mkC$, which serves as an -- regular cases. Then we give a worst-case function $mkC$, which serves as an
---- escape to construct the most irregular words of type $C$. -- escape to construct the most irregular words of type $C$.
---- However, this function should only seldom be needed: we have a -- However, this function should only seldom be needed: we have a
---- separate module $IrregularGer$, which covers all irregularly inflected -- separate module $IrregularGer$, which covers all irregularly inflected
---- words. -- words.
----
---- The following modules are presupposed: resource ParadigmsGer = open
-- (Predef=Predef),
--resource ParadigmsGer = open Prelude,
-- (Predef=Predef), MorphoGer,
-- Prelude, CatGer
-- MorphoGer, in {
-- CatGer
-- in { --2 Parameters
----2 Parameters
---- -- To abstract over gender names, we define the following identifiers.
---- To abstract over gender names, we define the following identifiers.
-- oper
--oper Gender : Type ;
-- Gender : Type ;
-- masculine : Gender ;
-- human : Gender ; feminine : Gender ;
-- nonhuman : Gender ; neuter : Gender ;
-- masculine : Gender ;
-- feminite : Gender ; -- To abstract over case names, we define the following.
--
---- To abstract over number names, we define the following. Case : Type ;
--
-- Number : Type ; nominative : Case ;
-- accusative : Case ;
-- singular : Number ; dative : Case ;
-- plural : Number ; genitive : Case ;
--
---- To abstract over case names, we define the following. -- To abstract over number names, we define the following.
--
-- Case : Type ; Number : Type ;
--
-- nominative : Case ; singular : Number ;
-- genitive : Case ; plural : Number ;
--
---- Prepositions are used in many-argument functions for rection.
-- --2 Nouns
-- Preposition : Type ;
-- -- Worst case: give all four singular forms, two plural forms (others + dative),
-- -- and the gender.
----2 Nouns
-- mkN : (x1,_,_,_,_,x6 : Str) -> Gender -> N ;
---- Worst case: give all four forms and the semantic gender. -- mann, mann, manne, mannes, männer, männern
--
-- mkN : (man,men,man's,men's : Str) -> N ; -- The regular heuristics recognizes some suffixes, from which it
-- -- guesses the gender and the declension: "e, ung, ion" give the
---- The regular function captures the variants for nouns ending with -- feminine with plural ending "-n, -en", and the rest are masculines
---- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes"; -- with the plural "-e" (without Umlaut).
---- "fly - flies" (but "toy - toys"),
-- regN : Str -> N ;
-- regN : Str -> N ;
-- -- The 'almost regular' case is much like the information given in an ordinary
---- In practice the worst case is just: give singular and plural nominative. -- dictionary. It takes the singular and plural nominative and the
-- -- gender, and infers the other forms from these.
-- mk2N : (man,men : Str) -> N ;
-- reg2N : (x1,x2 : Str) -> Gender -> N ;
---- All nouns created by the previous functions are marked as
---- $nonhuman$. If you want a $human$ noun, wrap it with the following
---- function: {-
-- -- Often it is enough with singular and plural nominatives, and singular
-- genderN : Gender -> N -> N ; -- genitive. The plural dative
-- -- is computed by the heuristic that it is the same as the nominative this
----3 Compound nouns -- ends with "n" or "s", otherwise "n" is added.
----
---- All the functions above work quite as well to form compound nouns, nGen : Str -> Str -> Str -> Gender -> N ; -- punkt,punktes,punkt
---- such as "baby boom".
-- -- Here are some common patterns. Singular nominative or two nominatives are needed.
-- -- Two forms are needed in case of Umlaut, which would be complicated to define.
----3 Relational nouns -- For the same reason, we have separate patterns for multisyllable stems.
---- --
---- Relational nouns ("daughter of x") need a preposition. -- The weak masculine pattern $nSoldat$ avoids duplicating the final "e".
--
-- mkN2 : N -> Preposition -> N2 ; nRaum : (_,_ : Str) -> N ; -- Raum, (Raumes,) Räume (masc)
-- nTisch : Str -> N ; -- Tisch, (Tisches, Tische) (masc)
---- The most common preposition is "of", and the following is a nVater : (_,_ : Str) -> N ; -- Vater, (Vaters,) Väter (masc)
---- shortcut for regular, $nonhuman$ relational nouns with "of". nFehler : Str -> N ; -- Fehler, (fehlers, Fehler) (masc)
-- nSoldat : Str -> N ; -- Soldat (, Soldaten) ; Kunde (, Kunden) (masc)
-- regN2 : Str -> N2 ;
-- -- Neuter patterns.
---- Use the function $mkPreposition$ or see the section on prepositions below to
---- form other prepositions. nBuch : (_,_ : Str) -> N ; -- Buch, (Buches, Bücher) (neut)
---- nMesser : Str -> N ; -- Messer, (Messers, Messer) (neut)
---- Three-place relational nouns ("the connection from x to y") need two prepositions. nBein : Str -> N ; -- Bein, (Beins, Beine) (neut)
-- nAuto : Str -> N ; -- Auto, (Autos, Autos) (neut)
-- mkN3 : N -> Preposition -> Preposition -> N3 ;
-- -- Feminine patterns. Duplicated "e" is avoided in $nFrau$.
--
----3 Relational common noun phrases nStudentin : Str -> N ; -- Studentin (Studentinne)
---- nHand : (_,_ : Str) -> N ; -- Hand, Hände; Mutter, Mütter (fem)
---- In some cases, you may want to make a complex $CN$ into a nFrau : Str -> N ; -- Frau (, Frauen) ; Wiese (, Wiesen) (fem)
---- relational noun (e.g. "the old town hall of").
--
-- cnN2 : CN -> Preposition -> N2 ; -- Nouns used as functions need a preposition. The most common is "von".
-- cnN3 : CN -> Preposition -> Preposition -> N3 ;
-- mkFun : N -> Preposition -> Case -> Fun ;
---- funVon : N -> Fun ;
----3 Proper names and noun phrases
---- -- Proper names, with their possibly
---- Proper names, with a regular genitive, are formed as follows -- irregular genitive. The regular genitive is "s", omitted after "s".
--
-- regPN : Str -> Gender -> PN ; -- John, John's mkPN : (karolus, karoli : Str) -> PN ; -- karolus, karoli
-- pnReg : (Johann : Str) -> PN ; -- Johann, Johanns ; Johannes, Johannes
---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
-- -- On the top level, it is maybe $CN$ that is used rather than $N$, and
-- nounPN : N -> PN ; -- $NP$ rather than $PN$.
--
---- To form a noun phrase that can also be plural and have an irregular mkCN : N -> CN ;
---- genitive, you can use the worst-case function. mkNP : (karolus,karoli : Str) -> NP ;
--
-- mkNP : Str -> Str -> Number -> Gender -> NP ; npReg : Str -> NP ; -- Johann, Johanns
--
----2 Adjectives -- In some cases, you may want to make a complex $CN$ into a function.
--
---- Non-comparison one-place adjectives need two forms: one for mkFunCN : CN -> Preposition -> Case -> Fun ;
---- the adjectival and one for the adverbial form ("free - freely") funVonCN : CN -> Fun ;
--
-- mkA : (free,freely : Str) -> A ;
-- --2 Adjectives
---- For regular adjectives, the adverbial form is derived. This holds
---- even for cases with the variation "happy - happily". -- Non-comparison one-place adjectives need two forms in the worst case:
-- -- the one in predication and the one before the ending "e".
-- regA : Str -> A ;
-- mkAdj1 : (teuer,teur : Str) -> Adj1 ;
----3 Two-place adjectives
---- -- Invariable adjective are a special case.
---- Two-place adjectives need a preposition for their second argument.
-- adjInvar : Str -> Adj1 ; -- prima
-- mkA2 : A -> Preposition -> A2 ;
-- -- The following heuristic recognizes the the end of the word, and builds
---- Comparison adjectives may two more forms. -- the second form depending on if it is "e", "er", or something else.
-- -- N.B. a contraction is made with "er", which works for "teuer" but not
-- ADeg : Type ; -- for "bitter".
--
-- mkADeg : (good,better,best,well : Str) -> ADeg ; adjGen : Str -> Adj1 ; -- gut; teuer; böse
--
---- The regular pattern recognizes two common variations: -- Two-place adjectives need a preposition and a case as extra arguments.
---- "-e" ("rude" - "ruder" - "rudest") and
---- "-y" ("happy - happier - happiest - happily") mkAdj2 : Adj1 -> Str -> Case -> Adj2 ; -- teilbar, durch, acc
--
-- regADeg : Str -> ADeg ; -- long, longer, longest -- Comparison adjectives may need three adjective, corresponding to the
-- -- three comparison forms.
---- However, the duplication of the final consonant is nor predicted,
---- but a separate pattern is used: mkAdjDeg : (gut,besser,best : Adj1) -> AdjDeg ;
--
-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest -- In many cases, each of these adjectives is itself regular. Then we only
-- -- need three strings. Notice that contraction with "er" is not performed
---- If comparison is formed by "more, "most", as in general for -- ("bessere", not "bessre").
---- long adjective, the following pattern is used:
-- aDeg3 : (gut,besser,best : Str) -> AdjDeg ;
-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous
-- -- In the completely regular case, the comparison forms are constructed by
---- From a given $ADeg$, it is possible to get back to $A$. -- the endings "er" and "st".
--
-- adegA : ADeg -> A ; aReg : Str -> AdjDeg ; -- billig, billiger, billigst
--
-- -- The past participle of a verb can be used as an adjective.
----2 Adverbs
-- aPastPart : V -> Adj1 ; -- gefangen
---- Adverbs are not inflected. Most lexical ones have position
---- after the verb. Some can be preverbal (e.g. "always"). -- On top level, there are adjectival phrases. The most common case is
-- -- just to use a one-place adjective. The variation in $adjGen$ is taken
-- mkAdv : Str -> Adv ; -- into account.
-- mkAdV : Str -> AdV ;
-- apReg : Str -> AP ;
---- Adverbs modifying adjectives and sentences can also be formed.
-- --OLD:
-- mkAdA : Str -> AdA ; --2 Verbs
-- --
----2 Prepositions -- The fragment only has present tense so far, but in all persons.
---- -- It also has the infinitive and the past participles.
---- A preposition as used for rection in the lexicon, as well as to -- The worst case macro needs four forms: : the infinitive and
---- build $PP$s in the resource API, just requires a string. -- the third person singular (where Umlaut may occur), the singular imperative,
-- -- and the past participle.
-- mkPreposition : Str -> Preposition ; --
-- mkPrep : Str -> Prep ; -- The function recognizes if the stem ends with "s" or "t" and performs the
-- -- appropriate contractions.
---- (These two functions are synonyms.)
-- --NEW (By Harald Hammarström):
----2 Verbs --2 Verbs
---- -- The worst-case macro needs six forms:
---- Except for "be", the worst case needs five forms: the infinitive and -- x Infinitive,
---- the third person singular present, the past indicative, and the -- x 3p sg pres. indicative,
---- past and present participles. -- x 2p sg imperative,
-- -- x 1/3p sg imperfect indicative,
-- mkV : (go, goes, went, gone, going : Str) -> V ; -- x 1/3p sg imperfect subjunctive (because this uncommon form can have umlaut)
-- -- x the perfect participle
---- The regular verb function recognizes the special cases where the last
---- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z" -- But you'll only want to use one of the five macros:
---- ("fix - fixes", etc). -- x weakVerb -- For a regular verb like legen
-- -- x verbGratulieren -- For a regular verb without ge- in the perfect
-- regV : Str -> V ; -- particple. Like gratulieren, beweisen etc
-- -- x verbStrongSingen -- A strong verb without umlauting present tense.
---- The following variant duplicates the last letter in the forms like -- You'll need to supply the strong imperfect forms
---- "rip - ripped - ripping". -- as well as the participle.
-- -- x verbStrongSehen -- A strong verb that umlauts in the 2/3p sg pres
-- regDuplV : Str -> V ; -- indicative as well as the imperative. You'll
-- -- need to give (only) the 3rd p sg pres ind. in
---- There is an extensive list of irregular verbs in the module $IrregularGer$. -- addition to the strong imperfect forms and the
---- In practice, it is enough to give three forms, -- part participle.
---- e.g. "drink - drank - drunk", with a variant indicating consonant -- x verbStrongLaufen -- A strong verb that umlauts in the 2/3p sg pres
---- duplication in the present participle. -- indicative but NOT the imperative. You'll
-- -- need to give (only) the 3rd p sg pres ind. in
-- irregV : (drink, drank, drunk : Str) -> V ; -- addition to the strong imperfect forms and the
-- irregDuplV : (get, got, gotten : Str) -> V ; -- part participle.
-- --
-- -- Things that are handled automatically
----3 Verbs with a particle. -- x Imperative e (although optional forms are not given)
---- -- x Extra e in verbs like arbeitete, regnet, findet, atmet.
---- The particle, such as in "switch on", is given as a string. -- NOTE: If pres. umlauting strong verbs are defined through the verbumStrong
-- -- macro (which they should) it is automatically handled so they avoid
-- partV : V -> Str -> V ; -- falling into this rule e.g er tritt (rather than *er tritet)
-- -- x s is dropped in the 2p sg if appropriate du setzt
----3 Two-place verbs -- x verbs that end in -rn, -ln rather than -en
----
---- Two-place verbs need a preposition, except the special case with direct object. -- Things that are not handled:
---- (transitive verbs). Notice that a particle comes from the $V$. -- x -ß-/-ss-
-- -- x Optional dropping of -e- in e.g wand(e)re etc
-- mkV2 : V -> Preposition -> V2 ; -- x Optional indicative forms instead of pres. subj. 2p sg. and 2p pl.
-- -- x (Weak) verbs without the ge- on the participle (in wait for a systematic
-- dirV2 : V -> V2 ; -- treatment of the insep. prefixes and stress). You have to manually use
-- -- the verbGratulieren for this. E.g do verbGratulieren "beweisen" -
----3 Three-place verbs -- verbWeak "beweisen" would yield *gebeweist.
----
---- Three-place (ditransitive) verbs need two prepositions, of which mkV : (_,_,_,_,_,_ : Str) -> V ; -- geben, gibt, gib, gab, gäbe, gegeben
---- the first one or both can be absent.
-- -- Weak verbs are sometimes called regular verbs.
-- mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
-- dirV3 : V -> Preposition -> V3 ; -- give,_,to vWeak : Str -> V ; -- führen
-- dirdirV3 : V -> V3 ; -- give,_,_
-- vGratulieren : Str -> V ; -- gratulieren
----3 Other complement patterns vSehen : (_,_,_,_,_ : Str) -> V ; -- sehen, sieht, sah, sähe, gesehen
---- vLaufen : (_,_,_,_,_ : Str) -> V ; -- laufen, lauft, liefe, liefe, gelaufen
---- Verbs and adjectives can take complements such as sentences,
---- questions, verb phrases, and adjectives. -- The verbs 'be' and 'have' are special.
--
-- mkV0 : V -> V0 ; vSein : V ;
-- mkVS : V -> VS ; vHaben : V ;
-- mkV2S : V -> Str -> V2S ;
-- mkVV : V -> VV ; -- Some irregular verbs.
-- mkV2V : V -> Str -> Str -> V2V ;
-- mkVA : V -> VA ; vFahren : V ;
-- mkV2A : V -> Str -> V2A ;
-- mkVQ : V -> VQ ; -- Verbs with a detachable particle, with regular ones as a special case.
-- mkV2Q : V -> Str -> V2Q ;
-- vPartWeak : (_,_ : Str) -> V ; -- führen, aus
-- mkAS : A -> AS ;
-- mkA2S : A -> Str -> A2S ; -- vPartGratulieren (_,_ : Str) -> V ;
-- mkAV : A -> AV ; vPartSehen : (_,_,_,_,_,_ : Str) -> V ; -- sehen, sieht, sah, sähe, gesehen
-- mkA2V : A -> Str -> A2V ; vPartLaufen : (_,_,_,_,_,_ : Str) -> V ; -- laufen, lauft, liefe, liefe, gelaufen
-- mkVPart : V -> Str -> V ; -- vFahren, aus
---- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated
---- just as synonyms of $V2$, and the second argument is given -- Obsolete; use vPartWeak etc instead
---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$. --vPart : (_,_,_,_,_ : Str) -> V ; -- sehen, sieht, sieh, gesehen, aus
---- $V0$ is just $V$. --vPartReg : (_,_ : Str) -> V ; -- bringen, um
--
-- V0, V2S, V2V, V2A, V2Q : Type ; -- Two-place verbs, and the special case with direct object. Notice that
-- AS, A2S, AV, A2V : Type ; -- a particle can be included in a $V$.
--
-- mkTV : V -> Str -> Case -> TV ; -- hören, zu, dative
----2 Definitions of paradigms
---- tvWeak : Str -> Str -> Case -> TV ; -- hören, zu, dative
---- The definitions should not bother the user of the API. So they are tvDir : V -> TV ; -- umbringen
---- hidden from the document. tvDirReg : Str -> TV ; -- lieben
----.
-- -- Three-place verbs require two prepositions and cases.
-- Gender = MorphoGer.Gender ;
-- Number = MorphoGer.Number ; mkV3 : V -> Str -> Case -> Str -> Case -> V3 ; -- geben,[],dative,[],accusative
-- Case = MorphoGer.Case ;
-- human = Masc ; -- Sentence-complement verbs are just verbs.
-- nonhuman = Neutr ;
-- masculine = Masc ; mkVS : V -> VS ;
-- feminine = Fem ;
-- singular = Sg ; -- Verb-complement verbs either need the "zu" particle or don't.
-- plural = Pl ; -- The ones that don't are usually auxiliary verbs.
-- nominative = Nom ;
-- genitive = Gen ; vsAux : V -> VV ;
-- vsZu : V -> VV ;
-- Preposition = Str ;
-- --2 Adverbials
-- regN = \ray -> --
-- let -- Adverbials for modifying verbs, adjectives, and sentences can be formed
-- ra = Predef.tk 1 ray ; -- from strings.
-- y = Predef.dp 1 ray ;
-- r = Predef.tk 2 ray ; mkAdV : Str -> AdV ;
-- ay = Predef.dp 2 ray ; mkAdA : Str -> AdA ;
-- rays = mkAdS : Str -> AdS ;
-- case y of {
-- "y" => y2ie ray "s" ; -- Prepositional phrases are another productive form of adverbials.
-- "s" => ray + "es" ;
-- "z" => ray + "es" ; mkPP : Case -> Str -> NP -> AdV ;
-- "x" => ray + "es" ;
-- _ => case ay of { -- One can also use the function $ResourceGer.PrepNP$ with one of the given
-- "sh" => ray + "es" ; -- prepositions or a preposition formed by giving a string and a case:
-- "ch" => ray + "es" ;
-- _ => ray + "s" mkPrep : Str -> Case -> Prep ;
-- }
-- } -- The definitions should not bother the user of the API. So they are
-- in -- hidden from the document.
-- mk2N ray rays ; --.
-- -}
-- mk2N = \man,men ->
-- let mens = case last men of { Gender = MorphoGer.Gender ;
-- "s" => men + "'" ; Case = MorphoGer.Case ;
-- _ => men + "'s" Number = MorphoGer.Number ;
-- } masculine = Masc ;
-- in feminine = Fem ;
-- mkN man men (man + "'s") mens ; neuter = Neutr ;
-- nominative = Nom ;
-- mkN = \man,men,man's,men's -> accusative = Acc ;
-- mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ; dative = Dat ;
-- genitive = Gen ;
-- genderN g man = {s = man.s ; g = g ; lock_N = <>} ; singular = Sg ;
-- plural = Pl ;
-- mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
-- regN2 n = mkN2 (regN n) (mkPreposition "of") ; mkN a b c d e f g = MorphoGer.mkN a b c d e f g ** {lock_N = <>} ;
-- mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ; regN : Str -> N = \hund -> case hund of {
-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ; _ + "e" => mkN hund hund hund hund (hund + "n") (hund + "n") Fem ;
-- _ + ("ion" | "ung") => mkN hund hund hund hund (hund + "en") (hund + "en") Fem ;
-- regPN n g = nameReg n g ** {lock_PN = <>} ; _ => mkN hund hund hund (genitS hund) (hund + "e") (hund + "en") Masc
-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; } ;
-- mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ;
-- lock_NP = <>} ; reg2N : (x1,x2 : Str) -> Gender -> N = \hund,hunde,g ->
-- let
-- mkA a b = mkAdjective a a a b ** {lock_A = <>} ; hunds = genitS hund ;
-- regA a = regAdjective a ** {lock_A = <>} ; hundE = dativE hund ;
-- hunden = pluralN hunde
-- mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; in
-- case <hund,hunde,g> of { -- Duden p. 223
-- ADeg = A ; ---- <_,_ + ("e" | "er"), Masc | Neutr> => -- I,IV
-- mkN hund hund hundE hunds hunde hunden g ;
-- mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ; <_ + ("el"|"er"|"en"),_ + ("el"|"er"|"en"), Masc | Neutr> => -- II
-- mkN hund hund hund hunds hunde hunden g ;
-- regADeg happy = <_,_ + "s", Masc | Neutr> => -- V
-- let mkN hund hund hund (hund + "s") hunde hunde g ;
-- happ = init happy ; <_,_ + "en", Masc> => -- VI
-- y = last happy ; mkN hund hunde hunde hunde hunde hunde g ;
-- happie = case y of { <_,_ + ("e" | "er"), Fem> => -- VII,VIII
-- "y" => happ + "ie" ; mkN hund hund hund hund hunde hunden g ;
-- "e" => happy ; <_,_ + ("n" | "s"), Fem> => -- IX,X
-- _ => happy + "e" mkN hund hund hund hund hunde hunde g ;
-- } ; _ => regN hund
-- happily = case y of { } ;
-- "y" => happ + "ily" ;
-- _ => happy + "ly" -- auxiliaries
-- } ;
-- in mkADeg happy (happie + "r") (happie + "st") happily ; genitS : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "en" | "er") => hund + "s" ;
-- duplADeg fat = _ => hund + variants {"s" ; "es"}
-- mkADeg fat } ;
-- (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ; pluralN : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "en" | "er" | "e") => hund + "n" ;
-- compoundADeg a = _ => hund + "en"
-- let ad = (a.s ! AAdj Posit) } ;
-- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ; dativE : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "en" | "er" | "e") => hund ;
-- adegA a = a ; _ => variants {hund ; hund + "e"}
-- } ;
-- mkAdv x = ss x ** {lock_Adv = <>} ;
-- mkAdV x = ss x ** {lock_AdV = <>} ; {-
-- mkAdA x = ss x ** {lock_AdA = <>} ; nGen = \punkt, punktes, punkte, g -> let {
-- e = Predef.dp 1 punkte ;
-- mkPreposition p = p ; eqy = ifTok N e ;
-- mkPrep p = ss p ** {lock_Prep = <>} ; noN = mkNoun4 punkt punktes punkte punkte g ** {lock_N = <>}
-- } in
-- mkV a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ; eqy "n" noN (
-- eqy "s" noN (
-- regV cry = mkNoun4 punkt punktes punkte (punkte+"n") g ** {lock_N = <>})) ;
-- let
-- cr = init cry ; nRaum = \raum, räume -> nGen raum (raum + "es") räume masculine ;
-- y = last cry ; nTisch = \tisch ->
-- cries = (regN cry).s ! Pl ! Nom ; -- ! mkNoun4 tisch (tisch + "es") (tisch + "e") (tisch +"en") masculine **
-- crie = init cries ; {lock_N = <>};
-- cried = case last crie of { nVater = \vater, väter -> nGen vater (vater + "s") väter masculine ;
-- "e" => crie + "d" ; nFehler = \fehler -> nVater fehler fehler ;
-- _ => crie + "ed"
-- } ; nSoldat = \soldat -> let {
-- crying = case y of { e = Predef.dp 1 soldat ;
-- "e" => case last cr of { soldaten = ifTok Tok e "e" (soldat + "n") (soldat + "en")
-- "e" => cry + "ing" ; } in
-- _ => cr + "ing" mkN soldat soldaten soldaten soldaten soldaten soldaten masculine ;
-- } ;
-- _ => cry + "ing" nBein = \bein -> declN2n bein ** {lock_N = <>};
-- } nBuch = \buch, bücher -> nGen buch (buch + "es") bücher neuter ;
-- in mkV cry cries cried cried crying ; nMesser = \messer -> nGen messer (messer + "s") messer neuter ;
-- nAuto = \auto -> let {autos = auto + "s"} in
-- regDuplV fit = mkNoun4 auto autos autos autos neuter ** {lock_N = <>} ;
-- let fitt = fit + last fit in
-- mkV fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ; nStudentin = \studentin -> declN1in studentin ** {lock_N = <>};
-- nHand = \hand, hände -> nGen hand hand hände feminine ;
-- irregV x y z = let reg = (regV x).s in
-- mkV x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ; nFrau = \frau -> let {
-- e = Predef.dp 1 frau ;
-- irregDuplV fit y z = frauen = ifTok Tok e "e" (frau + "n") (frau + "en")
-- let } in
-- fitting = (regDuplV fit).s ! VPresPart mkN frau frau frau frau frauen frauen feminine ;
-- in
-- mkV fit (fit + "s") y z fitting ; mkFun n = mkFunCN (UseN n) ;
-- funVon n = funVonCN (UseN n) ;
-- partV v p = verbPart v p ** {lock_V = <>} ;
-- mkPN = \karolus, karoli ->
-- mkV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ; {s = table {Gen => karoli ; _ => karolus} ; lock_PN = <>} ;
-- dirV2 v = mkV2 v [] ; pnReg = \horst ->
-- mkPN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ;
-- mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
-- dirV3 v p = mkV3 v [] p ; mkCN = UseN ;
-- dirdirV3 v = dirV3 v [] ; mkNP = \x,y -> UsePN (mkPN x y) ;
-- npReg = \s -> UsePN (pnReg s) ;
-- mkVS v = v ** {lock_VS = <>} ;
-- mkVV v = v ** {c2 = "to" ; lock_VV = <>} ; mkFunCN n p c = mkFunC n p c ** {lock_Fun = <>} ;
-- mkVQ v = v ** {lock_VQ = <>} ; funVonCN n = funVonC n ** {lock_Fun = <>} ;
--
-- V0 : Type = V ; mkAdj1 x y = mkAdjective x y ** {lock_Adj1 = <>} ;
-- V2S, V2V, V2Q, V2A : Type = V2 ; adjInvar a = Morpho.adjInvar a ** {lock_Adj1 = <>} ;
-- AS, A2S, AV : Type = A ; adjGen a = Morpho.adjGen a ** {lock_Adj1 = <>} ;
-- A2V : Type = A2 ; mkAdj2 = \a,p,c -> a ** {s2 = p ; c = c ; lock_Adj2 = <>} ;
--
-- mkV0 v = v ** {lock_V = <>} ; mkAdjDeg a b c = mkAdjComp a b c ** {lock_AdjDeg = <>} ;
-- mkV2S v p = mkV2 v p ** {lock_V2 = <>} ; aDeg3 a b c = adjCompReg3 a b c ** {lock_AdjDeg = <>} ;
-- mkV2V v p t = mkV2 v p ** {s4 = t ; lock_V2 = <>} ; aReg a = adjCompReg a ** {lock_AdjDeg = <>} ;
-- mkVA v = v ** {lock_VA = <>} ; aPastPart = \v -> {s = table AForm {a => v.s ! VPart a} ; lock_Adj1 = <>} ;
-- mkV2A v p = mkV2 v p ** {lock_V2A = <>} ; apReg = \s -> AdjP1 (adjGen s) ;
-- mkV2Q v p = mkV2 v p ** {lock_V2 = <>} ;
-- mkV a b c d e f = mkVerbSimple (mkVerbum a b c d e f) ** {lock_V = <>} ;
-- mkAS v = v ** {lock_A = <>} ; vWeak a = mkVerbSimple (verbumWeak a) ** {lock_V = <>} ;
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ; vGratulieren a = mkVerbSimple (verbumGratulieren a) ** {lock_V = <>} ;
-- mkAV v = v ** {lock_A = <>} ; vSehen a b c d e = mkVerbSimple (verbumStrongSehen a b c d e) ** {lock_V = <>} ;
-- mkA2V v p = mkA2 v p ** {lock_A2 = <>} ; vLaufen a b c d e = mkVerbSimple (verbumStrongLaufen a b c d e) ** {lock_V = <>} ;
--
--} ; -- vReg = \s -> mkVerbSimple (regVerb s) ** {lock_V = <>} ;
vSein = verbSein ** {lock_V = <>} ;
vHaben = verbHaben ** {lock_V = <>} ;
vFahren = mkVerbSimple (verbumStrongLaufen "fahren" "fährt" "fuhr" "führe" "gefahren") ** {lock_V = <>} ;
vPartWeak = \führen, aus -> (mkVerb (verbumWeak führen) aus) ** {lock_V = <>} ;
--vGratulieren = verbumGratulieren ** {lock_V = <>} ;
vPartSehen a b c d e aus = (mkVerb (verbumStrongSehen a b c d e) aus) ** {lock_V = <>} ;
vPartLaufen a b c d e aus = (mkVerb (verbumStrongLaufen a b c d e) aus) ** {lock_V = <>} ;
--vPart = \sehen, sieht, sieh, gesehen, aus ->
-- mkVerb (mkVerbum sehen sieht sieh gesehen) aus ** {lock_V = <>} ;
--vPartReg = \sehen, aus -> mkVerb (regVerb sehen) aus ** {lock_V = <>} ;
mkVPart v p = mkVerb v.s p ** {lock_V = <>} ;
mkTV v p c = mkTransVerb v p c ** {lock_TV = <>} ;
tvWeak = \hören, zu, dat -> mkTV (vWeak hören) zu dat ;
tvDir = \v -> mkTV v [] accusative ;
tvDirReg = \v -> tvWeak v [] accusative ;
mkV3 v s c t d = mkDitransVerb v s c t d ** {lock_V3 = <>} ;
mkVS v = v ** {lock_VS = <>} ;
vsAux v = v ** {isAux = True ; lock_VV = <>} ;
vsZu v = v ** {isAux = True ; lock_VV = <>} ;
mkAdV a = ss a ** {lock_AdV = <>} ;
mkPP x y = PrepNP {s = y ; c = x ; lock_Prep = <>} ;
mkAdA a = ss a ** {lock_AdA = <>} ;
mkAdS a = ss a ** {lock_AdS = <>} ;
mkPrep s c = {s = s ; c = c ; lock_Prep = <>} ;
-}
} ;