mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 02:02:51 -06:00
Made changes required by lock fields; not yet in Swedish and Finnish.
This commit is contained in:
@@ -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)) ;
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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 = <>} ;
|
||||
} ;
|
||||
|
||||
@@ -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) ;
|
||||
|
||||
|
||||
@@ -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" ;
|
||||
|
||||
Reference in New Issue
Block a user