diff options
| author | aarne <unknown> | 2003-11-12 12:22:53 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-11-12 12:22:53 +0000 |
| commit | eb245228482fbf9798ea6ddc01753d5a1e40b2c1 (patch) | |
| tree | 4ad6de972b986b0bce207d7b80bc1fb79153674c /grammars/resource/german | |
| parent | 54c72f5ab023c0cdac83eb28dd1f81d4cd35aeae (diff) | |
Made changes required by lock fields; not yet in Swedish and Finnish.
Diffstat (limited to 'grammars/resource/german')
| -rw-r--r-- | grammars/resource/german/DatabaseDeu.gf | 8 | ||||
| -rw-r--r-- | grammars/resource/german/Logical.gf | 5 | ||||
| -rw-r--r-- | grammars/resource/german/Paradigms.gf | 68 | ||||
| -rw-r--r-- | grammars/resource/german/Predication.gf | 12 | ||||
| -rw-r--r-- | grammars/resource/german/RestaurantDeu.gf | 4 |
5 files changed, 55 insertions, 42 deletions
diff --git a/grammars/resource/german/DatabaseDeu.gf b/grammars/resource/german/DatabaseDeu.gf index a7a8f278e..b5f41969d 100644 --- a/grammars/resource/german/DatabaseDeu.gf +++ b/grammars/resource/german/DatabaseDeu.gf @@ -1,3 +1,5 @@ +--# -path=.:../abstract:../../prelude + concrete DatabaseDeu of Database = open Prelude,Syntax,Deutsch,Predication,Paradigms,DatabaseRes in { @@ -12,7 +14,7 @@ lincat Relation = Adj2 ; Feature = Fun ; Value = NP ; - Name = ProperName ; + Name = PN ; lin LongForm sent = ss (sent.s ! True ++ "?") ; @@ -34,7 +36,7 @@ lin WithProperty A B = ModAdj B A ; - Individual = nameNounPhrase ; + Individual n = nameNounPhrase n ** {lock_NP = <>} ; AllN = DetNP AllDet ; MostN = DetNP MostDet ; @@ -42,7 +44,7 @@ lin -- only these are language-dependent - Any = detNounPhrase einDet ; + Any n = detNounPhrase einDet n ** {lock_NP = <>} ; IsThere A = mkSentPrel ["gibt es"] (defaultNounPhrase (IndefOneNP A)) ; AreThere A = mkSentPrel ["gibt es"] (defaultNounPhrase (IndefManyNP A)) ; diff --git a/grammars/resource/german/Logical.gf b/grammars/resource/german/Logical.gf index 3347ae129..b6d3b524b 100644 --- a/grammars/resource/german/Logical.gf +++ b/grammars/resource/german/Logical.gf @@ -1,3 +1,5 @@ +--# -path=.:../abstract:../../prelude + -- Slightly ad hoc and formal negation and connectives. resource Logical = Predication ** open Deutsch, Paradigms in { @@ -12,7 +14,8 @@ resource Logical = Predication ** open Deutsch, Paradigms in { negS = \A -> PredVP ItNP (NegNP (DefOneNP (CNthatS (UseN (nRaum "Fall" "Fälle")) A))) ; univS = \A,B -> - PredVP ItNP (AdvVP (PosVS (mkV "gelten" "gilt" "gelte" "gegolten") B) + PredVP ItNP + (AdvVP (PosVS (mkV "gelten" "gilt" "gelte" "gegolten" ** {lock_VS = <>}) B) (mkPP accusative "für" (DetNP AllDet A))) ; existS = \A,B -> PredVP ItNP (PosTV (tvDir (mkV "geben" "gibt" "gib" "gegeben")) diff --git a/grammars/resource/german/Paradigms.gf b/grammars/resource/german/Paradigms.gf index d180dc281..1bfeb3fe6 100644 --- a/grammars/resource/german/Paradigms.gf +++ b/grammars/resource/german/Paradigms.gf @@ -1,3 +1,5 @@ +--# -path=.:../abstract:../../prelude + --1 German Lexical Paradigms -- -- Aarne Ranta 2003 @@ -192,7 +194,7 @@ oper -- Three-place verbs require two prepositions and cases. - mkV3 : V -> Str -> Case -> Str -> Case -> TV ; -- geben,[],dative,[],accusative + mkV3 : V -> Str -> Case -> Str -> Case -> V3 ; -- geben,[],dative,[],accusative --2 Adverbials @@ -223,20 +225,21 @@ oper -- singular defined in Types -- plural defined in Types - mkN = mkNoun ; + mkN a b c d e f g = mkNoun a b c d e f g ** {lock_N = <>} ; nGen = \punkt, punktes, punkte, g -> let { e = Predef.dp 1 punkte ; - eqy = ifTok (Gender -> N) e ; - noN = mkNoun4 punkt punktes punkte punkte + eqy = ifTok N e ; + noN = mkNoun4 punkt punktes punkte punkte g ** {lock_N = <>} } in eqy "n" noN ( eqy "s" noN ( - mkNoun4 punkt punktes punkte (punkte+"n"))) g ; + mkNoun4 punkt punktes punkte (punkte+"n") g ** {lock_N = <>})) ; nRaum = \raum, räume -> nGen raum (raum + "es") räume masculine ; nTisch = \tisch -> - mkNoun4 tisch (tisch + "es") (tisch + "e") (tisch +"en") masculine ; + mkNoun4 tisch (tisch + "es") (tisch + "e") (tisch +"en") masculine ** + {lock_N = <>}; nVater = \vater, väter -> nGen vater (vater + "s") väter masculine ; nFehler = \fehler -> nVater fehler fehler ; @@ -249,7 +252,7 @@ oper nBuch = \buch, bücher -> nGen buch (buch + "es") bücher neuter ; nMesser = \messer -> nGen messer (messer + "s") messer neuter ; nAuto = \auto -> let {autos = auto + "s"} in - mkNoun4 auto autos autos autos neuter ; + mkNoun4 auto autos autos autos neuter ** {lock_N = <>} ; nHand = \hand, hände -> nGen hand hand hände feminine ; @@ -259,10 +262,11 @@ oper } in mkN frau frau frau frau frauen frauen feminine ; - mkFun = \n -> mkFunCN (n2n n) ; - funVon = \n -> funVonCN (n2n n) ; + mkFun n = mkFunCN (UseN n) ; + funVon n = funVonCN (UseN n) ; - mkPN = \karolus, karoli -> {s = table {Gen => karoli ; _ => karolus}} ; + mkPN = \karolus, karoli -> + {s = table {Gen => karoli ; _ => karolus} ; lock_PN = <>} ; pnReg = \horst -> mkPN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ; @@ -270,37 +274,37 @@ oper mkNP = \x,y -> UsePN (mkPN x y) ; npReg = \s -> UsePN (pnReg s) ; - mkFunCN = mkFunC ; - funVonCN = funVonC ; + mkFunCN n p c = mkFunC n p c ** {lock_Fun = <>} ; + funVonCN n = funVonC n ** {lock_Fun = <>} ; - mkAdj1 = mkAdjective ; - adjInvar = Morpho.adjInvar ; - adjGen = Morpho.adjGen ; - mkAdj2 = \a,p,c -> a ** {s2 = p ; c = c} ; + mkAdj1 x y = mkAdjective x y ** {lock_Adj1 = <>} ; + adjInvar a = Morpho.adjInvar a ** {lock_Adj1 = <>} ; + adjGen a = Morpho.adjGen a ** {lock_Adj1 = <>} ; + mkAdj2 = \a,p,c -> a ** {s2 = p ; c = c ; lock_Adj2 = <>} ; - mkAdjDeg = mkAdjComp ; - aDeg3 = adjCompReg3 ; - aReg = adjCompReg ; - aPastPart = \v -> {s = table AForm {a => v.s ! VPart a}} ; + mkAdjDeg a b c = mkAdjComp a b c ** {lock_AdjDeg = <>} ; + aDeg3 a b c = adjCompReg3 a b c ** {lock_AdjDeg = <>} ; + aReg a = adjCompReg a ** {lock_AdjDeg = <>} ; + aPastPart = \v -> {s = table AForm {a => v.s ! VPart a} ; lock_Adj1 = <>} ; apReg = \s -> AdjP1 (adjGen s) ; mkV = \sehen, sieht, sieh, gesehen -> - mkVerbSimple (mkVerbum sehen (Predef.tk 1 sieht) sieh gesehen) ; - vReg = \s -> mkVerbSimple (regVerb s) ; - vSein = verbSein ; - vHaben = verbHaben ; + mkVerbSimple (mkVerbum sehen (Predef.tk 1 sieht) sieh gesehen) ** {lock_V = <>} ; + vReg = \s -> mkVerbSimple (regVerb s) ** {lock_V = <>} ; + vSein = verbSein ** {lock_V = <>} ; + vHaben = verbHaben ** {lock_V = <>} ; vPart = \sehen, sieht, sieh, gesehen, aus -> - mkVerb (mkVerbum sehen sieht sieh gesehen) aus ; - vPartReg = \sehen, aus -> mkVerb (regVerb sehen) aus ; + mkVerb (mkVerbum sehen sieht sieh gesehen) aus ** {lock_V = <>} ; + vPartReg = \sehen, aus -> mkVerb (regVerb sehen) aus ** {lock_V = <>} ; - mkTV = mkTransVerb ; + mkTV v p c = mkTransVerb v p c ** {lock_TV = <>} ; tvReg = \hören, zu, dat -> mkTV (vReg hören) zu dat ; tvDir = \v -> mkTV v [] accusative ; tvDirReg = \v -> tvReg v [] accusative ; - mkV3 = mkDitransVerb ; + mkV3 v s c t d = mkDitransVerb v s c t d ** {lock_V3 = <>} ; - mkAdV = ss ; - mkPP = prepPhrase ; - mkAdA = ss ; - mkAdS = ss ; + mkAdV a = ss a ** {lock_AdV = <>} ; + mkPP x y z = prepPhrase x y z ** {lock_AdV = <>}; + mkAdA a = ss a ** {lock_AdA = <>} ; + mkAdS a = ss a ** {lock_AdS = <>} ; } ; diff --git a/grammars/resource/german/Predication.gf b/grammars/resource/german/Predication.gf index 283718498..37572b4c1 100644 --- a/grammars/resource/german/Predication.gf +++ b/grammars/resource/german/Predication.gf @@ -1,3 +1,4 @@ +--# -path=.:../abstract:../../prelude --1 A Small Predication Library -- @@ -28,13 +29,13 @@ oper -- Individual-valued function applications. appFun1 : Fun -> NP -> NP ; -- one-place function: "the successor of x" - appFun2 : Fun -> NP -> NP -> NP ; -- two-place function: "the line from x to y" + appFun2 : Fun2 -> NP -> NP -> NP ; -- two-place function: "the line from x to y" appFunColl : Fun -> NP -> NP -> NP ; -- collective function: "the sum of x and y" -- Families of types, expressed by common nouns depending on arguments. appFam1 : Fun -> NP -> CN ; -- one-place family: "divisor of x" - appFam2 : Fun -> NP -> NP -> CN ; -- two-place family: "line from x to y" + appFam2 : Fun2 -> NP -> NP -> CN ; -- two-place family: "line from x to y" appFamColl : Fun -> NP -> NP -> CN ; -- collective family: "path between x and y" -- Type constructor, similar to a family except that the argument is a type. @@ -65,10 +66,10 @@ oper predV1 = \F, x -> PredVP x (PosV F) ; predV2 = \F, x, y -> PredVP x (PosTV F y) ; predVColl = \F, x, y -> PredVP (conjNP x y) (PosV F) ; - predA1 = \F, x -> PredVP x (PosA F) ; + predA1 = \F, x -> PredVP x (PosA (AdjP1 F)) ; predA2 = \F, x, y -> PredVP x (PosA (ComplAdj F y)) ; predAComp = \F, x, y -> PredVP x (PosA (ComparAdjP F y)) ; - predAColl = \F, x, y -> PredVP (conjNP x y) (PosA F) ; + predAColl = \F, x, y -> PredVP (conjNP x y) (PosA (AdjP1 F)) ; predN1 = \F, x -> PredVP x (PosCN (UseN F)) ; predN2 = \F, x, y -> PredVP x (PosCN (AppFun F y)) ; predNColl = \F, x, y -> PredVP (conjNP x y) (PosCN (UseN F)) ; @@ -85,7 +86,8 @@ oper disjS = \A, B -> ConjS OrConj (TwoS A B) ; implS = \A, B -> SubjS IfSubj A B ; - ifThenS = \A,B -> SubjS IfSubj A {s = \\o => "then" ++ B.s ! o} ; --- not in Res + ifThenS = \A,B -> + SubjS IfSubj A {s = \\o => "then" ++ B.s ! o ; lock_S = <>} ; --- not in Res constrTyp1 = \F, A -> AppFun F (IndefManyNP A) ; diff --git a/grammars/resource/german/RestaurantDeu.gf b/grammars/resource/german/RestaurantDeu.gf index 3a6d6f8d6..8517533b1 100644 --- a/grammars/resource/german/RestaurantDeu.gf +++ b/grammars/resource/german/RestaurantDeu.gf @@ -1,3 +1,5 @@ +--# -path=.:../abstract:../../prelude + concrete RestaurantDeu of Restaurant = DatabaseDeu ** open Prelude,Paradigms,Deutsch,DatabaseRes in { @@ -10,7 +12,7 @@ lin Japanese = apReg "Japanisch" ; address = funVon (nFrau "Adresse") ; - phone = funVon (nFrau "Rufnummer") ; ---- + phone = funVon (nFrau "Rufnummer") ; --- priceLevel = funVon (nFrau "Preisstufe") ; Cheap = aReg "billig" ; |
