mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
@@ -40,27 +40,27 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
|
|||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
ComplA2 a np =
|
ComplA2 a np =
|
||||||
let CExt = case a.c2.isPrep of {
|
let CExt = case a.c2.isPrep of {
|
||||||
isCase => <appPrepNP a.c2 np, []> ;
|
isCase => <appPrepNP a.c2 np, []> ;
|
||||||
_ => <[], appPrepNP a.c2 np> } -- HL: check 7/22
|
_ => <[], appPrepNP a.c2 np> }
|
||||||
in {
|
in {
|
||||||
s = a.s ! Posit ;
|
s = a.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = CExt ;
|
c = CExt ;
|
||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 a =
|
ReflA2 a =
|
||||||
let
|
let
|
||||||
compl = appPrep a.c2 (reflPron ! agrP3 Sg) ;
|
compl = appPrep a.c2 (reflPron ! agrP3 Sg) ;
|
||||||
CExt = case a.c2.isPrep of
|
CExt = case a.c2.isPrep of
|
||||||
{isCase => <compl, []> ; _ => <[], compl> }
|
{isCase => <compl, []> ; _ => <[], compl> }
|
||||||
in {
|
in {
|
||||||
s = a.s ! Posit ;
|
s = a.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = CExt ;
|
c = CExt ;
|
||||||
ext = []
|
ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentAP ap sc = ap ** {
|
SentAP ap sc = ap ** {
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ concrete AdverbGer of Adverb = CatGer ** open ResGer, Prelude in {
|
|||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
PositAdvAdj a = {s = a.s ! Posit ! APred} ;
|
||||||
|
|
||||||
ComparAdvAdj cadv a np =
|
ComparAdvAdj cadv a np = {
|
||||||
let nps = np.s ! False ! Nom ++ bigNP np in
|
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ np.s ! False ! Nom ++ bigNP np
|
||||||
{
|
|
||||||
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ nps
|
|
||||||
} ;
|
} ;
|
||||||
ComparAdvAdjS cadv a s = {
|
ComparAdvAdjS cadv a s = {
|
||||||
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ s.s ! Sub
|
s = cadv.s ++ a.s ! Posit ! APred ++ cadv.p ++ s.s ! Sub
|
||||||
|
|||||||
@@ -58,18 +58,15 @@ concrete CatGer of Cat =
|
|||||||
adv : Str ; -- Haus [adv auf dem Hügel]
|
adv : Str ; -- Haus [adv auf dem Hügel]
|
||||||
g : Gender
|
g : Gender
|
||||||
} ;
|
} ;
|
||||||
Pron = {s : NPForm => Str ; a : Agr} ;
|
|
||||||
|
|
||||||
-- simplified PCase to Case in NP, Det, DAP, Quant, Predet HL 8/22
|
|
||||||
NP = ResGer.NP ;
|
NP = ResGer.NP ;
|
||||||
Det = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped HL 8/22
|
Pron = {s : NPForm => Str ; a : Agr} ;
|
||||||
n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
Det = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped, HL 8/22
|
||||||
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
n : Number ; a : Adjf ; isDef, hasDefArt : Bool} ;
|
||||||
|
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef,hasDefArt : Bool} ;
|
||||||
-- HL 7/2022: first Bool = True if used to glue in Sg with preposition
|
-- HL 7/2022: first Bool = True if used to glue in Sg with preposition
|
||||||
-- second Bool is True if a cardinal number is present
|
-- second Bool is True if a cardinal number is present
|
||||||
Quant = {
|
Quant = {
|
||||||
s, sp : Bool => Bool => Number => Gender => Case => Str ;
|
s, sp : Bool => Bool => Number => Gender => Case => Str ;
|
||||||
a : Adjf ;
|
a : Adjf ;
|
||||||
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
||||||
hasDefArt : Bool
|
hasDefArt : Bool
|
||||||
@@ -145,4 +142,5 @@ concrete CatGer of Cat =
|
|||||||
Det = \det -> det.s ! False ! Masc ! Nom ;
|
Det = \det -> det.s ! False ! Masc ! Nom ;
|
||||||
Prep = \prep -> case prep.isPrep of {isPrepDefArt => prep.s ! GSg Masc ;
|
Prep = \prep -> case prep.isPrep of {isPrepDefArt => prep.s ! GSg Masc ;
|
||||||
_ => prep.s ! GPl } ;
|
_ => prep.s ! GPl } ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,15 @@ concrete ConjunctionGer of Conjunction =
|
|||||||
|
|
||||||
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||||
|
|
||||||
-- ConjNP : Conj -> ListNP' -> NP' ; -- she or we
|
ConjNP conj ss = heavyNP (
|
||||||
|
{s = \\_ => (conjunctDistrTable Case conj ss).s ;
|
||||||
ConjNP conj ss = { s = \\_ => (conjunctDistrTable Case conj { s1 = ss.s1 ; s2 = ss.s2 }).s } ** {
|
a = let n : Number = (conjNumber conj.n (numberAgr ss.a)) ;
|
||||||
a = Ag Fem (conjNumber conj.n (numberAgr ss.a)) (personAgr ss.a) ;
|
p : Person = personAgr ss.a ;
|
||||||
w = WHeavy ; ext,rc = [] } ;
|
agr : Agr = case <n,p> of {<Pl,q> => AgPl q ;
|
||||||
|
<Sg,P3> => AgSgP3 Neutr ;
|
||||||
|
<Sg,P1> => AgSgP1 ;
|
||||||
|
<Sg,P2> => AgSgP2 }
|
||||||
|
in (conjAgr agr ss.a) }) ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||||
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
|
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ oper
|
|||||||
neuter = P.neuter ;
|
neuter = P.neuter ;
|
||||||
regV = P.regV ;
|
regV = P.regV ;
|
||||||
invarA = P.invarA ;
|
invarA = P.invarA ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
hungry_VP = mkVP (P.mkA "hungrig") ;
|
hungry_VP = mkVP (P.mkA "hungrig") ;
|
||||||
thirsty_VP = mkVP (P.mkA "durstig") ;
|
thirsty_VP = mkVP (P.mkA "durstig") ;
|
||||||
@@ -42,14 +42,11 @@ lin
|
|||||||
-- some more things
|
-- some more things
|
||||||
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
||||||
|
|
||||||
is_right_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Recht")) ;
|
is_right_VP = mkVP have_V2 (mkNP (P.mkN "Recht")) ;
|
||||||
is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Unrecht")) ;
|
is_wrong_VP = mkVP have_V2 (mkNP (P.mkN "Unrecht")) ;
|
||||||
|
|
||||||
-- n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
||||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP card cn))) a ;
|
n_unit_CN card unit cn = mkCN (invarA (mkUtt (mkNP <lin Card card : Card> (lin CN unit))).s) cn ;
|
||||||
|
|
||||||
-- n_unit_CN card unit cn = mkCN (invarA (mkUtt (mkNP <lin Card card : Card> (lin CN unit))).s) cn ;
|
|
||||||
n_unit_CN card unit cn = mkCN (invarA ((mkUtt card).s ++ (mkUtt unit).s)) cn ;
|
|
||||||
|
|
||||||
bottle_of_CN np = N.ApposCN (mkCN (P.mkN "Flasche")) np ;
|
bottle_of_CN np = N.ApposCN (mkCN (P.mkN "Flasche")) np ;
|
||||||
cup_of_CN np = N.ApposCN (mkCN (P.mkN "Tasse")) np ;
|
cup_of_CN np = N.ApposCN (mkCN (P.mkN "Tasse")) np ;
|
||||||
@@ -177,9 +174,9 @@ lin
|
|||||||
|
|
||||||
monthAdv m = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det m) ;
|
monthAdv m = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det m) ;
|
||||||
yearAdv y = SyntaxGer.mkAdv (mkPrep "im Jahr" dative) y ; ----
|
yearAdv y = SyntaxGer.mkAdv (mkPrep "im Jahr" dative) y ; ----
|
||||||
dayMonthAdv d m = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom) ; -- am 17 Mai
|
dayMonthAdv d m = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom) ; -- am 17. Mai
|
||||||
monthYearAdv m y = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det (mkCN m y)) ; -- im Mai 2012
|
monthYearAdv m y = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det (mkCN m y)) ; -- im Mai 2012
|
||||||
dayMonthYearAdv d m y = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom ++ y.s ! False ! accusative) ; -- am 17 Mai 2013
|
dayMonthYearAdv d m y = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom ++ y.s ! True ! accusative) ; -- am 17. Mai 2013
|
||||||
|
|
||||||
intYear = symb ;
|
intYear = symb ;
|
||||||
intMonthday = symb ;
|
intMonthday = symb ;
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ oper
|
|||||||
lin
|
lin
|
||||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||||
t = "s" ;
|
t = "s" ;
|
||||||
s1 = heading1 (heading noun_Category ++
|
s1 = heading1 (heading noun_Category ++
|
||||||
case noun.g of {
|
case noun.g of {
|
||||||
Masc => "("+heading masculine_Parameter+")" ;
|
Masc => "("+heading masculine_Parameter+")" ;
|
||||||
Fem => "("+heading feminine_Parameter+")" ;
|
Fem => "("+heading feminine_Parameter+")" ;
|
||||||
Neutr => "("+heading neuter_Parameter+")"
|
Neutr => "("+heading neuter_Parameter+")"
|
||||||
}) ;
|
}) ;
|
||||||
s2 = frameTable (
|
s2 = frameTable (
|
||||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
||||||
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++
|
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++
|
||||||
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++
|
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++
|
||||||
@@ -42,9 +42,9 @@ lin
|
|||||||
|
|
||||||
InflectionPN = \pn -> {
|
InflectionPN = \pn -> {
|
||||||
t = "pn" ;
|
t = "pn" ;
|
||||||
s1 = heading1 ("Eigenname" ++
|
s1 = heading1 ("Eigenname" ++
|
||||||
"("+case <pn.g,pn.n> of {
|
"("+case <pn.g,pn.n> of {
|
||||||
<Masc,Sg> => heading masculine_Parameter ;
|
<Masc,Sg> => heading masculine_Parameter ;
|
||||||
<Fem,Sg> => heading feminine_Parameter ;
|
<Fem,Sg> => heading feminine_Parameter ;
|
||||||
<Neutr,Sg> => heading neuter_Parameter ;
|
<Neutr,Sg> => heading neuter_Parameter ;
|
||||||
<_,Pl> => heading plural_Parameter
|
<_,Pl> => heading plural_Parameter
|
||||||
@@ -59,9 +59,9 @@ lin
|
|||||||
|
|
||||||
InflectionGN = \gn -> {
|
InflectionGN = \gn -> {
|
||||||
t = "vn" ;
|
t = "vn" ;
|
||||||
s1 = heading1 ("Vorname" ++
|
s1 = heading1 ("Vorname" ++
|
||||||
case gn.g of {
|
case gn.g of {
|
||||||
Male => "(männlich)" ;
|
Male => "(männlich)" ;
|
||||||
Female => "(weiblich)"
|
Female => "(weiblich)"
|
||||||
}) ;
|
}) ;
|
||||||
s2 = frameTable (
|
s2 = frameTable (
|
||||||
@@ -85,9 +85,9 @@ lin
|
|||||||
|
|
||||||
InflectionLN = \ln -> {
|
InflectionLN = \ln -> {
|
||||||
t = "pn" ;
|
t = "pn" ;
|
||||||
s1 = heading1 ("Standortnamen" ++
|
s1 = heading1 ("Standortnamen" ++
|
||||||
"("+case <ln.g,ln.n> of {
|
"("+case <ln.g,ln.n> of {
|
||||||
<Masc,Sg> => heading masculine_Parameter ;
|
<Masc,Sg> => heading masculine_Parameter ;
|
||||||
<Fem,Sg> => heading feminine_Parameter ;
|
<Fem,Sg> => heading feminine_Parameter ;
|
||||||
<Neutr,Sg> => heading neuter_Parameter ;
|
<Neutr,Sg> => heading neuter_Parameter ;
|
||||||
<_,Pl> => heading plural_Parameter
|
<_,Pl> => heading plural_Parameter
|
||||||
@@ -108,8 +108,8 @@ lin
|
|||||||
td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
|
td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
|
||||||
td (adj.s ! d ! (AMod GPl c)) ;
|
td (adj.s ! d ! (AMod GPl c)) ;
|
||||||
dtable : Parameter -> Degree -> Str = \s,d ->
|
dtable : Parameter -> Degree -> Str = \s,d ->
|
||||||
paragraph (heading2 (heading s) ++ frameTable (
|
paragraph (heading2 (heading s) ++ frameTable (
|
||||||
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
||||||
th (heading plural_Parameter)) ++
|
th (heading plural_Parameter)) ++
|
||||||
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
||||||
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
|
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ concrete ExtendGer of Extend =
|
|||||||
CatGer ** ExtendFunctor
|
CatGer ** ExtendFunctor
|
||||||
- [
|
- [
|
||||||
InOrderToVP,
|
InOrderToVP,
|
||||||
VPS, ListVPS, VPI, ListVPI,
|
VPS, ListVPS, VPI, ListVPI, RNP, RNPList,
|
||||||
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||||
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||||
GenModNP,
|
ComplSlashPartLast,
|
||||||
|
Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, Conj_RNP,
|
||||||
CardCNCard, CompoundN,
|
CardCNCard, CompoundN,
|
||||||
PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP
|
PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP
|
||||||
]
|
]
|
||||||
@@ -26,9 +27,9 @@ concrete ExtendGer of Extend =
|
|||||||
VPS = {s : Order => Agr => Str} ;
|
VPS = {s : Order => Agr => Str} ;
|
||||||
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
InOrderToVP vp = {s = "um" ++ useInfVP False vp} ;
|
InOrderToVP vp = {s = "um" ++ useInfVP False vp} ;
|
||||||
|
|
||||||
BaseVPI = twoTable Bool ;
|
BaseVPI = twoTable Bool ;
|
||||||
ConsVPI = consrTable Bool comma ;
|
ConsVPI = consrTable Bool comma ;
|
||||||
@@ -70,7 +71,7 @@ concrete ExtendGer of Extend =
|
|||||||
t = tm.t ;
|
t = tm.t ;
|
||||||
m = tm.m ;
|
m = tm.m ;
|
||||||
subj = [] ;
|
subj = [] ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! agr2vagr agr ! VPFinite m t a ;
|
||||||
haben = verb.inf2 ;
|
haben = verb.inf2 ;
|
||||||
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
||||||
-- obj1 = (vp.nn ! agr).p1 ;
|
-- obj1 = (vp.nn ! agr).p1 ;
|
||||||
@@ -123,25 +124,25 @@ concrete ExtendGer of Extend =
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseDAPMasc det = {
|
UseDAPMasc det = {
|
||||||
s = \\_,c => det.sp ! Masc ! c ;
|
s = \\b,c => det.sp ! Masc ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
w = WLight ;
|
w = WLight ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseDAPFem det = {
|
UseDAPFem det = {
|
||||||
s = \\_,c => det.sp ! Fem ! c ;
|
s = \\b,c => det.sp ! Fem ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
w = WLight ;
|
w = WLight ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
CardCNCard card cn = {
|
lin
|
||||||
s = \\g,c =>
|
CardCNCard card cn = {
|
||||||
(Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! False ! c ;
|
s = \\g,c =>
|
||||||
n = Pl
|
(Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! False ! c ;
|
||||||
} ;
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
lin PassVPSlash vp =
|
lin PassVPSlash vp =
|
||||||
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
@@ -167,7 +168,7 @@ lin PastPartAgentAP vp np =
|
|||||||
in {
|
in {
|
||||||
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
||||||
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
|
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
|
||||||
++ vp.c2.s ! GPl -- junk if not TV
|
++ vp.c2.s ! GPl -- junk if not TV
|
||||||
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
@@ -186,4 +187,118 @@ lin CompoundN a x =
|
|||||||
g = x.g
|
g = x.g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Reflexive noun phrases -- (HL 5/2022: improved and completed, RNPList added)
|
||||||
|
|
||||||
|
lincat
|
||||||
|
RNP = {s : Agr => Case => Str ; rc,ext : Str ; isPron : Bool} ; -- Case, not PCase !!!
|
||||||
|
RNPList = {s1,s2 : Agr => Case => Str} ;
|
||||||
|
|
||||||
|
linref
|
||||||
|
RNP = \rnp -> rnp.s ! AgSgP3 Masc ! Acc ++ rnp.ext ++ rnp.rc ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
ReflRNP vps rnp =
|
||||||
|
insertObjReflNP rnp vps ;
|
||||||
|
|
||||||
|
ReflPron = { -- with personal pronoun nominative
|
||||||
|
s = ResGer.reflPron ; rc,ext = [] ; isPron = True } ;
|
||||||
|
|
||||||
|
-- We might define ReflPron by the stronger reflPronSelf below, using "selbst"
|
||||||
|
-- to distinguish personal pronoun from reflexive pronoun:
|
||||||
|
-- du kennst mich vs. ich kenne mich selbst
|
||||||
|
-- er kennt ihn vs. er kennt sich (selbst)
|
||||||
|
-- sie kennen sich (selbst) =/= sie kennen einander
|
||||||
|
|
||||||
|
ReflPoss num cn =
|
||||||
|
{s = \\a,c => let adjf = case num.n of {Sg => Strong ; Pl => Weak} -- Duden 477, HL 5/2022
|
||||||
|
in possPron a num.n cn.g c ++ num.s ! cn.g ! c -- HL 5/2022: meine wenigstens 3 cn,
|
||||||
|
++ cn.s ! adjfCase adjf c ! num.n ! c -- not: wenigstens 3 meine cn
|
||||||
|
++ cn.adv ;
|
||||||
|
ext = cn.ext ; rc = cn.rc ! num.n ;
|
||||||
|
isPron = False} ;
|
||||||
|
|
||||||
|
-- We might define ReflPoss by the stronger reflPossPron below, using "eigen(er)"
|
||||||
|
-- to distinguish possessive pronoun from reflexive possessive pronoun:
|
||||||
|
-- du kennst meine Fehler vs. ich kenne meine eigenen Fehler
|
||||||
|
-- er|sie|es kennt seine|ihre Fehler vs. er|sie|es kennt seine|ihre|seine eigenen Fehler
|
||||||
|
|
||||||
|
PredetRNP pred rnp = rnp ** { -- HL 5/2022
|
||||||
|
s = \\a,c => let n : Number = case pred.a of {PAg n => n ; _ => numberAgr a} ;
|
||||||
|
g : Gender = genderAgr a ;
|
||||||
|
d = case pred.c.k of {NoCase => c ; PredCase k => (prepC k).c} ;
|
||||||
|
in case rnp.isPron of {
|
||||||
|
True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! Dat ;
|
||||||
|
_ => pred.s ! n ! genderAgr a ! c ++ pred.c.p ++ rnp.s ! a ! d} ;
|
||||||
|
ext = rnp.ext ; rc = rnp.rc ;
|
||||||
|
isPron = False} ;
|
||||||
|
-- ok: alle von uns; die meisten von uns ; wrong: *nur von uns =/= nur wir
|
||||||
|
{-
|
||||||
|
AdvRNP np prep rnp = {s = \\a,c => np.s ! c
|
||||||
|
++ appPrep prep (rnp.s ! a) ++ rnp.ext ++ rnp.rc ;
|
||||||
|
ext = np.ext ; rc = np.rc ; isPron = False} ;
|
||||||
|
|
||||||
|
AdvRAP ap prep rnp =
|
||||||
|
let -- ? adv ++ ap.s ! af
|
||||||
|
adv = appPrep prep (rnp.s ! agrP3 Sg) ; -- bug: fixed agreement
|
||||||
|
in ap ** { s = \\af => ap.s ! af ++ adv } ; -- e.g. unknown in one's youth
|
||||||
|
|
||||||
|
ReflA2RNP adj rnp = -- would need AP.c : Agr => Str*Str, not AP.c : Str*Str
|
||||||
|
let -- as we have no reflexive AP,
|
||||||
|
compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement
|
||||||
|
in {
|
||||||
|
s = adj.s ! Posit ;
|
||||||
|
isPre = True ;
|
||||||
|
c = case adj.c2.isPrep of {False => <compl, []> ; True => <[], compl>} ;
|
||||||
|
ext = rnp.ext ++ rnp.rc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPronRNP pron num cn rnp =
|
||||||
|
GrammarGer.DetCN (GrammarGer.DetQuant (GrammarGer.PossPron pron) num)
|
||||||
|
(GrammarGer.PossNP cn (lin NP {s = \\pc => -- usePrepC pc (\c -> rnp.s ! pron.a ! c) ;
|
||||||
|
rnp.s ! pron.a ! pc ;
|
||||||
|
a = pron.a ;
|
||||||
|
w = WLight ;
|
||||||
|
ext = rnp.ext ;
|
||||||
|
rc = rnp.rc})) ;
|
||||||
|
|
||||||
|
-- AdvRVP : VP -> Prep -> RNP -> VP not implemented, as the reflexive adverb (Prep + RNP): Agr => Str
|
||||||
|
-- could only be added to vp.a2:Str with fixed agreement, but can depend on nominal subject or object,
|
||||||
|
-- e.g. "er spricht mit ihr über sein Kind" vs. "er spricht mit ihr über ihr Kind".
|
||||||
|
-}
|
||||||
|
ConjRNP conj rnps = conjunctDistrTable2 Agr Case conj rnps
|
||||||
|
** {isPron = False ; ext,rc = []} ;
|
||||||
|
|
||||||
|
Base_rr_RNP x y = twoTable2 Agr Case x y ;
|
||||||
|
Base_nr_RNP x y = twoTable2 Agr Case {s = \\_,c => x.s ! False ! c ++ x.ext ++ x.rc} y ;
|
||||||
|
Base_rn_RNP x y = twoTable2 Agr Case x {s = \\_,c => y.s ! False ! c ++ y.ext ++ y.rc} ;
|
||||||
|
|
||||||
|
Cons_rr_RNP x xs = consrTable2 Agr Case comma x xs ;
|
||||||
|
Cons_nr_RNP x xs = consrTable2 Agr Case comma {s = \\_,c => x.s ! False ! c ++ x.ext ++ x.rc} xs ;
|
||||||
|
{-
|
||||||
|
oper
|
||||||
|
-- reflPronSelf : Agr => Case => Str = \\a => \\c => reflPron ! a ! c ++ "selbst" ;
|
||||||
|
|
||||||
|
-- reflPossPron : Agr -> Number -> Gender -> Case -> Str =
|
||||||
|
-- let eigen = adjForms "eigen" "eigen" in
|
||||||
|
-- \a,n,g,c -> possPron a n g c ++ (eigen ! (AMod (gennum g n) c)) ;
|
||||||
|
|
||||||
|
insertObjReflNP : RNP -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022
|
||||||
|
\rnp,vp -> insertObjRNP rnp vp.c2 vp ;
|
||||||
|
|
||||||
|
insertObjRNP : RNP -> Preposition -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022
|
||||||
|
\rnp,prep,vp -> -- generalize ResGer.insertObjRefl
|
||||||
|
let -- prep = vp.c2 ;
|
||||||
|
c = case prep.c of { NPC cc => cc ; _ => Acc } ; -- put rnp.ext ++ rnp.rc to vp.ext ?
|
||||||
|
obj : Agr => Str = \\a => prep.s ++ rnp.s ! a ! c ++ rnp.ext ++ rnp.rc
|
||||||
|
in vp ** {
|
||||||
|
nn = \\a =>
|
||||||
|
let vpnn = vp.nn ! a in
|
||||||
|
case <prep.isPrep, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
||||||
|
<False,True,Acc> => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ; -- pronoun switch:
|
||||||
|
<False,True,_> => <vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4> ; -- accPron < pron
|
||||||
|
<False,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
||||||
|
<True,_,_> => <vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4> } -- or prepositional
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
concrete ExtraGer of ExtraGerAbs = CatGer **
|
concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||||
open ResGer, Coordination, Prelude, IrregGer, (P = ParadigmsGer), (N = NounGer) in {
|
open ResGer, Coordination, Prelude, IrregGer, (P = ParadigmsGer), (N = NounGer) in {
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
@@ -30,21 +29,21 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
ICompAP ap = {s = \\_ => "wie" ++ ap.s ! APred ;
|
ICompAP ap = {s = \\_ => "wie" ++ ap.s ! APred ;
|
||||||
ext = ap.c.p1 ++ ap.c.p2 ++ ap.ext} ;
|
ext = ap.c.p1 ++ ap.c.p2 ++ ap.ext} ;
|
||||||
|
|
||||||
CompIQuant iq = {s = table {Ag g n p => iq.s ! n ! g ! Nom} ; ext = ""} ;
|
CompIQuant iq = {s = table {a => iq.s ! numberAgr a ! genderAgr a ! Nom} ; ext = ""} ;
|
||||||
|
|
||||||
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
||||||
|
|
||||||
DetNPMasc det = {
|
DetNPMasc det = {
|
||||||
s = \\b,c => det.sp ! b ! Masc ! c ;
|
s = \\b,c => det.sp ! b ! Masc ! c ;
|
||||||
a = agrgP3 Masc det.n ;
|
a = agrgP3 Masc det.n ;
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of {True => WLight ; _ => WHeavy} ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNPFem det = {
|
DetNPFem det = {
|
||||||
s = \\b,c => det.sp ! b ! Fem ! c ;
|
s = \\b,c => det.sp ! b ! Fem ! c ;
|
||||||
a = agrgP3 Fem det.n ;
|
a = agrgP3 Fem det.n ;
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of {True => WLight ; _ => WHeavy} ;--WLight ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -55,10 +54,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PassVPSlash vp =
|
PassVPSlash vp =
|
||||||
let c = case <vp.c2.c,vp.c2.isPrep> of {<Acc,isCase> => Nom ; _ => vp.c2.c}
|
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
{ c1 = subjPrep vp.c2 } ;
|
||||||
{ c1 = vp.c2 ** {c = c} } ;
|
|
||||||
-- regulates passivised object: accusative objects -> nom; all others: same case
|
|
||||||
-- this also gives "mit dir wird gerechnet" ;
|
-- this also gives "mit dir wird gerechnet" ;
|
||||||
-- the alternative linearisation ("es wird mit dir gerechnet") is not implemented
|
-- the alternative linearisation ("es wird mit dir gerechnet") is not implemented
|
||||||
|
|
||||||
@@ -85,7 +82,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
in {
|
in {
|
||||||
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3
|
||||||
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
|
++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2
|
||||||
++ vp.c2.s ! GPl -- junk if not TV
|
++ vp.c2.s ! GPl -- junk if not TV
|
||||||
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
@@ -122,12 +119,13 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
Sub => True ; -- glue prefix to verb
|
Sub => True ; -- glue prefix to verb
|
||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
|
vagr = agr2vagr agr ;
|
||||||
b = p.p ;
|
b = p.p ;
|
||||||
a = tm.a ;
|
a = tm.a ;
|
||||||
t = tm.t ;
|
t = tm.t ;
|
||||||
m = tm.m ;
|
m = tm.m ;
|
||||||
subj = [] ++ tm.s ++ p.s ;
|
subj = [] ++ tm.s ++ p.s ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! vagr ! VPFinite m t a ;
|
||||||
haben = verb.inf2 ;
|
haben = verb.inf2 ;
|
||||||
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
||||||
-- obj1 = (vp.nn ! agr).p1 ;
|
-- obj1 = (vp.nn ! agr).p1 ;
|
||||||
@@ -179,13 +177,13 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
RNPList = {s1,s2 : Agr => Case => Str} ;
|
RNPList = {s1,s2 : Agr => Case => Str} ;
|
||||||
|
|
||||||
linref
|
linref
|
||||||
RNP = \rnp -> rnp.s ! (Ag Masc Sg P3) ! Acc ++ rnp.ext ++ rnp.rc ;
|
RNP = \rnp -> rnp.s ! AgSgP3 Masc ! Acc ++ rnp.ext ++ rnp.rc ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
ReflRNP vps rnp =
|
ReflRNP vps rnp =
|
||||||
insertObj (\\a => appPrep vps.c2 (rnp.s ! a)) vps ;
|
insertObjReflNP rnp vps ;
|
||||||
|
|
||||||
ReflPron = { -- personal pronoun, with "sich" in P3 Sg
|
ReflPron = { -- with personal pronoun nominative
|
||||||
s = ResGer.reflPron ; rc,ext = [] ; isPron = True } ;
|
s = ResGer.reflPron ; rc,ext = [] ; isPron = True } ;
|
||||||
|
|
||||||
-- We might define ReflPron by the stronger reflPronSelf below, using "selbst"
|
-- We might define ReflPron by the stronger reflPronSelf below, using "selbst"
|
||||||
@@ -208,7 +206,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
-- er|sie|es kennt seine|ihre Fehler vs. er|sie|es kennt seine|ihre|seine eigenen Fehler
|
-- er|sie|es kennt seine|ihre Fehler vs. er|sie|es kennt seine|ihre|seine eigenen Fehler
|
||||||
|
|
||||||
PredetRNP pred rnp = rnp ** { -- HL 5/2022
|
PredetRNP pred rnp = rnp ** { -- HL 5/2022
|
||||||
s = \\a,c => let n = case pred.a of {PAg n => n ; _ => numberAgr a} ;
|
s = \\a,c => let n : Number = case pred.a of {PAg n => n ; _ => numberAgr a} ;
|
||||||
g = genderAgr a ;
|
g = genderAgr a ;
|
||||||
d = case pred.c.k of {NoCase => c ; PredCase k => k} ;
|
d = case pred.c.k of {NoCase => c ; PredCase k => k} ;
|
||||||
in case rnp.isPron of {
|
in case rnp.isPron of {
|
||||||
@@ -266,10 +264,13 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
let eigen = adjForms "eigen" "eigen" in
|
let eigen = adjForms "eigen" "eigen" in
|
||||||
\a,n,g,c -> possPron a n g c ++ (eigen ! (AMod (gennum g n) c)) ;
|
\a,n,g,c -> possPron a n g c ++ (eigen ! (AMod (gennum g n) c)) ;
|
||||||
|
|
||||||
insertObjReflNP : ResGer.VPSlash -> RNP -> ResGer.VP = -- HL 5/2022
|
insertObjReflNP : RNP -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022
|
||||||
\vp,rnp -> -- generalize ResGer.insertObjRefl
|
\rnp,vp -> insertObjRNP rnp vp.c2 vp ;
|
||||||
let prep = vp.c2 ;
|
|
||||||
c = case prep.isPrep of { isCase => prep.c ; _ => Acc } ; -- put rnp.ext ++ rnp.rc to vp.ext ?
|
insertObjRNP : RNP -> Preposition -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022
|
||||||
|
\rnp,prep,vp -> -- generalize ResGer.insertObjRefl
|
||||||
|
let -- prep = vp.c2 ;
|
||||||
|
c : Case = case prep.c of { cc => cc ; _ => Acc } ; -- put rnp.ext ++ rnp.rc to vp.ext ?
|
||||||
obj : Agr => Str = \\a => prep.s ! GPl ++ rnp.s ! a ! c ++ rnp.ext ++ rnp.rc
|
obj : Agr => Str = \\a => prep.s ! GPl ++ rnp.s ! a ! c ++ rnp.ext ++ rnp.rc
|
||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
@@ -280,7 +281,20 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
<isCase,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
<isCase,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
||||||
<_,_,_> => <vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4> } -- or prepositional
|
<_,_,_> => <vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4> } -- or prepositional
|
||||||
} ;
|
} ;
|
||||||
|
{- insertObjRNP : RNP -> Preposition -> ResGer.VPSlash -> ResGer.VPSlash = -- HL 8/2023
|
||||||
|
\rnp,prep,vp -> -- generalize ResGer.insertObjNP
|
||||||
|
let c = case prep.c of { NPC cc => cc ; _ => Acc } ;
|
||||||
|
obj : Agr => Str = \\a => prep.s ++ rnp.s ! a ! c ++ rnp.ext ++ rnp.rc
|
||||||
|
in vp ** {
|
||||||
|
nn = \\a =>
|
||||||
|
let vpnn = vp.nn ! a in
|
||||||
|
case <prep.isPrep, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
||||||
|
<False,True,Acc> => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ; -- pronoun switch:
|
||||||
|
<False,True,_> => <vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4> ; -- accPron < pron
|
||||||
|
<False,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
||||||
|
<True,_,_> => <vpnn.p1, vpnn.p2, vpnn.p3 ++ obj ! a, vpnn.p4> } -- or prepositional
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
-- SS: implementation of some of the relevant Foc rules from Extra
|
-- SS: implementation of some of the relevant Foc rules from Extra
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
@@ -325,19 +339,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
-- "es wird gelacht"; generating formal sentences
|
-- "es wird gelacht"; generating formal sentences
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
FClause = ResGer.VP ** {subj : ResGer.NP ; lock_FClause : {}} ;
|
FClause = ResGer.VP ** {subj : ResGer.NP} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
VPass v =
|
VPass v =
|
||||||
let vp = predV werdenPass
|
let vp = predV werdenPass
|
||||||
in lin FClause (vp ** {subj = esSubj ;
|
in vp ** {subj = esSubj ;
|
||||||
inf = vp.inf ** {s = v.s ! VPastPart APred } }) ; -- construct the formal clause
|
inf = vp.inf ** {s = v.s ! VPastPart APred } } ; -- construct the formal clause
|
||||||
|
|
||||||
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
||||||
|
|
||||||
FtoCl cl =
|
FtoCl cl =
|
||||||
let subj = mkSubject cl.subj cl.c1
|
let subj = mkSubject cl.subj cl.c1
|
||||||
in DisToCl subj.s subj.a cl ;
|
in DisToCl subj.s subj.a cl ;
|
||||||
|
|
||||||
|
|
||||||
oper -- extra operations for ExtraGer
|
oper -- extra operations for ExtraGer
|
||||||
@@ -348,7 +362,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
esSubj : CatGer.NP = lin NP {
|
esSubj : CatGer.NP = lin NP {
|
||||||
s = \\_,_ => "es" ;
|
s = \\_,_ => "es" ;
|
||||||
rc, ext = [] ;
|
rc, ext = [] ;
|
||||||
a = Ag Neutr Sg P3 ;
|
a = AgSgP3 Neutr ;
|
||||||
w = WPron
|
w = WPron
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -360,7 +374,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
Sub => True ; -- glue prefix to verb
|
Sub => True ; -- glue prefix to verb
|
||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! agr2vagr agr ! VPFinite m t a ;
|
||||||
neg = vp.a1 ++ negation ! b ; -- HL 8/19 vp.a1 ! b ;
|
neg = vp.a1 ++ negation ! b ; -- HL 8/19 vp.a1 ! b ;
|
||||||
obj1 = (vp.nn ! agr).p1 ;
|
obj1 = (vp.nn ! agr).p1 ;
|
||||||
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ abstract ExtraGerAbs = Extra [
|
|||||||
|
|
||||||
Pass3V3 : V3 -> VPSlash ; -- wir bekommen den Beweis erklärt
|
Pass3V3 : V3 -> VPSlash ; -- wir bekommen den Beweis erklärt
|
||||||
|
|
||||||
-- further constructions usin RNP, declared in abstract/Extra.gf:
|
-- further constructions using RNP, declared in abstract/Extra.gf or Extend.gf:
|
||||||
|
|
||||||
AdvRNP : NP -> Prep -> RNP -> RNP ; -- a dispute with his wife
|
AdvRNP : NP -> Prep -> RNP -> RNP ; -- a dispute with his wife
|
||||||
AdvRVP : VP -> Prep -> RNP -> VP ; -- lectured about her travels
|
AdvRVP : VP -> Prep -> RNP -> VP ; -- lectured about her travels
|
||||||
@@ -39,4 +39,5 @@ abstract ExtraGerAbs = Extra [
|
|||||||
-- NOTE: generalizes ReflA2
|
-- NOTE: generalizes ReflA2
|
||||||
|
|
||||||
PossPronRNP : Pron -> Num -> CN -> RNP -> NP ; -- his abandonment of his wife and children
|
PossPronRNP : Pron -> Num -> CN -> RNP -> NP ; -- his abandonment of his wife and children
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:prelude
|
||||||
|
|
||||||
concrete GrammarGer of Grammar =
|
concrete GrammarGer of Grammar =
|
||||||
NounGer,
|
NounGer,
|
||||||
VerbGer,
|
VerbGer,
|
||||||
AdjectiveGer,
|
AdjectiveGer,
|
||||||
AdverbGer,
|
AdverbGer,
|
||||||
@@ -13,7 +13,7 @@ concrete GrammarGer of Grammar =
|
|||||||
PhraseGer,
|
PhraseGer,
|
||||||
TextX - [Tense,Temp],
|
TextX - [Tense,Temp],
|
||||||
IdiomGer,
|
IdiomGer,
|
||||||
StructuralGer, -- AR: keep for BW comp - [part_Prep,possess_Prep], -- use PartNP, PossNP instead
|
StructuralGer,
|
||||||
TenseGer,
|
TenseGer,
|
||||||
NamesGer
|
NamesGer
|
||||||
** {
|
** {
|
||||||
|
|||||||
@@ -8,23 +8,23 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
ImpersCl vp = mkClause "es" (agrP3 Sg) vp ;
|
ImpersCl vp = mkClause "es" (agrP3 Sg) vp ;
|
||||||
GenericCl vp = mkClause "man" (agrP3 Sg) vp ;
|
GenericCl vp = mkClause "man" (agrP3 Sg) vp ;
|
||||||
|
|
||||||
CleftNP np rs = mkClause "es" (agrP3 Sg)
|
CleftNP np rs = mkClause "es" (agrP3 Sg)
|
||||||
(insertExtrapos (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ----
|
(insertExtrapos (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ----
|
||||||
(insertObj (\\_ => (np.s ! False ! rs.c ++ bigNP np)) (predV MorphoGer.sein_V))) ; --HL
|
(insertObj (\\_ => np.s ! False ! rs.c ++ bigNP np) (predV MorphoGer.sein_V))) ;
|
||||||
|
|
||||||
CleftAdv ad s = mkClause "es" (agrP3 Sg)
|
CleftAdv ad s = mkClause "es" (agrP3 Sg)
|
||||||
(insertExtrapos (conjThat ++ s.s ! Sub)
|
(insertExtrapos (conjThat ++ s.s ! Sub)
|
||||||
(insertObj (\\_ => ad.s) (predV MorphoGer.sein_V))) ;
|
(insertObj (\\_ => ad.s) (predV MorphoGer.sein_V))) ;
|
||||||
|
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkClause "es" (agrP3 Sg)
|
mkClause "es" (agrP3 Sg)
|
||||||
(insertObj (\\_ => appPrep geben.c2 (np.s ! False) ++ bigNP np)
|
(insertObj (\\_ => appPrep geben.c2 (np.s ! False) ++ bigNP np)
|
||||||
(predV geben)) ;
|
(predV geben)) ;
|
||||||
|
|
||||||
ExistIP ip = {
|
ExistIP ip = {
|
||||||
s = \\m,t,a,p =>
|
s = \\m,t,a,p =>
|
||||||
let
|
let
|
||||||
cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ;
|
cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ;
|
||||||
who = ip.s ! Acc
|
who = ip.s ! Acc
|
||||||
in table {
|
in table {
|
||||||
@@ -53,7 +53,7 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
ProgrVP = insertAdv "eben" ; ----
|
ProgrVP = insertAdv "eben" ; ----
|
||||||
|
|
||||||
ImpPl1 vp = {s =
|
ImpPl1 vp = {s =
|
||||||
(mkClause "wir" (Ag Fem Pl P1) vp).s !
|
(mkClause "wir" (AgPl P1) vp).s !
|
||||||
MConjunct ! Pres ! Simul ! Pos ! Inv
|
MConjunct ! Pres ! Simul ! Pos ! Inv
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
SelfAdvVP vp = insertAdv "selbst" vp ;
|
SelfAdvVP vp = insertAdv "selbst" vp ;
|
||||||
SelfAdVVP vp = insertAdv "selbst" vp ;
|
SelfAdVVP vp = insertAdv "selbst" vp ;
|
||||||
SelfNP np = np ** {
|
SelfNP np = np ** {
|
||||||
s = \\_,c => np.s ! False ! c ++ "selbst" ++ bigNP np ;
|
s = \\b,c => np.s ! b ! c ++ "selbst" ++ bigNP np ;
|
||||||
isPron = False ;
|
isPron = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ flags
|
|||||||
lin
|
lin
|
||||||
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
||||||
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
||||||
alas_Interj = {s = "ach" } ;
|
alas_Interj = {s = "ach"} ;
|
||||||
already_Adv = mkAdv "schon" ;
|
already_Adv = mkAdv "schon" ;
|
||||||
answer_V2S = mkV2S (regV "antworten") datPrep ;
|
answer_V2S = mkV2S (regV "antworten") datPrep ;
|
||||||
apartment_N = mkN "Wohnung" ;
|
apartment_N = mkN "Wohnung" ;
|
||||||
@@ -186,8 +186,7 @@ lin
|
|||||||
sock_N = reg2N "Strumpf" "Strümpfe" masculine ;
|
sock_N = reg2N "Strumpf" "Strümpfe" masculine ;
|
||||||
song_N = reg2N "Lied" "Lieder" neuter ;
|
song_N = reg2N "Lied" "Lieder" neuter ;
|
||||||
speak_V2 = dirV2 Irreg.sprechen_V ;
|
speak_V2 = dirV2 Irreg.sprechen_V ;
|
||||||
-- star_N = mkN "Sterne" ;
|
star_N = mkN "Stern" ;
|
||||||
star_N = mkN "Stern" ; -- HL 7/22
|
|
||||||
steel_N = mkN "Stahl" ;
|
steel_N = mkN "Stahl" ;
|
||||||
stone_N = mkN "Stein" ;
|
stone_N = mkN "Stein" ;
|
||||||
stop_V = seinV Irreg.halten_V ;
|
stop_V = seinV Irreg.halten_V ;
|
||||||
@@ -214,7 +213,6 @@ lin
|
|||||||
university_N = reg2N "Universität" "Universitäten" feminine ;
|
university_N = reg2N "Universität" "Universitäten" feminine ;
|
||||||
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
village_N = reg2N "Dorf" "Dörfer" neuter ;
|
||||||
-- wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
-- wait_V2 = prepV2 (regV "warten") (mkPrep "auf" accusative) ;
|
||||||
-- wait_V2 = prepV2 (regV "warten") ((mkPrep "auf" "auf den" "auf die" "aufs" accusative) | (mkPrep "auf" accusative));
|
|
||||||
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" "auf den" "auf die" ("aufs" | "auf das") accusative);
|
wait_V2 = prepV2 (regV "warten") (mkPrep "auf" "auf den" "auf die" ("aufs" | "auf das") accusative);
|
||||||
walk_V = seinV Irreg.gehen_V ;
|
walk_V = seinV Irreg.gehen_V ;
|
||||||
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
warm_A = mk3A "warm" "wärmer" "wärmste" ;
|
||||||
@@ -299,7 +297,7 @@ lin
|
|||||||
sand_N = mkN "Sand" ;
|
sand_N = mkN "Sand" ;
|
||||||
seed_N = mkN "Same" ;
|
seed_N = mkN "Same" ;
|
||||||
skin_N = mkN "Haut" "Häute" feminine ;
|
skin_N = mkN "Haut" "Häute" feminine ;
|
||||||
sky_N = mkN "Himmel" ; ---- pl
|
sky_N = mkN "Himmel" ;
|
||||||
smoke_N = mkN "Rauch" ;
|
smoke_N = mkN "Rauch" ;
|
||||||
snow_N = mkN "Schnee" "Schneen" masculine ; ---- pl
|
snow_N = mkN "Schnee" "Schneen" masculine ; ---- pl
|
||||||
stick_N = mkN "Stock" "Stöcke" masculine ;
|
stick_N = mkN "Stock" "Stöcke" masculine ;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ resource MakeStructuralGer = open CatGer, (P = ParadigmsGer), MorphoGer, Prelude
|
|||||||
oper
|
oper
|
||||||
mkConj : Str -> Str -> Number -> Conj = \x,y,n ->
|
mkConj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
{s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ;
|
{s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ;
|
||||||
mkSubj : Str -> Subj = \x ->
|
mkSubj : Str -> Subj = \x ->
|
||||||
{s = x ; lock_Subj = <>} ;
|
{s = x ; lock_Subj = <>} ;
|
||||||
mkIQuant : Str -> IQuant = \s ->
|
mkIQuant : Str -> IQuant = \s ->
|
||||||
{s = \\_,_,_ => s ; lock_IQuant = <>} ;
|
{s = \\_,_,_ => s ; lock_IQuant = <>} ;
|
||||||
@@ -13,16 +13,16 @@ oper
|
|||||||
mkPredet = overload {
|
mkPredet = overload {
|
||||||
mkPredet : A -> Predet = \a ->
|
mkPredet : A -> Predet = \a ->
|
||||||
lin Predet {
|
lin Predet {
|
||||||
s = appAdj a ;
|
s = appAdj a ;
|
||||||
c = noCase ;
|
c = noCase ;
|
||||||
a = PAgNone
|
a = PAgNone
|
||||||
} ;
|
} ;
|
||||||
mkPredet : A -> Str -> Case -> Bool -> Number -> Predet = \a,p,c,b,n ->
|
mkPredet : A -> Str -> Case -> Bool -> Number -> Predet = \a,p,c,b,n ->
|
||||||
lin Predet {
|
lin Predet {
|
||||||
s = appAdj a ;
|
s = appAdj a ;
|
||||||
c = {p = p ; k = PredCase c} ;
|
c = {p = p ; k = PredCase c} ;
|
||||||
a = case b of {True => PAg n ; _ => PAgNone}
|
a = case b of {True => PAg n ; _ => PAgNone}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- e.g. das selbe
|
-- e.g. das selbe
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
-- Remark: np.isLight makes ResGer.insertObjNP expensive, for ComplSlash, SlashVP
|
|
||||||
-- np.isLight = True and np.isPron = True are now part of np.w
|
|
||||||
|
|
||||||
-- HL 21.7.2022: the dropping of DefArt in Prep+DefArt works by selecting from
|
-- HL 21.7.2022: the dropping of DefArt in Prep+DefArt works by selecting from
|
||||||
-- np.s via b = det.hasDefArt = True the forms without det.s and from prep.s
|
-- np.s via b = det.hasDefArt = True the forms without det.s and from prep.s
|
||||||
-- the preposition glued with definite article singular, depending on gender, case.
|
-- the preposition glued with definite article singular, depending on gender, case.
|
||||||
@@ -33,13 +30,13 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\_,c => pn.s ! c ;
|
s = \\_,c => pn.s ! c ;
|
||||||
a = agrgP3 pn.g Sg ;
|
a = agrgP3 pn.g pn.n ;
|
||||||
w = WLight ; -- means: this is not a heavy NP, but comes before negation
|
w = WLight ; -- means: this is not a heavy NP, but comes before negation
|
||||||
rc, ext = [] -- Pron => Light HL 6/2019: to regulate Pron/NonPronNP order
|
rc, ext = [] -- Pron => Light, HL 6/2019: to regulate Pron/NonPronNP order
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = \\_,c => pron.s ! NPCase c ;
|
s = \\_,c => pron.s ! NPCase c ;
|
||||||
a = pron.a ;
|
a = pron.a ;
|
||||||
w = WPron ;
|
w = WPron ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
@@ -55,45 +52,45 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = np ** {
|
PPartNP np v2 = np ** {
|
||||||
s = \\b,c => np.s ! b ! c ++ (embedInCommas (v2.s ! VPastPart APred)) ; --- invar part
|
s = \\b,c => np.s ! b ! c ++ embedInCommas (v2.s ! VPastPart APred) ; --- invar part
|
||||||
w = WHeavy
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
-- SS: "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
-- SS: "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German?
|
||||||
-- HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
-- HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen,"
|
||||||
|
|
||||||
AdvNP np adv = np ** {
|
AdvNP np adv = np ** {
|
||||||
s = \\b,c => np.s ! b ! c ++ adv.s ;
|
s = \\b,c => np.s ! b ! c ++ adv.s ;
|
||||||
w = WHeavy
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = np ** {
|
ExtAdvNP np adv = np ** {
|
||||||
s = \\b,c => np.s ! b ! c ++ (embedInCommas adv.s) ;
|
s = \\b,c => np.s ! b ! c ++ embedInCommas adv.s ;
|
||||||
w = WHeavy
|
w = WHeavy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
a = quant.a
|
a = quant.a
|
||||||
in {
|
in {
|
||||||
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s!g!c ++
|
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s!g!c
|
||||||
ord.s ! agrAdj g (adjfCase a c) n c ;
|
++ ord.s ! agrAdj g (adjfCase a c) n c ;
|
||||||
sp = \\b,g,c => quant.sp ! b ! num.isNum ! n ! g ! c ++ num.s!g!c ++
|
sp = \\b,g,c => quant.sp ! b ! num.isNum ! n ! g ! c ++ num.s!g!c
|
||||||
ord.s ! agrAdj g (adjfCase quant.aPl c) n c ;
|
++ ord.s ! agrAdj g (adjfCase quant.aPl c) n c ;
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
||||||
hasDefArt = quant.hasDefArt ;
|
hasDefArt = quant.hasDefArt ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuant quant num =
|
DetQuant quant num =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
a = quant.a ;
|
a = quant.a ;
|
||||||
b = andB quant.hasDefArt (case num.n of {Sg => True ; _ => False}) ;
|
b = andB quant.hasDefArt (case num.n of {Sg => True ; _ => False})
|
||||||
in {
|
in {
|
||||||
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
||||||
sp = \\_,g,c => quant.sp ! False ! num.isNum ! n ! g ! c ++ num.s!g!c ;
|
sp = \\_,g,c => quant.sp ! False ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
||||||
-- HL: der+er,den+en ; der drei,den drei+en
|
-- HL: der+er,den+en ; der drei,den drei+en
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
||||||
@@ -101,6 +98,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
hasDefArt = quant.hasDefArt ;
|
hasDefArt = quant.hasDefArt ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
s = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
sp = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
sp = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
||||||
@@ -117,6 +115,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
|
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
||||||
NumDecimal numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumDecimal numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
@@ -129,20 +128,21 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} ; -- drittbeste
|
||||||
|
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = table{True => \\_,n,g,c => [] ; -- defart dropped
|
s = table{True => \\_,n,g,c => [] ; -- definite article dropped
|
||||||
False => \\_,n,g,c => artDef ! (gennum g n) ! c} ;
|
False => \\_,n,g,c => artDef ! (gennum g n) ! c} ;
|
||||||
sp = \\_,_,n,g,c => case <n,c> of {
|
sp = \\_,_,n,g,c => case <n,c> of {
|
||||||
<Pl,Dat> => "denen" ; -- HL 6/2019
|
<Pl,Dat> => "denen" ; -- HL 6/2019
|
||||||
<Pl,Gen> => "derer" ; -- HL 6/2019
|
<Pl,Gen> => "derer" ; -- HL 6/2019
|
||||||
_ => artDef ! (gennum g n) ! c } ;
|
_ => artDef ! (gennum g n) ! c } ; -- von den+en
|
||||||
a, aPl = Weak ;
|
a, aPl = Weak ;
|
||||||
hasDefArt = True
|
hasDefArt = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IndefArt = {
|
IndefArt = {
|
||||||
s = \\_ => table {
|
s = \\_ => table {
|
||||||
True => \\_,_,c => [] ;
|
True => \\_,_,c => [] ;
|
||||||
False => table {
|
False => table {
|
||||||
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
||||||
Pl => \\_,c => []
|
Pl => \\_,c => []
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -176,8 +176,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
ComplN2 f x = {
|
ComplN2 f x = {
|
||||||
s = \\_,n,c => f.s ! n ! c ++ appPrepNP f.c2 x ;
|
s = \\_,n,c => f.s ! n ! c ++ appPrepNP f.c2 x ;
|
||||||
g = f.g ;
|
g = f.g ;
|
||||||
rc = \\_ => [] ;
|
rc = \\_ => [] ;
|
||||||
ext,adv = []
|
ext,adv = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplN3 f x = {
|
ComplN3 f x = {
|
||||||
@@ -187,7 +187,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
s = \\n,c => f.uncap.s ! n ! c ++ appPrepNP f.c2 x ;
|
s = \\n,c => f.uncap.s ! n ! c ++ appPrepNP f.c2 x ;
|
||||||
co = f.uncap.co ++ appPrepNP f.c2 x ; ---- should not occur at all; the abstract syntax is problematic in giving N2
|
co = f.uncap.co ++ appPrepNP f.c2 x ; ---- should not occur at all; the abstract syntax is problematic in giving N2
|
||||||
} ;
|
} ;
|
||||||
g = f.g ;
|
g = f.g ;
|
||||||
c2 = f.c3 ;
|
c2 = f.c3 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -197,11 +197,11 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
c2 = f.c3;
|
c2 = f.c3;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdjCN ap cn =
|
AdjCN ap cn =
|
||||||
let
|
let
|
||||||
g = cn.g
|
g = cn.g
|
||||||
in cn ** {
|
in cn ** {
|
||||||
s = \\a,n,c =>
|
s = \\a,n,c =>
|
||||||
preOrPost ap.isPre
|
preOrPost ap.isPre
|
||||||
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj g a n c ++ ap.ext)
|
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj g a n c ++ ap.ext)
|
||||||
(cn.s ! a ! n ! c) ;
|
(cn.s ! a ! n ! c) ;
|
||||||
@@ -214,7 +214,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
RelNP np rs = np ** {
|
RelNP np rs = np ** {
|
||||||
rc = np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ;
|
rc = np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ;
|
||||||
w = case isPron np of { True => WLight ; _ => np.w }
|
w = case isPron np of { True => WLight ; _ => np.w }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
|
||||||
@@ -224,35 +224,34 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
ApposCN cn np = let g = cn.g in cn ** {
|
ApposCN cn np = let g = cn.g in cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! c ++ bigNP np } ;
|
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! c ++ bigNP np } ;
|
||||||
|
|
||||||
-- PossNP cn np = cn ** {
|
|
||||||
-- s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ;
|
|
||||||
PossNP cn np = cn ** {
|
PossNP cn np = cn ** {
|
||||||
s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ bigNP np } ; -- HL, ad hoc
|
s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ bigNP np } ;
|
||||||
|
|
||||||
PartNP cn np = case np.w of {
|
PartNP cn np = case np.w of {
|
||||||
WPron => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ np.rc} ;
|
WPron => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ np.rc} ;
|
||||||
_ => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! Gen} -- HL 7/2022, ad hoc
|
_ => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! Gen ++ np.ext ++ np.rc}
|
||||||
}; -- glass of wine
|
}; -- glass of wine
|
||||||
|
|
||||||
CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc TODO
|
CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc TODO
|
||||||
-- det or numeral? np or rather (DefArt +) cn? drei (einiger Kinder) ?
|
-- det or numeral? np or rather (DefArt +) cn? drei (einiger Kinder) ?
|
||||||
let g = genderAgr np.a
|
let g : Gender = genderAgr np.a
|
||||||
in {
|
in {
|
||||||
s = \\b,c => det.s ! b ! g ! c ++ appPrepNP vonDat np ++ bigNP np ;
|
s = \\b,c => det.s ! b ! g ! c ++ appPrepNP vonDat np ++ bigNP np ;
|
||||||
a = agrgP3 g det.n ;
|
a = agrgP3 g det.n ;
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
||||||
rc = np.rc ;
|
rc = np.rc ;
|
||||||
ext = np.ext
|
ext = np.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdjDAP dap ap = -- the large (one) -- HL 8/22 der auf dich stolze; die ihm treue; der so dumme, infzu
|
AdjDAP dap ap = -- the large (one) -- HL 8/22 der auf dich stolze; die ihm treue; der so dumme, infzu
|
||||||
{s, sp = \\g,c => dap.s ! g ! c ++ ap.c.p1 ++ ap.c.p2 ++ ap.s ! (AMod (gennum g dap.n) c) ++ ap.ext ;
|
{s, sp = \\g,c => dap.s ! g ! c ++ ap.c.p1 ++ ap.c.p2 ++ ap.s ! (AMod (gennum g dap.n) c) ++ ap.ext ;
|
||||||
a = dap.a ; n = dap.n ; isDef = dap.isDef ; hasDefArt = dap.hasDefArt } ;
|
a = dap.a ; n = dap.n ; isDef = dap.isDef ; hasDefArt = dap.hasDefArt } ;
|
||||||
|
|
||||||
DetDAP det = {s = \\g,c => det.s ! False ! g ! c ; -- HL 7/22 todo: check
|
|
||||||
sp = \\g,c => det.sp ! False ! g ! c ;
|
|
||||||
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt} ;
|
|
||||||
|
|
||||||
|
DetDAP det = {
|
||||||
|
s = \\g,c => det.s ! False ! g ! c ; -- HL 7/22 todo: check
|
||||||
|
sp = \\g,c => det.sp ! False ! g ! c ;
|
||||||
|
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt
|
||||||
|
} ;
|
||||||
|
|
||||||
QuantityNP dig m = {
|
QuantityNP dig m = {
|
||||||
s = \\_,c => preOrPost m.isPre m.s (dig.s ! invNum) ;
|
s = \\_,c => preOrPost m.isPre m.s (dig.s ! invNum) ;
|
||||||
@@ -262,4 +261,12 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
ext = "" ;
|
ext = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
QuantityFloatNP dig1 dig2 m = {
|
||||||
|
s = \\_,c => preOrPost m.isPre m.s (dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! invNum) ;
|
||||||
|
a = agrP3 Pl ;
|
||||||
|
w = WLight ;
|
||||||
|
rc = "" ;
|
||||||
|
ext = "" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,9 +234,9 @@ mkN : overload {
|
|||||||
mkPrep : Str -> Case -> Prep ; -- e.g. "durch" + accusative
|
mkPrep : Str -> Case -> Prep ; -- e.g. "durch" + accusative
|
||||||
mkPrep : Case -> Str -> Prep ; -- postposition
|
mkPrep : Case -> Str -> Prep ; -- postposition
|
||||||
mkPrep : Str -> Case -> Str -> Prep ; -- both sides
|
mkPrep : Str -> Case -> Str -> Prep ; -- both sides
|
||||||
-- for preposition glued with DefArt in singular:
|
-- for prepositions glued with DefArt in singular
|
||||||
-- e.g. "auf" "auf den" "auf die" "aufs" + accusative
|
-- e.g. "auf" "auf den" "auf die" "aufs" + accusative
|
||||||
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep ;
|
mkPrep : Str -> Str -> Str -> Str -> Case -> Prep ;
|
||||||
mkPrep : Case -> Prep ; -- convert case to preposition
|
mkPrep : Case -> Prep ; -- convert case to preposition
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -252,6 +252,7 @@ mkN : overload {
|
|||||||
zu_Prep : Prep ; -- zu + dative, with contractions zum, zur
|
zu_Prep : Prep ; -- zu + dative, with contractions zum, zur
|
||||||
bei_Prep : Prep ; -- bei + dative, with contraction beim
|
bei_Prep : Prep ; -- bei + dative, with contraction beim
|
||||||
anDat_Prep : Prep ; -- an + dative, with contraction am
|
anDat_Prep : Prep ; -- an + dative, with contraction am
|
||||||
|
anAcc_Prep : Prep ; -- an + accusative, with contraction ans
|
||||||
inDat_Prep : Prep ; -- in + dative, with contraction im
|
inDat_Prep : Prep ; -- in + dative, with contraction im
|
||||||
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
||||||
aufAcc_Prep : Prep ; -- auf + accusative, with contraction aufs
|
aufAcc_Prep : Prep ; -- auf + accusative, with contraction aufs
|
||||||
@@ -337,12 +338,12 @@ mkV2 : overload {
|
|||||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||||
-- the first one or both can be absent.
|
-- the first one or both can be absent.
|
||||||
|
|
||||||
accdatV3 : V -> V3 ; -- geben + dat(c2) + acc(c3) (Eng: no prepositions)
|
accdatV3 : V -> V3 ; -- geben + dat(c2) + acc(c3) (Eng: give sb sth)
|
||||||
dirV3 : V -> Prep -> V3 ; -- senden + acc + nach (preposition on second arg)
|
dirV3 : V -> Prep -> V3 ; -- senden + acc(c2) + nach(c3)
|
||||||
|
|
||||||
mkV3 : overload {
|
mkV3 : overload {
|
||||||
mkV3 : V -> V3 ; -- geben + dat(c3) + acc(c2) (Eng: give sth to-sb)
|
mkV3 : V -> V3 ; -- geben + dat(c3) + acc(c2) (Eng: give sth to-sb)
|
||||||
mkV3 : V -> Prep -> Prep -> V3 ; -- sprechen + mit + über
|
mkV3 : V -> Prep -> Prep -> V3 ; -- sprechen + mit(c2) + über(c3)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--3 Other complement patterns
|
--3 Other complement patterns
|
||||||
@@ -353,39 +354,39 @@ mkV2 : overload {
|
|||||||
mkV0 : V -> V0 ; --%
|
mkV0 : V -> V0 ; --%
|
||||||
mkVS : V -> VS ;
|
mkVS : V -> VS ;
|
||||||
|
|
||||||
mkV2V : overload { -- with zu; object-control
|
mkV2V : overload { -- with zu
|
||||||
mkV2V : V -> V2V ;
|
mkV2V : V -> V2V ; -- object-control verb (zu-inf), e.g. bitte jmdn, sich auszuruhen
|
||||||
mkV2V : V -> Prep -> V2V ;
|
mkV2V : V -> Prep -> V2V ; -- object-control verb with prep, e.g. appelliere an jmdn, zu schweigen
|
||||||
} ;
|
} ;
|
||||||
auxV2V : overload { -- without zu
|
auxV2V : overload { -- without zu
|
||||||
auxV2V : V -> V2V ;
|
auxV2V : V -> V2V ; -- object-control auxiliary, e.g. lasse jmdn sich ausruhen
|
||||||
auxV2V : V -> Prep -> V2V ;
|
auxV2V : V -> Prep -> V2V ;
|
||||||
} ;
|
} ;
|
||||||
subjV2V : V2V -> V2V ; -- force subject-control
|
subjV2V : V2V -> V2V ; -- force subject-control, e.g. verspreche jmdm, mich auszuruhen
|
||||||
|
|
||||||
mkV2A : overload {
|
mkV2A : overload {
|
||||||
mkV2A : V -> V2A ;
|
mkV2A : V -> V2A ; -- e.g. male etwas blau
|
||||||
mkV2A : V -> Prep -> V2A ;
|
mkV2A : V -> Prep -> V2A ;
|
||||||
} ;
|
} ;
|
||||||
mkV2S : overload {
|
mkV2S : overload {
|
||||||
mkV2S : V -> V2S ;
|
mkV2S : V -> V2S ; -- e.g. antworte jmdm, dass S
|
||||||
mkV2S : V -> Prep -> V2S ;
|
mkV2S : V -> Prep -> V2S ; -- e.g. berichte an jmdn, dass S
|
||||||
} ;
|
} ;
|
||||||
mkV2Q : overload {
|
mkV2Q : overload {
|
||||||
mkV2Q : V -> V2Q ;
|
mkV2Q : V -> V2Q ; -- e.g. frage jmdn, ob S
|
||||||
mkV2Q : V -> Prep -> V2Q ;
|
mkV2Q : V -> Prep -> V2Q ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
mkVV : V -> VV ; -- with zu
|
mkVV : V -> VV ; -- with zu, e.g. versuche, zu schlafen
|
||||||
auxVV : V -> VV ; -- without zu
|
auxVV : V -> VV ; -- without zu, e.g. will schlafen
|
||||||
|
|
||||||
mkVA : overload {
|
mkVA : overload {
|
||||||
mkVA : V -> VA ;
|
mkVA : V -> VA ; -- e.g. bleibe gesund
|
||||||
mkVA : V -> Prep -> VA ;
|
mkVA : V -> Prep -> VA ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVQ : V -> VQ ;
|
mkVQ : V -> VQ ; -- e.g. frage mich, ob S
|
||||||
|
|
||||||
|
|
||||||
mkAS : A -> AS ; --%
|
mkAS : A -> AS ; --%
|
||||||
@@ -582,19 +583,18 @@ mkV2 : overload {
|
|||||||
mkPrep : Case -> Str -> Prep = \c,s ->
|
mkPrep : Case -> Str -> Prep = \c,s ->
|
||||||
{s = \\_ => [] ; s2 = s ; c = c ; isPrep = isPrep ; lock_Prep = <>} ;
|
{s = \\_ => [] ; s2 = s ; c = c ; isPrep = isPrep ; lock_Prep = <>} ;
|
||||||
mkPrep : Str -> Case -> Str -> Prep = \s,c,t ->
|
mkPrep : Str -> Case -> Str -> Prep = \s,c,t ->
|
||||||
{s = \\_ => s ; s2 = t ; c = c ; isPrep = isPrep ; lock_Prep = <>} ;
|
{s = \\_ => s ; s2 = t ; c = c ; isPrep = isPrep ; lock_Prep = <>} ;
|
||||||
mkPrep : Str -> Str -> Str -> Str-> Case -> Prep = \s,masc,fem,neutr, c ->
|
mkPrep : Str -> Str -> Str -> Str -> Case -> Prep = \s,masc,fem,neutr,c ->
|
||||||
{s = table{GPl => s ; GSg Masc => masc ; GSg Fem => fem ; GSg Neutr => neutr} ;
|
{s = table{GPl => s ; GSg Masc => masc ; GSg Fem => fem ; GSg Neutr => neutr} ;
|
||||||
s2 = [] ; c = c ; isPrep = isPrepDefArt ; lock_Prep = <>} ;
|
s2 = [] ; c = c ; isPrep = isPrepDefArt ; lock_Prep = <>} ;
|
||||||
mkPrep : Case -> Prep = \c ->
|
mkPrep : Case -> Prep = \c ->
|
||||||
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase ; lock_Prep = <>} ;
|
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase ; lock_Prep = <>}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
accPrep = mkPrep accusative ;
|
accPrep = mkPrep accusative ;
|
||||||
datPrep = mkPrep dative ;
|
datPrep = mkPrep dative ;
|
||||||
genPrep = mkPrep genitive ;
|
genPrep = mkPrep genitive ;
|
||||||
|
|
||||||
--von_Prep = mkPrep "von" dative ;
|
|
||||||
von_Prep = mkPrep "von" "vom" "von der" "vom" dative ;
|
von_Prep = mkPrep "von" "vom" "von der" "vom" dative ;
|
||||||
zu_Prep = mkPrep "zu" "zum" "zur" "zum" dative ;
|
zu_Prep = mkPrep "zu" "zum" "zur" "zum" dative ;
|
||||||
bei_Prep = mkPrep "bei" "beim" "bei der" "beim" dative ;
|
bei_Prep = mkPrep "bei" "beim" "bei der" "beim" dative ;
|
||||||
@@ -672,7 +672,7 @@ mkV2 : overload {
|
|||||||
= \v,c,d -> lin V3 (v ** {c2 = c ; c3 = d}) ;
|
= \v,c,d -> lin V3 (v ** {c2 = c ; c3 = d}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
dirV3 v p = mkV3 v accPrep p ;
|
dirV3 v p = mkV3 v accPrep p ; -- accPrep sets isPrep=False
|
||||||
accdatV3 v = mkV3 v datPrep accPrep ; -- to fit to Eng ditransitives (no preposition):
|
accdatV3 v = mkV3 v datPrep accPrep ; -- to fit to Eng ditransitives (no preposition):
|
||||||
-- give sb(indir) sth(dir) = geben jmdm(dat) etwas(acc)
|
-- give sb(indir) sth(dir) = geben jmdm(dat) etwas(acc)
|
||||||
mkVS v = v ** {lock_VS = <>} ;
|
mkVS v = v ** {lock_VS = <>} ;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
--# -path=.:../abstract:../common:prelude -- HL
|
|
||||||
concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ concrete QuestionGer of Question = CatGer ** open ResGer in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
QuestVP ip vp = {
|
QuestVP ip vp = {
|
||||||
s = \\m,t,a,p =>
|
s = \\m,t,a,p =>
|
||||||
let
|
let
|
||||||
who = appPrep vp.c1 ip.s ;
|
who = appPrep vp.c1 ip.s ;
|
||||||
cl = (mkClause who (agrP3 ip.n) vp).s ! m ! t ! a ! p
|
cl = (mkClause who (agrP3 ip.n) vp).s ! m ! t ! a ! p
|
||||||
in table {
|
in table {
|
||||||
QDir => cl ! Main ;
|
QDir => cl ! Main ;
|
||||||
QIndir => cl ! Sub
|
QIndir => cl ! Sub
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
QuestSlash ip slash = {
|
QuestSlash ip slash = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete RelativeGer of Relative = CatGer ** open Prelude, ResGer in {
|
concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ concrete RelativeGer of Relative = CatGer ** open Prelude, ResGer in {
|
|||||||
} ;
|
} ;
|
||||||
agr = case rp.a of {
|
agr = case rp.a of {
|
||||||
RNoAg => agrP3 (numGenNum gn) ;
|
RNoAg => agrP3 (numGenNum gn) ;
|
||||||
RAg n p => Ag Neutr n p
|
RAg n p => case n of {Sg => AgSgP3 Neutr ; Pl => AgPl p}
|
||||||
} ;
|
} ;
|
||||||
cl = mkClause (rp.s ! rgn ! Nom) agr vp
|
cl = mkClause (rp.s ! rgn ! Nom) agr vp
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -35,16 +35,40 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
GenNum = GSg Gender | GPl ;
|
GenNum = GSg Gender | GPl ;
|
||||||
RelGenNum = RGenNum GenNum | RSentence ;
|
RelGenNum = RGenNum GenNum | RSentence ;
|
||||||
|
|
||||||
-- Agreement of $NP$ has three parts.
|
-- Agreement of $NP$ has three parts: gender, number and person.
|
||||||
|
|
||||||
Agr = Ag Gender Number Person ;
|
-- These 3*2*3 = 18 values can be reduced to 9, since gender is used only
|
||||||
|
-- in 3rd person singular. To select reflexive and possessive forms for "Sie"
|
||||||
|
-- in (mkClause str agr vp), add a value AgPlPol, for "man", use AgSgP3 Masc. HL 29.9.2023
|
||||||
|
|
||||||
|
Agr = AgSgP1 | AgSgP2 | AgSgP3 Gender | AgPl Person | AgPlPol ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkAgr : {g : Gender ; n : Number ; p : Person} -> Agr = \r ->
|
genderAgr : Agr -> Gender = \r -> case r of {AgSgP3 g => g ; _ => Masc} ;
|
||||||
Ag r.g r.n r.p ;
|
|
||||||
genderAgr : Agr -> Gender = \r -> case r of {Ag g _ _ => g} ;
|
numberAgr = overload {
|
||||||
numberAgr : Agr -> Number = \r -> case r of {Ag _ n _ => n} ;
|
numberAgr : Agr -> Number = \r -> case r of {
|
||||||
personAgr : Agr -> Person = \r -> case r of {Ag _ _ p => p} ;
|
AgSgP1 | AgSgP2 | AgSgP3 _ => Sg ;
|
||||||
|
AgPl _ | AgPlPol => Pl
|
||||||
|
} ;
|
||||||
|
numberAgr : VAgr -> Number = \r -> case r of {VAg n _ => n} ;
|
||||||
|
} ;
|
||||||
|
personAgr = overload {
|
||||||
|
personAgr : Agr -> Person = \r -> case r of {
|
||||||
|
AgSgP1 | AgPl P1 => P1 ;
|
||||||
|
AgSgP2 | AgPl P2 => P2 ;
|
||||||
|
AgSgP3 _ | AgPl P3 | AgPlPol => P3
|
||||||
|
} ;
|
||||||
|
personAgr : VAgr -> Person = \r -> case r of {VAg _ p => p}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a,b ->
|
||||||
|
let n : Number = conjNumber (numberAgr a) (numberAgr b) ;
|
||||||
|
p : Person = conjPerson (personAgr a) (personAgr b)
|
||||||
|
in case <n,p> of {<Pl,p> => AgPl p ;
|
||||||
|
<Sg,P3> => AgSgP3 Neutr ;
|
||||||
|
<Sg,P1> => AgSgP1 ;
|
||||||
|
<Sg,P2> => AgSgP2 } ;
|
||||||
|
|
||||||
-- Pronouns are the worst-case noun phrases, which have both case
|
-- Pronouns are the worst-case noun phrases, which have both case
|
||||||
-- and possessive forms.
|
-- and possessive forms.
|
||||||
@@ -58,16 +82,14 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
param
|
param
|
||||||
PredetCase = NoCase | PredCase Case ;
|
PredetCase = NoCase | PredCase Case ;
|
||||||
PredetAgr = PAg Number | PAgNone ;
|
PredetAgr = PAg Number | PAgNone ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ;
|
||||||
|
|
||||||
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
-- Pronominal nps are ordered differently, and light nps come before negation in clauses.
|
||||||
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
-- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19
|
||||||
|
|
||||||
param
|
param
|
||||||
Weight = WPron | WLight | WHeavy | WDefArt ; -- HL: may need WIndefArt for nicht+ein => kein
|
Weight = WPron | WLight | WHeavy | WDefArt ;
|
||||||
oper -- to handle clause negation properly
|
oper
|
||||||
isPron : {w : Weight} -> Bool = \np ->
|
isPron : {w : Weight} -> Bool = \np ->
|
||||||
case np.w of {WPron => True ; _ => False} ;
|
case np.w of {WPron => True ; _ => False} ;
|
||||||
isLight : {w : Weight} -> Bool = \np ->
|
isLight : {w : Weight} -> Bool = \np ->
|
||||||
@@ -82,6 +104,9 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
--2 For $Verb$
|
--2 For $Verb$
|
||||||
|
|
||||||
|
param VAgr = -- Gender is irrelevant for verb forms, HL 8/2023
|
||||||
|
VAg Number Person ; -- except participles
|
||||||
|
|
||||||
param VForm =
|
param VForm =
|
||||||
VInf Bool -- True = with the particle "zu"
|
VInf Bool -- True = with the particle "zu"
|
||||||
| VFin Bool VFormFin -- True = prefix glued to verb
|
| VFin Bool VFormFin -- True = prefix glued to verb
|
||||||
@@ -130,8 +155,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
oper
|
oper
|
||||||
agrP3 : Number -> Agr = agrgP3 Neutr ;
|
agrP3 : Number -> Agr = agrgP3 Neutr ;
|
||||||
|
|
||||||
agrgP3 : Gender -> Number -> Agr = \g,n ->
|
agrgP3 : Gender -> Number -> Agr = \g,n -> case n of {
|
||||||
Ag g n P3 ;
|
Sg => AgSgP3 g ;
|
||||||
|
Pl => AgPl P3 -- no gender in Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
gennum : Gender -> Number -> GenNum = \g,n ->
|
gennum : Gender -> Number -> GenNum = \g,n ->
|
||||||
case n of {
|
case n of {
|
||||||
@@ -172,10 +199,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
_ => Weak
|
_ => Weak
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vFin : Bool -> Mood -> Tense -> Agr -> VForm = \b,m,t,a ->
|
vFin : Bool -> Mood -> Tense -> VAgr -> VForm = \b,m,t,a ->
|
||||||
let
|
let
|
||||||
an = numberAgr a ;
|
an : Number = numberAgr a ;
|
||||||
ap = personAgr a ;
|
ap : Person = personAgr a ;
|
||||||
in
|
in
|
||||||
case <t,m> of {
|
case <t,m> of {
|
||||||
<Pres,MIndic> => VFin b (VPresInd an ap) ;
|
<Pres,MIndic> => VFin b (VPresInd an ap) ;
|
||||||
@@ -186,11 +213,15 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
_ => VInf False --# notpresent
|
_ => VInf False --# notpresent
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjAgr : Agr -> Agr -> Agr = \a,b -> mkAgr {
|
agr2vagr : Agr -> VAgr = \r -> case r of {
|
||||||
g = Neutr ; ----
|
AgSgP1 => VAg Sg P1 ;
|
||||||
n = conjNumber (numberAgr a) (numberAgr b) ;
|
AgSgP2 => VAg Sg P2 ;
|
||||||
p = conjPerson (personAgr a) (personAgr b)
|
AgSgP3 g => VAg Sg P3 ;
|
||||||
} ;
|
AgPl p => VAg Pl p ;
|
||||||
|
AgPlPol => VAg Pl P3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
vagrP3 : Number -> VAgr = \n -> VAg n P3 ;
|
||||||
|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
--TYPE DEFINITIONS + WORST-CASE CONSTRUCTORS
|
--TYPE DEFINITIONS + WORST-CASE CONSTRUCTORS
|
||||||
@@ -415,51 +446,44 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- To apply a preposition to a complement.
|
-- To apply a preposition to a complement.
|
||||||
|
|
||||||
appPrep : Preposition -> (Case => Str) -> Str = \prep,arg ->
|
appPrep : Preposition -> (Case => Str) -> Str = \prep,arg ->
|
||||||
prep.s ! GPl ++ arg ! prep.c ++ prep.s2 ;
|
prep.s ! GPl ++ arg ! prep.c ++ prep.s2 ;
|
||||||
|
|
||||||
appPrepNP : Preposition -> NP -> Str = \prep,np ->
|
appPrepNP : Preposition -> NP -> Str = \prep,np ->
|
||||||
let
|
let
|
||||||
g = (genderAgr np.a) ;
|
g : Gender = genderAgr np.a ;
|
||||||
n = (numberAgr np.a) ;
|
n : Number = numberAgr np.a ;
|
||||||
glues = case <prep.isPrep,n> of {<isPrepDefArt,Sg> => True ; _ => False} ;
|
glues = case <prep.isPrep,n> of {<isPrepDefArt,Sg> => True ; _ => False} ;
|
||||||
nps = np.s ! glues ! prep.c
|
nps = np.s ! glues ! prep.c
|
||||||
in
|
in
|
||||||
case <glues, np.w> of {
|
case <glues, np.w> of {
|
||||||
<True, WDefArt> => -- e.g. "zum Hof|zur Tür|zum Fenster herein"
|
<True, WDefArt> => -- e.g. "zum Hof|zur Tür|zum Fenster herein"
|
||||||
prep.s ! (GSg g) ++ nps ++ np.ext ++ prep.s2 ++ np.rc ;
|
prep.s ! (GSg g) ++ nps ++ np.ext ++ prep.s2 ++ np.rc ;
|
||||||
_ => prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc
|
_ => prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
-- Simplify to test the effect on grammar compilation complexity (without SlashV2VNP):
|
{- -- Simplify to test the effect on grammar compilation complexity (without SlashV2VNP):
|
||||||
-- with glues = False: 27096 msec, 3,2M VerbGer.gfo, 854K SentenceGer.gfo
|
-- with glues = False: 27096 msec, 3,2M VerbGer.gfo, 854 SentenceGer.gfo
|
||||||
-- and SlashV2VNP:102597 msec, 16 M VerbGer.gfo, 854K SentenceGer.gfo (good!)
|
-- and SlashV2VNP:102597 msec, 16 M VerbGer.gfo, 854 SentenceGer.gfo (good!)
|
||||||
appPrepNP : Preposition -> NP -> Str = \prep,np ->
|
appPrepNP : Preposition -> NP -> Str = \prep,np ->
|
||||||
let
|
let
|
||||||
glues = False ;
|
glues = False ;
|
||||||
nps = np.s ! glues ! prep.c
|
nps = np.s ! glues ! prep.c
|
||||||
in prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc ;
|
in prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc ;
|
||||||
-}
|
-}
|
||||||
|
|
||||||
bigNP : NP -> Str = \np -> np.ext ++ np.rc ;
|
bigNP : NP -> Str = \np -> np.ext ++ np.rc ;
|
||||||
|
|
||||||
|
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
||||||
|
|
||||||
|
noPreposition : Case -> Preposition = \c ->
|
||||||
|
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase} ;
|
||||||
|
|
||||||
-- To build a preposition from just a case. -- HL 9/19: moved to mkPrep in ParadigmsGer
|
-- To build a preposition from just a case. -- HL 9/19: moved to mkPrep in ParadigmsGer
|
||||||
|
|
||||||
PrepNom : Preposition = {s = \\_ => []; isPrep = isCase ; c = Nom ; s2 = []} ;
|
PrepNom : Preposition = {s = \\_ => []; isPrep = isCase ; c = Nom ; s2 = []} ;
|
||||||
|
|
||||||
vonDat : Preposition = {s=table{GPl => "von" ; GSg Fem => "von der"; _ => "vom"};
|
vonDat : Preposition = {s=table{GPl => "von" ; GSg Fem => "von der"; _ => "vom"};
|
||||||
s2=[]; c=Dat; isPrep=isPrepDefArt} ;
|
s2=[]; c=Dat; isPrep=isPrepDefArt} ;
|
||||||
-- for testing:
|
|
||||||
Dat' : Preposition = {s = \\_ => []; s2 = []; c=Dat; isPrep=isCase} ;
|
|
||||||
mit' : Preposition = {s = \\_ => "zusammen mit"; s2 = []; c=Dat; isPrep=isPrep} ;
|
|
||||||
|
|
||||||
zuDat' : Preposition = {s=\\_ => "zu"; s2="herein"; c=Dat; isPrep=isPrep} ;
|
|
||||||
zum' : Preposition = {s= table{GPl => "zu"; GSg Fem =>"zur"; _ => "zum"};
|
|
||||||
s2="herein"; c=Dat; isPrep=isPrepDefArt} ;
|
|
||||||
inDat' : Preposition = {s= \\_ => "in" ; s2="drin"; c=Dat; isPrep=isPrep} ;
|
|
||||||
im' : Preposition = {s= table{GPl => "in"; GSg Fem=>"in der"; _ =>"im"};
|
|
||||||
s2="drin"; c=Dat; isPrep=isPrepDefArt} ;
|
|
||||||
inAcc' : Preposition = {s=\\_ => "in"; s2="hinein"; c=Acc; isPrep=isPrep} ;
|
|
||||||
ins' : Preposition = {s=table{GPl => "in"; GSg Masc=>"in den"; GSg Fem=>"in die"; GSg Neutr=>"ins"};
|
|
||||||
s2="hinein"; c=Acc; isPrep=isPrepDefArt} ;
|
|
||||||
|
|
||||||
-- To build passive: accusative object -> nom subject; others -> same case or prep
|
-- To build passive: accusative object -> nom subject; others -> same case or prep
|
||||||
|
|
||||||
@@ -473,8 +497,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- Here we define personal and relative pronouns.
|
-- Here we define personal and relative pronouns.
|
||||||
-- All personal pronouns, except "ihr", conform to the simple pattern $mkPronPers$.
|
-- All personal pronouns, except "ihr", conform to the simple pattern $mkPronPers$.
|
||||||
|
|
||||||
mkPronPers : (x1,_,_,_,x5 : Str) -> Gender -> Number -> Person ->
|
mkPronPers : (x1,_,_,_,x5 : Str) -> Gender -> Number -> Person ->
|
||||||
{s : NPForm => Str ; a : Agr} =
|
{s : NPForm => Str ; a : Agr} =
|
||||||
\ich,mich,mir,meiner,mein,g,n,p -> {
|
\ich,mich,mir,meiner,mein,g,n,p -> {
|
||||||
s = table {
|
s = table {
|
||||||
NPCase c => caselist ich mich mir meiner ! c ;
|
NPCase c => caselist ich mich mir meiner ! c ;
|
||||||
@@ -486,7 +510,12 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
a = Ag g n p
|
a = case <g,n,p> of {
|
||||||
|
<_,Pl,p > => AgPl p ;
|
||||||
|
<g,Sg,P3> => AgSgP3 g ;
|
||||||
|
<_,Sg,P1> => AgSgP1 ;
|
||||||
|
<_,Sg,P2> => AgSgP2 -- for "man", "Sie", set in StructuralGer HL
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
pronEnding : GenNum => Case => Str = table {
|
pronEnding : GenNum => Case => Str = table {
|
||||||
@@ -503,30 +532,14 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
GPl => caselist "die" "die" "den" "der"
|
GPl => caselist "die" "die" "den" "der"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{- -- used in SymbolGer:
|
|
||||||
artDefContr : GenNum -> PCase -> Str = \gn,np -> case np of {
|
|
||||||
NPC c => artDef ! gn ! c ;
|
|
||||||
NPP p => case <p,gn> of {
|
|
||||||
<CAnDat, GSg (Masc | Neutr)> => "am" ;
|
|
||||||
<CInAcc, GSg Neutr> => "ins" ;
|
|
||||||
<CInDat, GSg (Masc | Neutr)> => "im" ;
|
|
||||||
<CZuDat, GSg Masc> => "zum" ;
|
|
||||||
<CZuDat, GSg Neutr> => "zum" ;
|
|
||||||
<CZuDat, GSg Fem> => "zur" ;
|
|
||||||
<CVonDat, GSg (Masc | Neutr)> => "vom" ;
|
|
||||||
_ => let sp = prepC np in sp.s ++ artDef ! gn ! sp.c
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
|
|
||||||
-- This is used when forming determiners that are like adjectives.
|
-- This is used when forming determiners that are like adjectives.
|
||||||
|
|
||||||
appAdj : Adjective -> Number => Gender => Case => Str = \adj ->
|
appAdj : Adjective -> Number => Gender => Case => Str = \adj ->
|
||||||
let
|
let
|
||||||
ad : GenNum -> Case -> Str = \gn,c ->
|
ad : GenNum -> Case -> Str = \gn,c ->
|
||||||
adj.s ! Posit ! AMod gn c
|
adj.s ! Posit ! AMod gn c
|
||||||
in
|
in
|
||||||
\\n,g,c => case n of {Sg => ad (GSg g) c ;_ => ad GPl c} ;
|
\\n,g,c => case n of {Sg => ad (GSg g) c ; _ => ad GPl c} ;
|
||||||
|
|
||||||
-- This auxiliary gives the forms in each degree of adjectives.
|
-- This auxiliary gives the forms in each degree of adjectives.
|
||||||
|
|
||||||
@@ -559,7 +572,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- For $Verb$.
|
-- For $Verb$.
|
||||||
|
|
||||||
VPC : Type = {
|
VPC : Type = {
|
||||||
s : Bool => Agr => VPForm => { -- True = prefix glued to verb
|
s : Bool => VAgr => VPForm => { -- True = prefix glued to verb
|
||||||
fin : Str ; -- wird
|
fin : Str ; -- wird
|
||||||
inf, inf2 : Str -- lesen,[] | gelesen,haben | können,haben (= gekonnt,haben)
|
inf, inf2 : Str -- lesen,[] | gelesen,haben | können,haben (= gekonnt,haben)
|
||||||
} -- HL 11/6/2019 Fut Anter: lesen gekonnt haben => haben lesen können
|
} -- HL 11/6/2019 Fut Anter: lesen gekonnt haben => haben lesen können
|
||||||
@@ -575,8 +588,9 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
ext : Str ; -- sentential complement of V(2)S, V(2)Q, e.g. dass|ob sie kommt
|
ext : Str ; -- sentential complement of V(2)S, V(2)Q, e.g. dass|ob sie kommt
|
||||||
inf : {inpl: (Agr => Str)*Str ; -- infinitival complement of V(2)V HL 3/2022
|
inf : {inpl: (Agr => Str)*Str ; -- infinitival complement of V(2)V HL 3/2022
|
||||||
extr: (Agr => Str)} ; -- e.g. ihn [] versuchen (lasse) [, ihr zu helfen]
|
extr: (Agr => Str)} ; -- e.g. ihn [] versuchen (lasse) [, ihr zu helfen]
|
||||||
c1 : Preposition -- case of subject
|
c1 : Preposition -- case of subject
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash = VP ** {c2 : Preposition ; objCtrl : Bool} ; -- HL 3/2019 objCtr added
|
VPSlash = VP ** {c2 : Preposition ; objCtrl : Bool} ; -- HL 3/2019 objCtr added
|
||||||
|
|
||||||
-- objCtrl distinguishes object-control from subject-control verb v:V2V in VP.s:
|
-- objCtrl distinguishes object-control from subject-control verb v:V2V in VP.s:
|
||||||
@@ -587,26 +601,26 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
let
|
let
|
||||||
isAux = vp.isAux ;
|
isAux = vp.isAux ;
|
||||||
verb = vp.s ;
|
verb = vp.s ;
|
||||||
vfin : Bool -> Mood -> Tense -> Agr -> Str = \b,m,t,a ->
|
vfin : Bool -> Mood -> Tense -> VAgr -> Str = \b,m,t,a ->
|
||||||
verb.s ! vFin b m t a ;
|
verb.s ! vFin b m t a ;
|
||||||
vinf = verb.s ! VInf False ;
|
vinf = verb.s ! VInf False ;
|
||||||
vpart = if_then_Str isAux vinf (verb.s ! VPastPart APred) ;
|
vpart = if_then_Str isAux vinf (verb.s ! VPastPart APred) ;
|
||||||
|
|
||||||
vHaben = auxPerfect verb ;
|
vHaben = auxPerfect verb ;
|
||||||
hat : Mood -> Tense -> Agr -> Str = \m,t,a ->
|
hat : Mood -> Tense -> VAgr -> Str = \m,t,a ->
|
||||||
vHaben ! vFin False m t a ;
|
vHaben ! vFin False m t a ;
|
||||||
haben : Str = vHaben ! VInf False ;
|
haben : Str = vHaben ! VInf False ;
|
||||||
|
|
||||||
wird : Mood -> Agr -> Str = \m,a ->
|
wird : Mood -> VAgr -> Str = \m,a ->
|
||||||
let
|
let
|
||||||
an = numberAgr a ;
|
an : Number = numberAgr a ;
|
||||||
ap = personAgr a ;
|
ap : Person = personAgr a ;
|
||||||
in
|
in
|
||||||
case m of {
|
case m of {
|
||||||
MIndic => werden_V.s ! VFin False (VPresInd an ap) ;
|
MIndic => werden_V.s ! VFin False (VPresInd an ap) ;
|
||||||
MConjunct => werden_V.s ! VFin False (VPresSubj an ap)
|
MConjunct => werden_V.s ! VFin False (VPresSubj an ap)
|
||||||
} ;
|
} ;
|
||||||
wuerde : Agr -> Str = \a -> --# notpresent
|
wuerde : VAgr -> Str = \a -> --# notpresent
|
||||||
werden_V.s ! VFin False (VImpfSubj (numberAgr a) (personAgr a)) ; --# notpresent
|
werden_V.s ! VFin False (VImpfSubj (numberAgr a) (personAgr a)) ; --# notpresent
|
||||||
|
|
||||||
auf = verb.prefix ;
|
auf = verb.prefix ;
|
||||||
@@ -759,10 +773,9 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> }
|
<vpnn.p1, vpnn.p2, vpnn.p3 ++ obj, vpnn.p4> }
|
||||||
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
} ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4)
|
||||||
|
|
||||||
|
|
||||||
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron
|
||||||
let prep = vp.c2 ; -- HL 7/22 reduced to c:Case
|
let prep = vp.c2 ;
|
||||||
obj : Agr => Str = \\a => prep.s ! GPl ++ reflPron ! a ! prep.c ++ prep.s2 ;
|
obj : Agr => Str = \\a => prep.s ! GPl ++ reflPron ! a ! prep.c ++ prep.s2
|
||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
@@ -837,14 +850,15 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp ->
|
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp ->
|
||||||
let vps = useVP vp in {
|
let vagr = agr2vagr agr ;
|
||||||
|
vps = useVP vp in {
|
||||||
s = \\m,t,a,b,o =>
|
s = \\m,t,a,b,o =>
|
||||||
let
|
let
|
||||||
ord = case o of {
|
ord = case o of {
|
||||||
Sub => True ; -- glue prefix to verb
|
Sub => True ; -- glue prefix to verb
|
||||||
_ => False
|
_ => False
|
||||||
} ;
|
} ;
|
||||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
verb = vps.s ! ord ! vagr ! VPFinite m t a ;
|
||||||
haben = verb.inf2 ;
|
haben = verb.inf2 ;
|
||||||
neg = negation ! b ;
|
neg = negation ! b ;
|
||||||
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ light nps
|
obj1 = (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ; -- refl ++ pronouns ++ light nps
|
||||||
@@ -912,7 +926,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
in
|
in
|
||||||
<
|
<
|
||||||
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.a2,
|
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.a2,
|
||||||
vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf, -- vp.a1 ! Pos
|
vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! vagrP3 Sg ! VPInfinit Simul).inf, -- vp.a1 ! Pos
|
||||||
vp.inf.inpl.p2, -- ! HL
|
vp.inf.inpl.p2, -- ! HL
|
||||||
infExt ++ vp.ext
|
infExt ++ vp.ext
|
||||||
> ;
|
> ;
|
||||||
@@ -923,7 +937,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
{
|
{
|
||||||
objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
||||||
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
||||||
pred = vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit ant).inf ;
|
pred = vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! vagrP3 Sg ! VPInfinit ant).inf ;
|
||||||
-- inplace and extracted parts of vp.inf:
|
-- inplace and extracted parts of vp.inf:
|
||||||
inpl = vp.inf.inpl ;
|
inpl = vp.inf.inpl ;
|
||||||
extr = vp.inf.extr
|
extr = vp.inf.extr
|
||||||
@@ -934,7 +948,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
\isAux, ant, pol, vp -> let vps = useVP vp in
|
\isAux, ant, pol, vp -> let vps = useVP vp in
|
||||||
{ objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
{ objs = \\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ negation ! pol ++ (vp.nn ! agr).p3
|
||||||
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
++ vp.a2 ++ (vp.nn ! agr).p4 ; -- objects + predicative A|CN|NP
|
||||||
pred = vp.inf.inpl.p2 ++ vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit ant).inf ;
|
pred = vp.inf.inpl.p2 ++ vp.a1 ++ vp.adj ++ (vps.s ! (notB isAux) ! vagrP3 Sg ! VPInfinit ant).inf ;
|
||||||
-- inplace and extracted parts of vp.inf:
|
-- inplace and extracted parts of vp.inf:
|
||||||
inpl = <vp.inf.inpl.p1, []> ; -- move the predicate part to pred
|
inpl = <vp.inf.inpl.p1, []> ; -- move the predicate part to pred
|
||||||
extr = vp.inf.extr
|
extr = vp.inf.extr
|
||||||
@@ -945,55 +959,67 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- let vpi = infVP isAux vp in
|
-- let vpi = infVP isAux vp in
|
||||||
-- vpi.p1 ! agrP3 Sg ++ vpi.p3 ++ vpi.p2 ++ vpi.p4 ;
|
-- vpi.p1 ! agrP3 Sg ++ vpi.p3 ++ vpi.p2 ++ vpi.p4 ;
|
||||||
let vpi = infVP isAux Simul Pos vp ; -- HL 3/2022
|
let vpi = infVP isAux Simul Pos vp ; -- HL 3/2022
|
||||||
agr : Agr = (Ag Masc Sg P3) ;
|
agr = agrP3 Sg ;
|
||||||
glue : (Agr => Str)*Str -> Str = \i -> i.p1!agr ++ i.p2
|
glue : (Agr => Str)*Str -> Str = \i -> i.p1 ! agr ++ i.p2
|
||||||
in
|
in
|
||||||
glue (embedInf vpi.inpl <vpi.objs, vpi.pred>) ++ vpi.extr!agr ++ vp.ext ;
|
glue (embedInf vpi.inpl <vpi.objs, vpi.pred>) ++ vpi.extr!agr ++ vp.ext ;
|
||||||
|
|
||||||
-- The nominative case is not used as reflexive, but defined here
|
-- The nominative case is not used as reflexive, but defined here
|
||||||
-- so that we can reuse this in personal pronouns.
|
-- so that we can reuse this in personal pronouns.
|
||||||
|
|
||||||
reflPron : Agr => Case => Str = table {
|
reflPron : Agr => Case => Str = table { -- with persPron nominative
|
||||||
Ag _ Sg P1 => caselist "ich" "mich" "mir" "meiner" ;
|
AgSgP1 => caselist "ich" "mich" "mir" "meiner" ;
|
||||||
Ag _ Sg P2 => caselist "du" "dich" "dir" "deiner" ;
|
AgSgP2 => caselist "du" "dich" "dir" "deiner" ;
|
||||||
Ag Masc Sg P3 => caselist "er" "sich" "sich" "seiner" ;
|
AgSgP3 Masc => caselist "er" "sich" "sich" "seiner" ;
|
||||||
Ag Fem Sg P3 => caselist "sie" "sich" "sich" "ihrer" ;
|
AgSgP3 Fem => caselist "sie" "sich" "sich" "ihrer" ;
|
||||||
Ag Neutr Sg P3 => caselist "es" "sich" "sich" "seiner" ;
|
AgSgP3 Neutr => caselist "es" "sich" "sich" "seiner" ;
|
||||||
Ag _ Pl P1 => caselist "wir" "uns" "uns" "unser" ;
|
AgPl P1 => caselist "wir" "uns" "uns" "unser" ;
|
||||||
Ag _ Pl P2 => caselist "ihr" "euch" "euch" "euer" ;
|
AgPl P2 => caselist "ihr" "euch" "euch" "euer" ;
|
||||||
Ag _ Pl P3 => caselist "sie" "sich" "sich" "ihrer"
|
AgPl P3 => caselist "sie" "sich" "sich" "ihrer" ;
|
||||||
|
AgPlPol => caselist "Sie" "sich" "sich" "Ihrer" -- HL 8/2023
|
||||||
|
-- AgSgP3Gen => caselist "man selbst" "sich" "sich" "seiner" ; -- älter als man selbst sein
|
||||||
|
-- ; AgPlReci => caselist "man" "einander" "einander" "einander" -- reciPron ?
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
possPron : Agr -> Number -> Gender -> Case -> Str = \a,n,g,c -> case <a,n,g> of {
|
possPron : Agr -> Number -> Gender -> Case -> Str = \a,n,g,c -> case <a,n,g> of {
|
||||||
<Ag _ Sg P1,Sg,Masc> => caselist "mein" "meinen" "meinem" "meines" ! c ;
|
<AgSgP1,Sg,Masc> => caselist "mein" "meinen" "meinem" "meines" ! c ;
|
||||||
<Ag _ Sg P1,Sg,Fem> => caselist "meine" "meine" "meiner" "meiner" ! c ;
|
<AgSgP1,Sg,Fem> => caselist "meine" "meine" "meiner" "meiner" ! c ;
|
||||||
<Ag _ Sg P1,Sg,Neutr> => caselist "mein" "mein" "meinem" "meines" ! c ;
|
<AgSgP1,Sg,Neutr> => caselist "mein" "mein" "meinem" "meines" ! c ;
|
||||||
<Ag _ Sg P1,Pl,_> => caselist "meine" "meine" "meinen" "meiner" ! c ;
|
<AgSgP1,Pl,_> => caselist "meine" "meine" "meinen" "meiner" ! c ;
|
||||||
<Ag _ Sg P2,Sg,Masc> => caselist "dein" "deinen" "deinem" "deines" ! c ;
|
<AgSgP2,Sg,Masc> => caselist "dein" "deinen" "deinem" "deines" ! c ;
|
||||||
<Ag _ Sg P2,Sg,Fem> => caselist "deine" "deine" "deiner" "deiner" ! c ;
|
<AgSgP2,Sg,Fem> => caselist "deine" "deine" "deiner" "deiner" ! c ;
|
||||||
<Ag _ Sg P2,Sg,Neutr> => caselist "dein" "dein" "deinem" "deines" ! c ;
|
<AgSgP2,Sg,Neutr> => caselist "dein" "dein" "deinem" "deines" ! c ;
|
||||||
<Ag _ Sg P2,Pl,_> => caselist "deine" "deine" "deinen" "deiner" ! c ;
|
<AgSgP2,Pl,_> => caselist "deine" "deine" "deinen" "deiner" ! c ;
|
||||||
|
|
||||||
<Ag (Masc|Neutr) Sg P3,Sg,Masc> => caselist "sein" "seinen" "seinem" "seines" ! c ;
|
|
||||||
<Ag (Masc|Neutr) Sg P3,Sg,Fem> => caselist "seine" "seine" "seiner" "seiner" ! c ;
|
|
||||||
<Ag (Masc|Neutr) Sg P3,Sg,Neutr> => caselist "sein" "sein" "seinem" "seines" ! c ;
|
|
||||||
<Ag (Masc|Neutr) Sg P3,Pl,_> => caselist "seine" "seine" "seinen" "seiner" ! c ;
|
|
||||||
|
|
||||||
<Ag _ _ P3,Sg,Masc> => caselist "ihr" "ihren" "ihrem" "ihres" ! c ;
|
<AgSgP3 Fem,Sg,Masc> => caselist "ihr" "ihren" "ihrem" "ihres" ! c ;
|
||||||
<Ag _ _ P3,Sg,Fem> => caselist "ihre" "ihre" "ihrer" "ihrer" ! c ;
|
<AgSgP3 Fem,Sg,Fem> => caselist "ihre" "ihre" "ihrer" "ihrer" ! c ;
|
||||||
<Ag _ _ P3,Sg,Neutr> => caselist "ihr" "ihr" "ihrem" "ihres" ! c ;
|
<AgSgP3 Fem,Sg,Neutr> => caselist "ihr" "ihr" "ihrem" "ihres" ! c ;
|
||||||
<Ag _ _ P3,Pl,_> => caselist "ihre" "ihre" "ihren" "ihrer" ! c ;
|
<AgSgP3 Fem,Pl,_> => caselist "ihre" "ihre" "ihren" "ihrer" ! c ;
|
||||||
|
|
||||||
<Ag _ Pl P1,Sg,Masc> => caselist "unser" "unseren" "unserem" "unseres" ! c ;
|
<AgSgP3 _,Sg,Masc> => caselist "sein" "seinen" "seinem" "seines" ! c ;
|
||||||
<Ag _ Pl P1,Sg,Fem> => caselist "unsere" "unsere" "unserer" "unserer" ! c ;
|
<AgSgP3 _,Sg,Fem> => caselist "seine" "seine" "seiner" "seiner" ! c ;
|
||||||
<Ag _ Pl P1,Sg,Neutr> => caselist "unser" "unser" "unserem" "unseres" ! c ;
|
<AgSgP3 _,Sg,Neutr> => caselist "sein" "sein" "seinem" "seines" ! c ;
|
||||||
<Ag _ Pl P1,Pl,_> => caselist "unsere" "unsere" "unseren" "unserer" ! c ;
|
<AgSgP3 _,Pl,_> => caselist "seine" "seine" "seinen" "seiner" ! c ;
|
||||||
|
|
||||||
<Ag _ Pl P2,Sg,Masc> => caselist "euer" "euren" "eurem" "eures" ! c ;
|
<AgPl P1,Sg,Masc> => caselist "unser" "unseren" "unserem" "unseres" ! c ;
|
||||||
<Ag _ Pl P2,Sg,Fem> => caselist "eure" "eure" "eurer" "eurer" ! c ;
|
<AgPl P1,Sg,Fem> => caselist "unsere" "unsere" "unserer" "unserer" ! c ;
|
||||||
<Ag _ Pl P2,Sg,Neutr> => caselist "euer" "euer" "eurem" "eures" ! c ;
|
<AgPl P1,Sg,Neutr> => caselist "unser" "unser" "unserem" "unseres" ! c ;
|
||||||
<Ag _ Pl P2,Pl,_> => caselist "eure" "eure" "euren" "eurer" ! c
|
<AgPl P1,Pl,_> => caselist "unsere" "unsere" "unseren" "unserer" ! c ;
|
||||||
|
|
||||||
|
<AgPl P2,Sg,Masc> => caselist "euer" "euren" "eurem" "eures" ! c ;
|
||||||
|
<AgPl P2,Sg,Fem> => caselist "eure" "eure" "eurer" "eurer" ! c ;
|
||||||
|
<AgPl P2,Sg,Neutr> => caselist "euer" "euer" "eurem" "eures" ! c ;
|
||||||
|
<AgPl P2,Pl,_> => caselist "eure" "eure" "euren" "eurer" ! c ;
|
||||||
|
|
||||||
|
<AgPl P3,Sg,Masc> => caselist "ihr" "ihren" "ihrem" "ihres" ! c ;
|
||||||
|
<AgPl P3,Sg,Fem> => caselist "ihre" "ihre" "ihrer" "ihrer" ! c ;
|
||||||
|
<AgPl P3,Sg,Neutr> => caselist "ihr" "ihr" "ihrem" "ihres" ! c ;
|
||||||
|
<AgPl P3,Pl,_> => caselist "ihre" "ihre" "ihren" "ihrer" ! c ;
|
||||||
|
|
||||||
|
<AgPlPol,Sg,Masc> => caselist "Ihr" "Ihren" "Ihrem" "Ihres" ! c ;
|
||||||
|
<AgPlPol,Sg,Fem> => caselist "Ihre" "Ihre" "Ihrer" "Ihrer" ! c ;
|
||||||
|
<AgPlPol,Sg,Neutr> => caselist "Ihr" "Ihr" "Ihrem" "Ihres" ! c ;
|
||||||
|
<AgPlPol,Pl,_> => caselist "Ihre" "Ihre" "Ihren" "Ihrer" ! c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjThat : Str = "dass" ;
|
conjThat : Str = "dass" ;
|
||||||
@@ -1022,11 +1048,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Function that allows the construction of non-nominative subjects.
|
-- Function that allows the construction of non-nominative subjects.
|
||||||
|
|
||||||
mkSubject : NP -> Preposition -> {s:Str ; a:Agr} = \np, prep ->
|
mkSubject : NP -> Preposition -> {s:Str ; a:Agr} = \np, prep ->
|
||||||
let
|
let
|
||||||
subj = appPrepNP prep np ;
|
agr = case prep.c of { Nom => np.a ; _ => AgSgP3 Masc } ;
|
||||||
agr = case prep.c of { Nom => np.a ; _ => Ag Masc Sg P3 }
|
subj = appPrepNP prep np
|
||||||
in {s = subj ; a = agr} ;
|
in {s = subj ; a = agr} ;
|
||||||
|
|
||||||
sex2gender : Sex -> Gender = \g ->
|
sex2gender : Sex -> Gender = \g ->
|
||||||
|
|||||||
@@ -21,17 +21,23 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let
|
let
|
||||||
ps = case n of {
|
ps = case n of {
|
||||||
ImpF _ True => <P3,"Sie",True> ; -- setzen Sie sich
|
ImpF _ True => <P3,"Sie",True> ; -- setzen Sie sich Ihren Hut auf
|
||||||
_ => <P2,[],False>
|
_ => <P2,[],False> -- but: nimm [ihren | deinen | *Ihren] Hut
|
||||||
} ;
|
} ; -- vp should be reflexive, ComplRSlash
|
||||||
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
vagr = VAg (numImp n) ps.p1 ;
|
||||||
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
verb = vps.s ! False ! vagr ! VPImperat ps.p3 ;
|
||||||
|
agr = case <numImp n, ps.p1, ps.p3> of {
|
||||||
|
<_, P3,True> => AgPlPol ; -- sich | Ihr-
|
||||||
|
<Sg,P2,False> => AgSgP2 ; -- dich | dein-
|
||||||
|
<Pl,P2,False> => AgPl P2 ; -- euch | euer-
|
||||||
|
_ => AgSgP1 -- default, does not occur
|
||||||
|
} ;
|
||||||
neg = negation ! pol ;
|
neg = negation ! pol ;
|
||||||
inf = vp.inf.inpl.p2 ++ verb.inf ; -- HL .s/.inpl.p2
|
inf = vp.inf.inpl.p2 ++ verb.inf ; -- HL .s/.inpl.p2
|
||||||
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.adj
|
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.adj
|
||||||
in
|
in
|
||||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ neg ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ neg ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvImp adv imp = {
|
AdvImp adv imp = {
|
||||||
s = \\pol,impform => adv.s ++ imp.s ! pol ! impform
|
s = \\pol,impform => adv.s ++ imp.s ! pol ! impform
|
||||||
@@ -42,9 +48,9 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
-- + SlashVP 414720 (28224,204)
|
-- + SlashVP 414720 (28224,204)
|
||||||
|
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
let subj = mkSubject np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
let subj = mkSubject np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
||||||
in mkClause subj.s subj.a vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
in mkClause subj.s subj.a vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
||||||
-- cf. tests/german/TestLangGer.gf
|
-- cf. tests/german/TestLangGer.gf
|
||||||
AdvSlash slash adv = {
|
AdvSlash slash adv = {
|
||||||
s = \\m,t,a,b,o => slash.s ! m ! t ! a ! b ! o ++ adv.s ;
|
s = \\m,t,a,b,o => slash.s ! m ! t ! a ! b ! o ++ adv.s ;
|
||||||
c2 = slash.c2
|
c2 = slash.c2
|
||||||
@@ -54,7 +60,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
|
|
||||||
SlashVS np vs slash =
|
SlashVS np vs slash =
|
||||||
let subj = mkSubject np PrepNom ;
|
let subj = mkSubject np PrepNom ;
|
||||||
vp = (insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs))
|
vp = insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)
|
||||||
in mkClause subj.s subj.a vp ** {c2 = slash.c2} ;
|
in mkClause subj.s subj.a vp ** {c2 = slash.c2} ;
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete StructuralGer of Structural = CatGer **
|
concrete StructuralGer of Structural = CatGer **
|
||||||
|
|
||||||
open MorphoGer, MakeStructuralGer, (X = ConstructX),
|
open MorphoGer, MakeStructuralGer, (X = ConstructX),
|
||||||
(P = ParadigmsGer), IrregGer, Prelude, (R = ResGer) in {
|
(P = ParadigmsGer), IrregGer, Prelude, (R = ResGer) in {
|
||||||
@@ -52,13 +52,13 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ;
|
if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ;
|
||||||
in8front_Prep = mkPrep "vor" P.dative ;
|
in8front_Prep = mkPrep "vor" P.dative ;
|
||||||
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ;
|
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ;
|
||||||
-- in_Prep = mkPrep [] (NPP CInDat) ;
|
in_Prep = P.inDat_Prep ;
|
||||||
in_Prep = P.inDat_Prep ; -- HL 7/2022
|
|
||||||
it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ;
|
it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ;
|
||||||
less_CAdv = X.mkCAdv "weniger" "als" ;
|
less_CAdv = X.mkCAdv "weniger" "als" ;
|
||||||
many_Det = let tab = (detLikeAdj False Pl "viel").s
|
many_Det = let tab = (detLikeAdj False Pl "viel").s
|
||||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
more_CAdv = X.mkCAdv "mehr" "als" ;
|
more_CAdv = X.mkCAdv "mehr" "als" ;
|
||||||
|
-- most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ;
|
||||||
most_Predet = { -- HL 5/2022
|
most_Predet = { -- HL 5/2022
|
||||||
s = \\n,g,c => let gn = R.gennum g n ;
|
s = \\n,g,c => let gn = R.gennum g n ;
|
||||||
adj = (P.mkA "viel" "mehr" "meiste").s ! Superl
|
adj = (P.mkA "viel" "mehr" "meiste").s ! Superl
|
||||||
@@ -67,7 +67,7 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
c = {p = [] ; k = PredCase Gen} ;
|
c = {p = [] ; k = PredCase Gen} ;
|
||||||
a = PAg Pl} ;
|
a = PAg Pl} ;
|
||||||
much_Det = {s = asQuant (\\_,_ => "viel") ; sp = asQuant (\\_,_ => "vieles") ;
|
much_Det = {s = asQuant (\\_,_ => "viel") ; sp = asQuant (\\_,_ => "vieles") ;
|
||||||
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
must_VV = auxVV
|
must_VV = auxVV
|
||||||
(mkV
|
(mkV
|
||||||
"müssen" "muss" "musst" "muss" "müsst" "müss"
|
"müssen" "muss" "musst" "muss" "müsst" "müss"
|
||||||
@@ -81,26 +81,27 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
on_Prep = mkPrep "auf" P.dative ;
|
on_Prep = mkPrep "auf" P.dative ;
|
||||||
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
||||||
otherwise_PConj = ss "sonst" ;
|
otherwise_PConj = ss "sonst" ;
|
||||||
part_Prep = P.von_Prep ; -- obsolete, use PartNP cn np
|
part_Prep = P.von_Prep ; -- obsolete, better use PartNP cn np
|
||||||
please_Voc = ss "bitte" ;
|
please_Voc = ss "bitte" ;
|
||||||
possess_Prep = P.von_Prep ; -- obsolete, use PossNP cn np
|
possess_Prep = P.von_Prep ; -- obsolete, better use PossNP cn np
|
||||||
quite_Adv = ss "ziemlich" ;
|
quite_Adv = ss "ziemlich" ;
|
||||||
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
||||||
so_AdA = ss "so" ;
|
so_AdA = ss "so" ;
|
||||||
somebody_NP = nameNounPhrase Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ;
|
somebody_NP = nameNounPhrase Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ;
|
||||||
somePl_Det = let tab = (detLikeAdj True Pl "einig").s
|
somePl_Det = let tab = (detLikeAdj True Pl "einig").s
|
||||||
in {s,sp = asQuant tab ; isDef = True ; n = Pl ; a = Weak ; hasDefArt = False} ;
|
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = True ; hasDefArt = False} ;
|
||||||
someSg_Det = {
|
someSg_Det = {
|
||||||
s,sp = asQuant (\\g,c => "ein" + pronEnding ! GSg g ! c) ; ---- einer,eines
|
s,sp = asQuant (\\g,c => "ein" + pronEnding ! GSg g ! c) ; ---- einer,eines
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
a = Strong ;
|
a = Strong ;
|
||||||
hasNum = True ;
|
hasNum = True ;
|
||||||
isDef = False ; hasDefArt = False
|
isDef = False ;
|
||||||
|
hasDefArt = False
|
||||||
} ;
|
} ;
|
||||||
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
|
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
|
||||||
somewhere_Adv = ss "irgendwo" ;
|
somewhere_Adv = ss "irgendwo" ;
|
||||||
that_Quant = let
|
that_Quant = let
|
||||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in
|
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in
|
||||||
{s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
{s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
|
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
|
||||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||||
@@ -110,7 +111,7 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
||||||
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
||||||
this_Quant = let
|
this_Quant = let
|
||||||
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in
|
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in
|
||||||
{s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
{s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||||
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||||
@@ -142,7 +143,7 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
with_Prep = mkPrep "mit" P.dative ;
|
with_Prep = mkPrep "mit" P.dative ;
|
||||||
youSg_Pron = mkPronPers "du" "dich" "dir" "deiner" "dein" Fem Sg P2 ;
|
youSg_Pron = mkPronPers "du" "dich" "dir" "deiner" "dein" Fem Sg P2 ;
|
||||||
youPl_Pron = mkPronPers "ihr" "euch" "euch" "eurer" "euer" Fem Pl P2 ; ---- poss
|
youPl_Pron = mkPronPers "ihr" "euch" "euch" "eurer" "euer" Fem Pl P2 ; ---- poss
|
||||||
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ;
|
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ** {a = AgPlPol} ;
|
||||||
yes_Utt = ss "ja" ;
|
yes_Utt = ss "ja" ;
|
||||||
|
|
||||||
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
||||||
@@ -168,15 +169,14 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
|
|
||||||
lin language_title_Utt = ss "Deutsch" ;
|
lin language_title_Utt = ss "Deutsch" ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
asQuant : (Gender => Case => Str) -> (Bool => Gender => Case => Str) =
|
asQuant : (Gender => Case => Str) -> (Bool => Gender => Case => Str) =
|
||||||
\tab -> \\_,g,c => tab ! g ! c ;
|
\tab -> \\_,g,c => tab ! g ! c ;
|
||||||
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||||
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
||||||
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
||||||
= \qt,nt -> \\g,c => {quant = qt ! g ! c; num = nt ! g ! c} ;
|
= \qt,nt -> \\g,c => {quant = qt ! g ! c; num = nt ! g ! c} ;
|
||||||
|
appAdjDegAdjf : Adjective -> Degree -> Adjf -> Number => Gender => Case => Str =
|
||||||
appAdjDegAdjf : Adjective -> Degree -> Adjf -> Number => Gender => Case => Str =
|
\adj,deg,adjf -> \\n,g,c => adj.s ! deg ! (agrAdj g adjf n c) ;
|
||||||
\adj,deg,adjf -> \\n,g,c => adj.s ! deg ! (agrAdj g adjf n c) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ lin
|
|||||||
NumPN i = {s = i.s ! Neutr ; g = Neutr ; n = Sg} ; --- c
|
NumPN i = {s = i.s ! Neutr ; g = Neutr ; n = Sg} ; --- c
|
||||||
|
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\b,c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
s = \\_,c => cn.s ! Weak ! Sg ! Nom ++ i.s ;
|
||||||
a = agrP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
w = WLight ;
|
w = WLight ;
|
||||||
ext,rc = [] -- added
|
ext,rc = [] -- added
|
||||||
@@ -21,11 +21,11 @@ lin
|
|||||||
ext,rc = [] -- added
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
-- s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
s = \\b,c => case b of {True => [] ; False => artDef ! (GSg cn.g) ! c}
|
||||||
s = \\_,c => artDef ! (GSg cn.g) ! c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ; -- HL 8/22 ad hoc
|
++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
||||||
a = agrP3 Sg ;
|
a = agrgP3 cn.g Sg ; -- HL 27.9.2023
|
||||||
w = WLight ;
|
w = WDefArt ; -- im Haus 14
|
||||||
ext,rc = []
|
ext,rc = [] -- added
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|||||||
@@ -21,14 +21,13 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
SlashV2a v = (predVc v) ;
|
SlashV2a v = (predVc v) ;
|
||||||
|
|
||||||
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
|
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
|
||||||
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
|
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
||||||
SlashV2Q v q =
|
SlashV2Q v q =
|
||||||
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
||||||
|
|
||||||
SlashV2V v vp = -- (jmdn) bitten, sich zu waschen | sich waschen lassen HL 7/19
|
SlashV2V v vp = -- (jmdn) bitten, sich zu waschen | sich waschen lassen HL 7/19
|
||||||
let
|
let
|
||||||
vps = predVGen v.isAux v ; -- e.g. verspricht|bittet.isAux=False | läßt.isAux=True
|
vps = predVGen v.isAux v ; -- e.g. verspricht|bittet.isAux=False | läßt.isAux=True
|
||||||
@@ -40,14 +39,12 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
||||||
|
|
||||||
-- to save (83669 - 67299 = 16370 msec) compile time, comment out:
|
|
||||||
ComplSlash vps np =
|
ComplSlash vps np =
|
||||||
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||||
-- HL 3/22 better before inserting np, using objCtrl
|
-- HL 3/22 better before inserting np, using objCtrl
|
||||||
let vp = case vps.objCtrl of { True => objAgr np vps ; _ => vps }
|
let vp = case vps.objCtrl of { True => objAgr np vps ; _ => vps }
|
||||||
** { c2 = vps.c2 ; objCtrl = vps.objCtrl } ;
|
** { c2 = vps.c2 ; objCtrl = vps.objCtrl } ;
|
||||||
in insertObjNP np vps.c2 vp ;
|
in insertObjNP np vps.c2 vp ;
|
||||||
-- compiler: + ComplSlash' 414720 (199680,352)
|
|
||||||
|
|
||||||
-- SlashVV v vps is like ComplVV v vp, but infinite vps should not be extracted
|
-- SlashVV v vps is like ComplVV v vp, but infinite vps should not be extracted
|
||||||
SlashVV v vp = -- HL 3/2022
|
SlashVV v vp = -- HL 3/2022
|
||||||
@@ -92,17 +89,18 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
-- expensive: + SlashV2VNP 503.884.800 (2880,540), reaches memory limit with SlashVV
|
-- expensive: + SlashV2VNP 503.884.800 (2880,540), reaches memory limit with SlashVV
|
||||||
-- does not work for nested uses: the nn-levels are confused HL 3/22
|
-- does not work for nested uses: the nn-levels are confused HL 3/22
|
||||||
|
|
||||||
-- to save a lot compile time and memory, avoid insertObjNP with glueing of prep+DefArt:
|
-- to save a lot compile time and memory, avoid insertObjNP with glueing of prep+DefArt:
|
||||||
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
-- + SlashV2VNP 110.592.000 (46080,240)
|
||||||
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
let prep = v.c2 ;
|
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
|
let prep = v.c2 ;
|
||||||
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
|
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
|
||||||
c = prep.c ;
|
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
|
||||||
w = np.w ;
|
c = prep.c ;
|
||||||
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
|
w = np.w ;
|
||||||
in
|
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
|
||||||
insertObj' obj b w c vps ;
|
in
|
||||||
|
insertObj' obj b w c vps ;
|
||||||
|
|
||||||
UseComp comp =
|
UseComp comp =
|
||||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||||
@@ -130,8 +128,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
AdvVPSlash vp adv = vp ** insertAdv adv.s vp ;
|
AdvVPSlash vp adv = vp ** insertAdv adv.s vp ;
|
||||||
AdVVPSlash adv vp = vp ** insertAdv adv.s vp ;
|
AdVVPSlash adv vp = vp ** insertAdv adv.s vp ;
|
||||||
|
|
||||||
-- ReflVP vp = insertObj (\\a => appPrep vp.c2
|
-- ReflVP vp = insertObj (\\a => appPrep vp.c2 (reflPron ! a)) vp ;
|
||||||
-- (\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
|
|
||||||
ReflVP vp = insertObjRefl vp ; -- HL, 19/06/2019
|
ReflVP vp = insertObjRefl vp ; -- HL, 19/06/2019
|
||||||
|
|
||||||
PassV2 v = -- acc object -> nom subject; all others: same PCase
|
PassV2 v = -- acc object -> nom subject; all others: same PCase
|
||||||
|
|||||||
Reference in New Issue
Block a user