mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Ger) Some lincats changed to remove number in plural; DetQuant and DetQuantOrd reimplemented
This commit is contained in:
@@ -41,7 +41,7 @@ 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.t of {
|
||||||
isCase => <appPrepNP a.c2 np, []> ;
|
isCase => <appPrepNP a.c2 np, []> ;
|
||||||
_ => <[], appPrepNP a.c2 np> }
|
_ => <[], appPrepNP a.c2 np> }
|
||||||
in {
|
in {
|
||||||
@@ -54,7 +54,7 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
|
|||||||
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.t of
|
||||||
{isCase => <compl, []> ; _ => <[], compl> }
|
{isCase => <compl, []> ; _ => <[], compl> }
|
||||||
in {
|
in {
|
||||||
s = a.s ! Posit ;
|
s = a.s ! Posit ;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ concrete CatGer of Cat =
|
|||||||
IP = {s : Case => Str ; n : Number} ;
|
IP = {s : Case => Str ; n : Number} ;
|
||||||
IComp = {s : Agr => Str ; ext : Str} ;
|
IComp = {s : Agr => Str ; ext : Str} ;
|
||||||
IDet = {s : Gender => Case => Str ; n : Number} ;
|
IDet = {s : Gender => Case => Str ; n : Number} ;
|
||||||
IQuant = {s : Number => Gender => Case => Str} ;
|
IQuant = {s : GenNum => Case => Str} ;
|
||||||
|
|
||||||
-- Relative
|
-- Relative
|
||||||
|
|
||||||
@@ -59,17 +59,16 @@ concrete CatGer of Cat =
|
|||||||
g : Gender
|
g : Gender
|
||||||
} ;
|
} ;
|
||||||
NP = ResGer.NP ;
|
NP = ResGer.NP ;
|
||||||
Pron = {s : NPForm => Str ; a : Agr} ;
|
Pron = {s : NPForm => Str ; a : Agr ; sp : PossForm => Str} ;
|
||||||
Det = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped, HL 8/22
|
Det = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped, HL 8/22
|
||||||
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} ;
|
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
|
|
||||||
-- second Bool is True if a cardinal number is present
|
|
||||||
Quant = {
|
Quant = {
|
||||||
s, sp : Bool => Bool => Number => Gender => Case => Str ;
|
s,sp : GenNum => Case => Str ;
|
||||||
a : Adjf ;
|
a : Adjf ;
|
||||||
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
hasDefArt : Bool ;
|
||||||
hasDefArt : Bool
|
delCardOne : Bool -- delete following cardinal 1 (IndefArt and no_Quant)
|
||||||
} ;
|
} ;
|
||||||
Predet = {
|
Predet = {
|
||||||
s : Number => Gender => Case => Str ;
|
s : Number => Gender => Case => Str ;
|
||||||
@@ -77,8 +76,8 @@ concrete CatGer of Cat =
|
|||||||
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
Num = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ;
|
Num = {s,sp : AForm => Str ; n : Number ; isNum : Bool} ; -- Num,Card.s AForm HL 12/23
|
||||||
Card = {s : Gender => Case => Str ; n : Number} ;
|
Card = {s : AForm => Str ; n : Number} ; -- inflection mainly for: einer,eine,eines
|
||||||
Ord = {s : AForm => Str} ;
|
Ord = {s : AForm => Str} ;
|
||||||
|
|
||||||
-- Numeral
|
-- Numeral
|
||||||
@@ -140,7 +139,7 @@ concrete CatGer of Cat =
|
|||||||
Conj = \c -> c.s1 ++ c.s2 ;
|
Conj = \c -> c.s1 ++ c.s2 ;
|
||||||
|
|
||||||
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.t of {isPrepDefArt => prep.s ! GSg Masc ;
|
||||||
_ => prep.s ! GPl } ;
|
_ => prep.s ! GPl } ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ lin
|
|||||||
in SyntaxGer.mkAdv (for_Prep | accPrep) n_hours_NP ;
|
in SyntaxGer.mkAdv (for_Prep | accPrep) n_hours_NP ;
|
||||||
|
|
||||||
timeunitRange l u time =
|
timeunitRange l u time =
|
||||||
{s = l.s ! R.Masc ! R.Nom ++ "bis" ++ u.s ! R.Masc ! R.Nom ++ time.s ! R.Pl ! R.Nom} ;
|
{s = l.s ! R.AMod (R.gennum R.Masc l.n) R.Nom ++ "bis" ++ u.s ! R.AMod (R.gennum R.Masc u.n) R.Nom ++ time.s ! R.Pl ! R.Nom} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkHour : Str -> Str -> Str -> Hour
|
mkHour : Str -> Str -> Str -> Hour
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ lin CompoundN a x =
|
|||||||
in {
|
in {
|
||||||
s = adj.s ! Posit ;
|
s = adj.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = case adj.c2.isPrep of {False => <compl, []> ; True => <[], compl>} ;
|
c = case adj.c2.t of {False => <compl, []> ; True => <[], compl>} ;
|
||||||
ext = rnp.ext ++ rnp.rc
|
ext = rnp.ext ++ rnp.rc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ lin CompoundN a x =
|
|||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case <prep.isPrep, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
case <prep.t, 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,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,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
|
<False,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ 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 {a => iq.s ! numberAgr a ! genderAgr a ! Nom} ; ext = ""} ;
|
CompIQuant iq = {s = table {a => iq.s ! (gennum (genderAgr a) (numberAgr a))! Nom} ; ext = ""} ;
|
||||||
|
|
||||||
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
IAdvAdv adv = {s = "wie" ++ adv.s} ;
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
ReflPoss num cn =
|
ReflPoss num cn =
|
||||||
{s = \\a,c => let adjf = case num.n of {Sg => Strong ; Pl => Weak} -- Duden 477, HL 5/2022
|
{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,
|
in possPron a num.n cn.g c ++ num.s ! AMod (gennum cn.g num.n) c -- HL 5/2022: meine wenigstens 3 cn,
|
||||||
++ cn.s ! adjfCase adjf c ! num.n ! c -- not: wenigstens 3 meine cn
|
++ cn.s ! adjfCase adjf c ! num.n ! c -- not: wenigstens 3 meine cn
|
||||||
++ cn.adv ;
|
++ cn.adv ;
|
||||||
ext = cn.ext ; rc = cn.rc ! num.n ;
|
ext = cn.ext ; rc = cn.rc ! num.n ;
|
||||||
@@ -231,7 +231,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
in {
|
in {
|
||||||
s = adj.s ! Posit ;
|
s = adj.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = case adj.c2.isPrep of {isCase => <compl, []> ; _ => <[], compl>} ;
|
c = case adj.c2.t of {isCase => <compl, []> ; _ => <[], compl>} ;
|
||||||
ext = rnp.ext ++ rnp.rc
|
ext = rnp.ext ++ rnp.rc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case <prep.isPrep, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
case <prep.t, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
||||||
<isCase,True,Acc> => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ; -- pronoun switch:
|
<isCase,True,Acc> => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ; -- pronoun switch:
|
||||||
<isCase,True,_> => <vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4> ; -- accPron < pron
|
<isCase,True,_> => <vpnn.p1 ++ obj ! a, vpnn.p2, vpnn.p3, vpnn.p4> ; -- accPron < pron
|
||||||
<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
|
||||||
@@ -288,7 +288,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case <prep.isPrep, rnp.isPron, c> of { -- consider non-pron rnp as light, add to vpnn.p2
|
case <prep.t, 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,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,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
|
<False,False,_> => <vpnn.p1, vpnn.p2 ++ obj ! a, vpnn.p3, vpnn.p4> ; -- < non-pron nominal
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ oper
|
|||||||
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 = <>} ;
|
||||||
|
|
||||||
mkPredet = overload {
|
mkPredet = overload {
|
||||||
mkPredet : A -> Predet = \a ->
|
mkPredet : A -> Predet = \a ->
|
||||||
@@ -27,11 +27,11 @@ oper
|
|||||||
|
|
||||||
-- e.g. das selbe
|
-- e.g. das selbe
|
||||||
mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
|
||||||
s,sp = \\b,x,n,g,c => q.s ! b ! x ! n ! g ! c ++ a.s ! Posit ! agrAdj g q.a n c
|
s,sp = \\gn,c => q.s ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c
|
||||||
} ;
|
} ;
|
||||||
-- e.g. derjenige
|
-- e.g. derjenige
|
||||||
mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
|
||||||
s,sp = \\b,x,n,g,c => q.s ! b ! x ! n ! g ! c + a.s ! Posit ! agrAdj g q.a n c
|
s,sp = \\gn,c => q.s ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../common:../../prelude
|
--# -path=.:../common:../prelude:
|
||||||
--
|
--
|
||||||
----1 A Simple German Resource Morphology
|
----1 A Simple German Resource Morphology
|
||||||
----
|
----
|
||||||
@@ -18,7 +18,7 @@ oper
|
|||||||
-- For $StructuralGer$.
|
-- For $StructuralGer$.
|
||||||
|
|
||||||
mkPrep : Str -> Case -> Preposition = \s,c ->
|
mkPrep : Str -> Case -> Preposition = \s,c ->
|
||||||
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep} ;
|
{s = \\_ => s ; s2 = [] ; c = c ; t = isPrep} ;
|
||||||
|
|
||||||
nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ;
|
nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ;
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
@@ -83,7 +83,7 @@ oper
|
|||||||
|
|
||||||
cardOrd : Str -> Str -> CardOrd => Str = \drei,dritte ->
|
cardOrd : Str -> Str -> CardOrd => Str = \drei,dritte ->
|
||||||
table {
|
table {
|
||||||
NCard _ _ => drei ;
|
NCard _ => drei ;
|
||||||
NOrd a => (regA (init dritte)).s ! Posit ! a
|
NOrd a => (regA (init dritte)).s ! Posit ! a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ oper
|
|||||||
regDigit : Str -> LinDigit = \vier ->
|
regDigit : Str -> LinDigit = \vier ->
|
||||||
mkDigit vier (vier + "zehn") (vier + "zig") (vier + "te") ;
|
mkDigit vier (vier + "zehn") (vier + "zig") (vier + "te") ;
|
||||||
|
|
||||||
invNum : CardOrd = NCard Masc Nom ;
|
invNum : CardOrd = NCard (AMod (GSg Masc) Nom) ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ lin InLN ln = {
|
|||||||
lin AdjLN ap ln = ln ** {
|
lin AdjLN ap ln = ln ** {
|
||||||
s = \\a,c =>
|
s = \\a,c =>
|
||||||
preOrPost ap.isPre
|
preOrPost ap.isPre
|
||||||
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj ln.g a ln.n c ++ ap.ext)
|
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj a (gennum ln.g ln.n) c ++ ap.ext)
|
||||||
(ln.s ! a ! c) ;
|
(ln.s ! a ! c) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\b,c => det.s ! b ! cn.g ! c ++ cn.s ! (adjfCase det.a c) ! det.n ! c ++ cn.adv ;
|
s = \\b,c => det.s ! b ! cn.g ! c ++ cn.s ! det.a ! det.n ! c ++ cn.adv ;
|
||||||
a = agrgP3 cn.g det.n ;
|
a = agrgP3 cn.g det.n ;
|
||||||
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
-- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann
|
||||||
-- HL 6/2019 (but:) sehe (die|einige) Männer nicht; don't see a|no man = sehe keinen Mann
|
-- HL 6/2019 (but:) sehe (die|einige) Männer nicht; don't see a|no man = sehe keinen Mann
|
||||||
@@ -24,7 +24,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
s = \\b,c => det.sp ! b ! Neutr ! c ;
|
s = \\b,c => det.sp ! b ! Neutr ! c ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
-- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr
|
||||||
w = case det.isDef of { True => WLight ; _ => WHeavy } ;
|
w = case det.isDef of { True => case det.hasDefArt of { True => WDefArt ;
|
||||||
|
_ => WLight } ;
|
||||||
|
_ => WHeavy } ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -71,59 +73,86 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
a = quant.a
|
a = quant.a ;
|
||||||
|
isDefArtSg = case n of {Sg => quant.hasDefArt ; _ => False} ;
|
||||||
|
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
||||||
|
quants : Bool => GenNum => Case => Str =
|
||||||
|
\\b => case andB b isDefArtSg of {True => \\gn,c => [] ; _ => quant.s} ;
|
||||||
|
nums : AForm => Str = \\af => case af of {
|
||||||
|
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
||||||
|
<True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num
|
||||||
|
<_,True> => num.sp ! af ; -- (der,dieser) eine ; (mein) einer
|
||||||
|
_ => num.s ! af } ;
|
||||||
|
_ => num.s ! APred}
|
||||||
in {
|
in {
|
||||||
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s!g!c
|
s = \\b,g,c => let gn = gennum g n in
|
||||||
++ ord.s ! agrAdj g (adjfCase a c) n c ;
|
quants ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ;
|
||||||
sp = \\b,g,c => quant.sp ! b ! num.isNum ! n ! g ! c ++ num.s!g!c
|
sp = \\b,g,c => let gn = gennum g n in
|
||||||
++ ord.s ! agrAdj g (adjfCase quant.aPl c) n c ;
|
quants ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ;
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = a ;
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
isDef = case a of {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})
|
isDefArtSg = case n of {Sg => quant.hasDefArt ; _ => False} ;
|
||||||
|
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
||||||
|
quants : Bool => GenNum => Case => Str =
|
||||||
|
\\b => case andB b isDefArtSg of {True => \\gn,c => [] ; _ => quant.s} ;
|
||||||
|
quantsp' : GenNum => Case => Str =
|
||||||
|
\\gn,c => case num.isNum of {True => quant.s ! gn ! c ;
|
||||||
|
False => quant.sp ! gn ! c} ;
|
||||||
|
quantsp : Bool => GenNum => Case => Str =
|
||||||
|
\\b => case andB b isDefArtSg of {True => \\gn,c => [] ; False => quantsp'} ;
|
||||||
|
nums : AForm => Str = \\af => case af of {
|
||||||
|
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
||||||
|
<True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num
|
||||||
|
<_,True> => num.sp ! af ; -- (der,dieser) eine ; (mein) einer
|
||||||
|
_ => num.s ! af } ;
|
||||||
|
AMod GPl c => num.s ! APred ;
|
||||||
|
APred => num.s ! APred}
|
||||||
in {
|
in {
|
||||||
s = \\b,g,c => quant.s ! b ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
s = \\b,g,c => quants ! b ! (gennum g n) ! c ++ nums ! agrAdj a (gennum g n) c ;
|
||||||
sp = \\_,g,c => quant.sp ! False ! num.isNum ! n ! g ! c ++ num.s ! g ! c ;
|
sp = \\b,g,c => quantsp ! b ! (gennum g n) ! c ++ nums ! agrAdj a (gennum g n) c ;
|
||||||
-- HL: der+er,den+en ; der drei,den drei+en
|
|
||||||
n = n ;
|
n = n ;
|
||||||
a = case n of {Sg => a ; Pl => quant.aPl} ;
|
a = a ;
|
||||||
isDef = case <quant.a, quant.aPl> of {<Strong,Strong> => False ; _ => True} ;
|
isDef = case a of {Strong => False ; _ => True} ;
|
||||||
hasDefArt = quant.hasDefArt ;
|
hasDefArt = quant.hasDefArt
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
PossPron p = {
|
|
||||||
s = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
|
||||||
sp = \\_,_,n,g,c => p.s ! NPPoss (gennum g n) c ;
|
|
||||||
a = Strong ;
|
|
||||||
aPl = Weak ;
|
|
||||||
hasDefArt = False ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
NumCard n = n ** {isNum = True} ;
|
PossPron p = {
|
||||||
|
s = \\gn,c => p.s ! NPPoss gn c ; -- mein (dritter)
|
||||||
|
sp = \\gn,c => p.sp ! PossF gn c ; -- meiner
|
||||||
|
a = Mixed ;
|
||||||
|
hasDefArt = False ;
|
||||||
|
delCardOne = False ;
|
||||||
|
} ;
|
||||||
|
|
||||||
NumPl = {s = \\g,c => []; n = Pl ; isNum = False} ;
|
NumCard n = n ** {
|
||||||
NumSg = {s = \\g,c => []; n = Sg ; isNum = False} ;
|
isNum = True ;
|
||||||
|
sp = table {AMod gn c => n.s ! APred ++ BIND ++ adjEnding ! gn ! c ;
|
||||||
|
APred => n.s ! APred}
|
||||||
|
} ;
|
||||||
|
|
||||||
NumDigits numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumPl = {s,sp = \\_ => []; n = Pl ; isNum = False} ;
|
||||||
OrdDigits numeral = {s = table{APred => "am" ++ numeral.s ! NOrd APred ++ BIND ++ "en" ;
|
NumSg = {s,sp = \\_ => []; n = Sg ; isNum = False} ;
|
||||||
af => numeral.s ! NOrd af}} ;
|
|
||||||
|
NumDigits digits = {s = \\af => digits.s ! NCard af ; n = digits.n} ;
|
||||||
|
OrdDigits digits = {s = table{APred => "am" ++ digits.s ! NOrd APred ++ BIND ++ "en" ;
|
||||||
|
af => digits.s ! NOrd af}} ;
|
||||||
|
|
||||||
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
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 decimal = {s = \\af => decimal.s ! NCard af ; n = decimal.n } ;
|
||||||
|
|
||||||
NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumNumeral numeral = {s = \\af => numeral.s ! NCard af ; n = numeral.n } ;
|
||||||
OrdNumeral numeral = {s = table{APred => "am" ++ numeral.s ! NOrd APred ++ BIND ++ "en" ;
|
OrdNumeral numeral = {s = table{APred => "am" ++ numeral.s ! NOrd APred ++ BIND ++ "en" ;
|
||||||
af => numeral.s ! NOrd af}} ;
|
af => numeral.s ! NOrd af}} ;
|
||||||
|
|
||||||
AdNum adn num = {s = \\g,c => adn.s ++ num.s!g!c; n = num.n } ;
|
AdNum adn num = {s = \\af => adn.s ++ num.s ! af ; n = num.n } ;
|
||||||
|
|
||||||
OrdSuperl a = {s = table {APred => "am" ++ a.s ! Superl ! APred ++ BIND ++ "en" ;
|
OrdSuperl a = {s = table {APred => "am" ++ a.s ! Superl ! APred ++ BIND ++ "en" ;
|
||||||
af => a.s ! Superl ! af}} ;
|
af => a.s ! Superl ! af}} ;
|
||||||
@@ -134,33 +163,24 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} -- drittbeste
|
af => n.s ! NOrd APred ++ Predef.BIND ++ a.s ! Superl ! af} -- drittbeste
|
||||||
} ;
|
} ;
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = table{True => \\_,n,g,c => [] ; -- definite article dropped
|
s = \\gn,c => artDef ! gn ! c ;
|
||||||
False => \\_,n,g,c => artDef ! (gennum g n) ! c} ;
|
sp = \\gn,c => case <numGenNum gn,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 ! gn ! c } ;
|
||||||
_ => artDef ! (gennum g n) ! c } ; -- von den+en
|
a = Weak ;
|
||||||
a, aPl = Weak ;
|
hasDefArt = True ;
|
||||||
hasDefArt = True
|
delCardOne = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IndefArt = {
|
IndefArt = {
|
||||||
s = \\_ => table {
|
s = table {GSg g => \\c => "ein" + pronEnding ! (GSg g) ! c ;
|
||||||
True => \\_,_,c => [] ;
|
GPl => \\c => []} ;
|
||||||
False => table {
|
sp = table {GSg g => \\c => "ein" + detEnding ! (GSg g) ! c ;
|
||||||
Sg => \\g,c => "ein" + pronEnding ! GSg g ! c ;
|
GPl => caselist "einige" "einige" "einigen" "einiger"} ;
|
||||||
Pl => \\_,c => []
|
a = MixedStrong ; -- Sg Mixed, Pl Strong
|
||||||
}
|
hasDefArt = False ;
|
||||||
} ;
|
delCardOne = True ;
|
||||||
sp = \\_ => table {
|
|
||||||
True => \\_,_,c => [] ;
|
|
||||||
False => table {
|
|
||||||
Sg => \\g,c => (detUnlikeAdj False Sg "ein").s ! g ! c ;
|
|
||||||
Pl => \\_,c => caselist "einige" "einige" "einigen" "einiger" ! c
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
a, aPl = Strong ;
|
|
||||||
hasDefArt = False
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
@@ -209,8 +229,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
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 a (gennum g n) c)
|
||||||
(cn.s ! a ! n ! c) ;
|
(cn.s ! a ! n ! c) ++ ap.ext ; -- comparison part of ap HL 11/2023;
|
||||||
g = g
|
g = g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -275,4 +295,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
ext = "" ;
|
ext = "" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
einziger : AForm => Str = table{AMod gn c => "einzig" + adjEnding ! gn ! c ; _ => "einziges"} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ lin
|
|||||||
|
|
||||||
pot01 = {
|
pot01 = {
|
||||||
s = \\f => table {
|
s = \\f => table {
|
||||||
NCard g c => "ein" + pronEnding ! GSg g ! c ;
|
NCard (AMod gn c) => "ein" + pronEnding ! gn ! c ;
|
||||||
|
NCard APred => "ein" ;
|
||||||
NOrd af => (regA "erst").s ! Posit ! af
|
NOrd af => (regA "erst").s ! Posit ! af
|
||||||
} ;
|
} ;
|
||||||
n = Sg
|
n = Sg
|
||||||
@@ -69,8 +70,7 @@ oper
|
|||||||
Dig = TDigit ;
|
Dig = TDigit ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
IDig d = {s = table{NCard g c => d.s ! NCard g c ;
|
IDig d = {s = d.s ;
|
||||||
NOrd amod => d.s ! NOrd amod} ;
|
|
||||||
n = d.n ;
|
n = d.n ;
|
||||||
isDig = True ;
|
isDig = True ;
|
||||||
tail1to19 = notB d.isZero} ;
|
tail1to19 = notB d.isZero} ;
|
||||||
@@ -84,7 +84,7 @@ oper
|
|||||||
b : Bool = case i.isDig of {True => isPld ; _ => notB i.tail1to19} ;
|
b : Bool = case i.isDig of {True => isPld ; _ => notB i.tail1to19} ;
|
||||||
i' : Digits = case b of {True => IDig (mkDig (i.s ! invNum ++ BIND ++ "s")) ;
|
i' : Digits = case b of {True => IDig (mkDig (i.s ! invNum ++ BIND ++ "s")) ;
|
||||||
_ => i }
|
_ => i }
|
||||||
in {s = table {NCard g c => d.s ! invNum ++ BIND ++ i.s ! NCard g c ;
|
in {s = table {NCard af => d.s ! invNum ++ BIND ++ i.s ! NCard af ;
|
||||||
NOrd af => d.s ! invNum ++ BIND ++ i'.s ! NOrd af} ;
|
NOrd af => d.s ! invNum ++ BIND ++ i'.s ! NOrd af} ;
|
||||||
n = Pl ;
|
n = Pl ;
|
||||||
isDig = False ;
|
isDig = False ;
|
||||||
@@ -120,14 +120,14 @@ oper
|
|||||||
mkDig : Str -> TDigit = \c -> mk3Dig c (c + "t") Pl ; -- like Duden 464 (4.Auflage)
|
mkDig : Str -> TDigit = \c -> mk3Dig c (c + "t") Pl ; -- like Duden 464 (4.Auflage)
|
||||||
|
|
||||||
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||||
s = table {NCard _ _ => c ; -- 0,...,9
|
s = table {NCard _ => c ; -- 0,...,9
|
||||||
NOrd af => (regA o).s ! Posit ! af} ; -- (ein) 0ter .. 9ter | (der) 0te ... 9te
|
NOrd af => (regA o).s ! Posit ! af} ; -- (ein) 0ter .. 9ter | (der) 0te ... 9te
|
||||||
n = n ; -- NOrd APred: "0",... or "am 0ten",... ?
|
n = n ; -- NOrd APred: "0",... or "am 0ten",... ?
|
||||||
isZero = False
|
isZero = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mk2Dig : Str -> TDigit = \crd ->
|
mk2Dig : Str -> TDigit = \crd ->
|
||||||
{s = table {NCard g c => crd ;
|
{s = table {NCard af => crd ;
|
||||||
NOrd af => (regA (crd + "t")).s ! Posit ! af} ;
|
NOrd af => (regA (crd + "t")).s ! Posit ! af} ;
|
||||||
n = Sg ;
|
n = Sg ;
|
||||||
isZero = False
|
isZero = False
|
||||||
|
|||||||
@@ -579,16 +579,16 @@ mkV2 : overload {
|
|||||||
|
|
||||||
mkPrep = overload {
|
mkPrep = overload {
|
||||||
mkPrep : Str -> Case -> Prep = \s,c ->
|
mkPrep : Str -> Case -> Prep = \s,c ->
|
||||||
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep ; lock_Prep = <>} ;
|
{s = \\_ => s ; s2 = [] ; c = c ; t = isPrep ; lock_Prep = <>} ;
|
||||||
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 ; t = 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 ; t = 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 ; t = isPrepDefArt ; lock_Prep = <>} ;
|
||||||
mkPrep : Case -> Prep = \c ->
|
mkPrep : Case -> Prep = \c ->
|
||||||
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase ; lock_Prep = <>}
|
{s = \\_ => [] ; s2 = [] ; c = c ; t = isCase ; lock_Prep = <>}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
accPrep = mkPrep accusative ;
|
accPrep = mkPrep accusative ;
|
||||||
@@ -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 ; -- accPrep sets isPrep=False
|
dirV3 v p = mkV3 v accPrep p ; -- accPrep, datPrep have t=isCase
|
||||||
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 = <>} ;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
|||||||
UttVP vp = {s = useInfVP True vp} ; -- without zu
|
UttVP vp = {s = useInfVP True vp} ; -- without zu
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
UttCN n = {s = n.s ! Strong ! Sg ! Nom ++ n.adv ++ n.ext ++ n.rc ! Sg} ;
|
UttCN n = {s = n.s ! Strong ! Sg ! Nom ++ n.adv ++ n.ext ++ n.rc ! Sg} ;
|
||||||
UttCard n = {s = n.s ! Neutr ! Nom} ;
|
UttCard n = {s = n.s ! AMod (GSg Neutr) Nom} ;
|
||||||
UttAP ap = {s = ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext} ;
|
UttAP ap = {s = ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.ext} ;
|
||||||
UttInterj i = i ;
|
UttInterj i = i ;
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ concrete QuestionGer of Question = CatGer ** open ResGer in {
|
|||||||
let
|
let
|
||||||
n = num.n
|
n = num.n
|
||||||
in {
|
in {
|
||||||
s = \\g,c => idet.s ! n ! g ! c ++ num.s!g!c ;
|
s = \\g,c => idet.s ! (gennum g n) ! c ++ num.s ! AMod (gennum g n) c ;
|
||||||
n = n
|
n = n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
-- Complex $CN$s, like adjectives, have strong and weak forms.
|
-- Complex $CN$s, like adjectives, have strong and weak forms.
|
||||||
|
|
||||||
Adjf = Strong | Weak ;
|
Adjf = Strong | Weak | Mixed | MixedStrong ;
|
||||||
|
|
||||||
-- Gender distinctions are only made in the singular.
|
-- Gender distinctions are only made in the singular.
|
||||||
|
|
||||||
@@ -75,6 +75,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
param NPForm = NPCase Case | NPPoss GenNum Case ;
|
param NPForm = NPCase Case | NPPoss GenNum Case ;
|
||||||
|
|
||||||
|
-- Possessive pronouns have special forms for stand-alone usage as NP (mein.sp = meiner).
|
||||||
|
|
||||||
|
param PossForm = PossF GenNum Case ;
|
||||||
|
|
||||||
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
-- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich").
|
||||||
-- A number is sometimes inherited ("alle Menschen"), sometimes forced ("jeder von
|
-- A number is sometimes inherited ("alle Menschen"), sometimes forced ("jeder von
|
||||||
-- den Menschen").
|
-- den Menschen").
|
||||||
@@ -147,7 +151,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
--2 For $Numeral$
|
--2 For $Numeral$
|
||||||
|
|
||||||
CardOrd = NCard Gender Case | NOrd AForm ;
|
CardOrd = NCard AForm | NOrd AForm ;
|
||||||
DForm = DUnit | DTeen | DTen ;
|
DForm = DUnit | DTeen | DTen ;
|
||||||
|
|
||||||
--2 Transformations between parameter types
|
--2 Transformations between parameter types
|
||||||
@@ -166,7 +170,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
Pl => GPl
|
Pl => GPl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Needed in $RelativeGer$.
|
-- Needed in $RelativeGer$ and $NounGer$.
|
||||||
|
|
||||||
numGenNum : GenNum -> Number = \gn ->
|
numGenNum : GenNum -> Number = \gn ->
|
||||||
case gn of {
|
case gn of {
|
||||||
@@ -174,24 +178,32 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
GPl => Pl
|
GPl => Pl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
genGenNum : GenNum -> Gender = \gn ->
|
||||||
|
case gn of {GSg g => g ; GPl => Masc} ;
|
||||||
|
|
||||||
-- Used in $NounGer$.
|
-- Used in $NounGer$.
|
||||||
|
|
||||||
agrAdj : Gender -> Adjf -> Number -> Case -> AForm = \g,a,n,c ->
|
agrAdj : Adjf -> GenNum -> Case -> AForm = \a,gn,c ->
|
||||||
let
|
let
|
||||||
gn = gennum g n ;
|
|
||||||
e = AMod (GSg Fem) Nom ;
|
e = AMod (GSg Fem) Nom ;
|
||||||
en = AMod (GSg Masc) Acc ;
|
en = AMod (GSg Masc) Acc ;
|
||||||
in
|
in
|
||||||
case a of {
|
case a of {
|
||||||
Strong => AMod gn c ;
|
Strong => AMod gn c ;
|
||||||
_ => case <gn,c> of {
|
Weak => case <gn,c> of {
|
||||||
<GSg _, Nom> => e ;
|
<GSg _, Nom> => e ;
|
||||||
<GSg Masc,Acc> => en ;
|
<GSg Masc,Acc> => en ;
|
||||||
<GSg _, Acc> => e ;
|
<GSg _, Acc> => e ;
|
||||||
_ => en
|
_ => en } ;
|
||||||
}
|
Mixed => case <gn,c> of {
|
||||||
|
<GSg g, Nom|Acc> => AMod gn c ;
|
||||||
|
_ => en } ;
|
||||||
|
MixedStrong => case <gn,c> of {
|
||||||
|
<GSg _, Dat|Gen> => en ;
|
||||||
|
_ => AMod gn c }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- This is used twice in NounGer.
|
-- This is used twice in NounGer.
|
||||||
|
|
||||||
adjfCase : Adjf -> Case -> Adjf = \a,c -> case c of {
|
adjfCase : Adjf -> Case -> Adjf = \a,c -> case c of {
|
||||||
@@ -437,11 +449,11 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
PrepType = isCase | isPrep | isPrepDefArt ; -- HL 7/2022
|
PrepType = isCase | isPrep | isPrepDefArt ; -- HL 7/2022
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Preposition : Type = {s : GenNum => Str ; s2:Str ; c : Case ; isPrep : PrepType} ;
|
Preposition : Type = {s : GenNum => Str ; s2:Str ; c : Case ; t : PrepType} ;
|
||||||
|
|
||||||
isaCase : Preposition -> Bool = \p -> case p.isPrep of {isCase => True ; _ => False} ;
|
isaCase : Preposition -> Bool = \p -> case p.t of {isCase => True ; _ => False} ;
|
||||||
isaPrep : Preposition -> Bool = \p -> case p.isPrep of {isPrep => True ; _ => False} ;
|
isaPrep : Preposition -> Bool = \p -> case p.t of {isPrep => True ; _ => False} ;
|
||||||
isaPrepDefArt : Preposition -> Bool = \p -> case p.isPrep of {isPrepDefArt => True ; _ => False} ;
|
isaPrepDefArt : Preposition -> Bool = \p -> case p.t of {isPrepDefArt => True ; _ => False} ;
|
||||||
|
|
||||||
-- To apply a preposition to a complement.
|
-- To apply a preposition to a complement.
|
||||||
|
|
||||||
@@ -452,7 +464,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
let
|
let
|
||||||
g : Gender = genderAgr np.a ;
|
g : Gender = genderAgr np.a ;
|
||||||
n : Number = numberAgr np.a ;
|
n : Number = numberAgr np.a ;
|
||||||
glues = case <prep.isPrep,n> of {<isPrepDefArt,Sg> => True ; _ => False} ;
|
glues = case <prep.t,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 {
|
||||||
@@ -476,19 +488,19 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
-- To build a preposition from just a case. -- HL 9/19: no longer used in RGL
|
||||||
|
|
||||||
noPreposition : Case -> Preposition = \c ->
|
noPreposition : Case -> Preposition = \c ->
|
||||||
{s = \\_ => [] ; s2 = [] ; c = c ; isPrep = isCase} ;
|
{s = \\_ => [] ; s2 = [] ; c = c ; t = 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 = \\_ => [] ; t = 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; t=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
|
||||||
|
|
||||||
subjPrep : Preposition -> Preposition = \prep ->
|
subjPrep : Preposition -> Preposition = \prep ->
|
||||||
case <prep.c,prep.isPrep> of {
|
case <prep.c,prep.t> of {
|
||||||
<Acc,isCase> => prep ** {c = Nom} ;
|
<Acc,isCase> => prep ** {c = Nom} ;
|
||||||
_ => prep
|
_ => prep
|
||||||
} ;
|
} ;
|
||||||
@@ -498,7 +510,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- 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 ; sp : PossForm => Str} =
|
||||||
\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 ;
|
||||||
@@ -515,13 +527,16 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
<g,Sg,P3> => AgSgP3 g ;
|
<g,Sg,P3> => AgSgP3 g ;
|
||||||
<_,Sg,P1> => AgSgP1 ;
|
<_,Sg,P1> => AgSgP1 ;
|
||||||
<_,Sg,P2> => AgSgP2 -- for "man", "Sie", set in StructuralGer HL
|
<_,Sg,P2> => AgSgP2 -- for "man", "Sie", set in StructuralGer HL
|
||||||
}
|
} ;
|
||||||
|
sp = table {PossF (GSg Masc) Nom => mein + "er" ; -- HL 12/23
|
||||||
|
PossF (GSg Neutr) (Nom|Acc) => mein + "es" ;
|
||||||
|
PossF gn c => mein + (pronEnding ! gn ! c)} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
pronEnding : GenNum => Case => Str = table {
|
pronEnding : GenNum => Case => Str = table {
|
||||||
GSg Masc => caselist "" "en" "em" "es" ;
|
GSg Masc => caselist "" "en" "em" "es" ;
|
||||||
GSg Fem => caselist "e" "e" "er" "er" ;
|
GSg Fem => caselist "e" "e" "er" "er" ;
|
||||||
GSg Neutr => caselist "" "" "em" "es" ;
|
GSg Neutr => caselist "" "" "em" "es" ;
|
||||||
GPl => caselist "e" "e" "en" "er"
|
GPl => caselist "e" "e" "en" "er"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -544,16 +559,16 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- This auxiliary gives the forms in each degree of adjectives.
|
-- This auxiliary gives the forms in each degree of adjectives.
|
||||||
|
|
||||||
adjForms : (x1,x2 : Str) -> AForm => Str = \teuer,teur ->
|
adjForms : (x1,x2 : Str) -> AForm => Str = \teuer,teur ->
|
||||||
table {
|
table {
|
||||||
APred => teuer ;
|
APred => teuer ;
|
||||||
AMod (GSg Masc) c =>
|
AMod gn c => teur + adjEnding ! gn ! c -- Strong Adjf
|
||||||
caselist (teur+"er") (teur+"en") (teur+"em") (teur+"en") ! c ;
|
} ;
|
||||||
AMod (GSg Fem) c =>
|
|
||||||
caselist (teur+"e") (teur+"e") (teur+"er") (teur+"er") ! c ;
|
adjEnding : GenNum => Case => Str = table {
|
||||||
AMod (GSg Neutr) c =>
|
GSg Masc => caselist "er" "en" "em" "en" ;
|
||||||
caselist (teur+"es") (teur+"es") (teur+"em") (teur+"en") ! c ;
|
GSg Fem => caselist "e" "e" "er" "er" ;
|
||||||
AMod GPl c =>
|
GSg Neutr => caselist "es" "es" "em" "en" ;
|
||||||
caselist (teur+"e") (teur+"e") (teur+"en") (teur+"er") ! c
|
GPl => caselist "e" "e" "en" "er"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- for some determiners, Gen form -es rather than -en
|
-- for some determiners, Gen form -es rather than -en
|
||||||
@@ -565,6 +580,13 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
a => adj ! a
|
a => adj ! a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
detEnding : GenNum => Case => Str = table {
|
||||||
|
GSg Masc => caselist "er" "en" "em" "es" ;
|
||||||
|
GSg Fem => caselist "e" "e" "er" "er" ;
|
||||||
|
GSg Neutr => caselist "es" "es" "em" "es" ;
|
||||||
|
GPl => caselist "e" "e" "en" "er"
|
||||||
|
} ;
|
||||||
|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
--VP CONSTRUCTION
|
--VP CONSTRUCTION
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@@ -744,7 +766,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp ->
|
||||||
let obj = appPrepNP prep np ;
|
let obj = appPrepNP prep np ;
|
||||||
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
|
b : Bool = case prep.t of {isPrep | isPrepDefArt => True ; _ => False} ;
|
||||||
w = np.w ;
|
w = np.w ;
|
||||||
c = prep.c
|
c = prep.c
|
||||||
in insertObj' obj b w c vp ;
|
in insertObj' obj b w c vp ;
|
||||||
@@ -779,7 +801,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
in vp ** {
|
in vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case prep.isPrep of {
|
case prep.t of {
|
||||||
isCase => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ;
|
isCase => <obj ! a ++ vpnn.p1, vpnn.p2, vpnn.p3, vpnn.p4> ;
|
||||||
_ => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4> }
|
_ => <vpnn.p1, obj ! a ++ vpnn.p2, vpnn.p3, vpnn.p4> }
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -33,12 +33,14 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
during_Prep = mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ;
|
during_Prep = mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ;
|
||||||
either7or_DConj = sd2 "entweder" "oder" ** {n = Sg} ;
|
either7or_DConj = sd2 "entweder" "oder" ** {n = Sg} ;
|
||||||
everybody_NP = nameNounPhrase Masc {s = caselist "jeder" "jeden" "jedem" "jedes"} ;
|
everybody_NP = nameNounPhrase Masc {s = caselist "jeder" "jeden" "jedem" "jedes"} ;
|
||||||
every_Det = let tab = (detUnlikeAdj False Sg "jed").s
|
every_Det = {
|
||||||
in {s,sp = asQuant tab ; n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
s,sp = \\_,g,c => "jed" + detEnding ! (gennum g Sg) ! c ;
|
||||||
|
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
everything_NP = nameNounPhrase Neutr {s = caselist "alles" "alles" "allem" "alles"} ;
|
everything_NP = nameNounPhrase Neutr {s = caselist "alles" "alles" "allem" "alles"} ;
|
||||||
everywhere_Adv = ss "überall" ;
|
everywhere_Adv = ss "überall" ;
|
||||||
few_Det = let tab = (detLikeAdj False Pl "wenig").s
|
few_Det = {
|
||||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
s,sp = \\_,g,c => "wenig" + adjEnding ! (gennum g Pl) ! c ;
|
||||||
|
n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||||
---- first_Ord = {s = (regA "erst").s ! Posit} ;
|
---- first_Ord = {s = (regA "erst").s ! Posit} ;
|
||||||
for_Prep = mkPrep "für" P.accusative ;
|
for_Prep = mkPrep "für" P.accusative ;
|
||||||
from_Prep = mkPrep "aus" P.dative ;
|
from_Prep = mkPrep "aus" P.dative ;
|
||||||
@@ -48,25 +50,27 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
here_Adv = ss "hier" ;
|
here_Adv = ss "hier" ;
|
||||||
how_IAdv = ss "wie" ;
|
how_IAdv = ss "wie" ;
|
||||||
how8much_IAdv = ss "wieviel" ;
|
how8much_IAdv = ss "wieviel" ;
|
||||||
how8many_IDet = {s = \\g,c => (detUnlikeAdj False Pl "wie viel").s ! g ! c ; n = Pl} ;
|
how8many_IDet = {s = \\g,c => "wie viel" + detEnding ! (gennum g Pl) ! c ; n = Pl} ;
|
||||||
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 = P.inDat_Prep ;
|
in_Prep = P.inDat_Prep ;
|
||||||
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 = {
|
||||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
s,sp = \\_,g,c => "viel" + adjEnding ! (gennum g Pl) ! c ;
|
||||||
|
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 = {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
|
||||||
in
|
in
|
||||||
R.artDef ! gn ! c ++ adj ! (agrAdj g Weak n c) ;
|
R.artDef ! gn ! c ++ adj ! (agrAdj Weak gn c) ;
|
||||||
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 = \\_,_,_ => "viel" ; sp = \\_,_,_ => "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
|
||||||
@@ -88,21 +92,18 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
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 = {
|
||||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = True ; hasDefArt = False} ;
|
s,sp = \\_,g,c => "einig" + adjEnding ! (gennum g Pl) ! c ;
|
||||||
|
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 = \\_,g,c => "ein" + pronEnding ! GSg g ! c ; -- ein, eine, ein
|
||||||
n = Sg ;
|
sp = \\_,g,c => "ein" + detEnding ! GSg g ! c ; -- einer, eine, eines
|
||||||
a = Strong ;
|
n = Sg ; a = Strong ; hasNum = True ; isDef = False ; hasDefArt = False
|
||||||
hasNum = True ;
|
|
||||||
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 = {
|
||||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in
|
s,sp = \\gn,c => "jen" + detEnding ! gn ! c ; a = Weak ; hasDefArt,delCardOne = 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" ;
|
||||||
there7to_Adv = ss "dahin" ;
|
there7to_Adv = ss "dahin" ;
|
||||||
@@ -110,9 +111,8 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
therefore_PConj = ss "deshalb" ;
|
therefore_PConj = ss "deshalb" ;
|
||||||
---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 = {
|
||||||
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in
|
s,sp = \\gn,c => "dies" + detEnding ! gn ! c ; a = Weak ; hasDefArt, delCardOne = 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} ;
|
||||||
through_Prep = mkPrep "durch" P.accusative ;
|
through_Prep = mkPrep "durch" P.accusative ;
|
||||||
@@ -134,8 +134,7 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
when_IAdv = ss "wann" ;
|
when_IAdv = ss "wann" ;
|
||||||
when_Subj = ss "wenn" ;
|
when_Subj = ss "wenn" ;
|
||||||
where_IAdv = ss "wo" ;
|
where_IAdv = ss "wo" ;
|
||||||
which_IQuant = {s = \\n,g,c => (detUnlikeAdj True n "welch").s ! g ! c} ;
|
which_IQuant = {s = \\gn,c => "welch" + detEnding ! gn ! c} ;
|
||||||
|
|
||||||
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
||||||
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016
|
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016
|
||||||
why_IAdv = ss "warum" ;
|
why_IAdv = ss "warum" ;
|
||||||
@@ -147,13 +146,11 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
yes_Utt = ss "ja" ;
|
yes_Utt = ss "ja" ;
|
||||||
|
|
||||||
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
||||||
no_Quant = let
|
no_Quant = {
|
||||||
keiner : Number => Gender => Case => Str = table {
|
s = table {GSg g => \\c => "kein" + pronEnding ! GSg g ! c ;
|
||||||
Sg => \\g,c => "kein" + pronEnding ! GSg g ! c ;
|
GPl => \\c => "kein" + detEnding ! GPl ! c} ;
|
||||||
Pl => (detUnlikeAdj False Pl "kein").s
|
sp = \\gn,c => "kein" + detEnding ! gn ! c ;
|
||||||
}
|
a = Mixed ; hasDefArt = False ; delCardOne = True} ; -- HL kein+ein(er) => kein(er)
|
||||||
in
|
|
||||||
{s,sp = \\_,_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
|
||||||
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
||||||
nobody_NP =
|
nobody_NP =
|
||||||
nameNounPhrase Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
nameNounPhrase Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
||||||
@@ -171,12 +168,14 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
|
|
||||||
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 -> GenNum => Case => Str =
|
||||||
\adj,deg,adjf -> \\n,g,c => adj.s ! deg ! (agrAdj g adjf n c) ;
|
\adj,deg,adjf -> \\gn,c => adj.s ! deg ! (agrAdj adjf gn c) ;
|
||||||
|
|
||||||
|
-- (detLikeAdj b n str).s = \\g,c => str + adjEnding ! (gennum g n) ! c
|
||||||
|
-- (detUnLikeAdj b n str).s = \\g,c => str + detEnding ! (gennum g n) ! c
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,32 +6,32 @@ lin
|
|||||||
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
SymbPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
||||||
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
IntPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
||||||
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
FloatPN i = {s = \\c => i.s ; g = Neutr ; n = Sg} ; --- c
|
||||||
NumPN i = {s = i.s ! Neutr ; g = Neutr ; n = Sg} ; --- c
|
NumPN i = {s = \\c => i.s ! APred ; g = Neutr ; n = Sg} ; --- c -- HL
|
||||||
|
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\_,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 = []
|
||||||
} ;
|
} ;
|
||||||
CNSymbNP det cn xs = let g = cn.g in {
|
CNSymbNP det cn xs = let g = cn.g in {
|
||||||
s = \\b,c => det.s ! b ! g ! c ++ cn.s ! adjfCase det.a c ! det.n ! c ++ xs.s ;
|
s = \\b,c => det.s ! b ! g ! c ++ cn.s ! adjfCase det.a c ! det.n ! c ++ xs.s ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
w = WLight ;
|
w = WLight ;
|
||||||
ext,rc = [] -- added
|
ext,rc = []
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\b,c => case b of {True => [] ; False => artDef ! (GSg cn.g) ! c}
|
s = \\b,c => case b of {True => [] ; False => artDef ! (GSg cn.g) ! c}
|
||||||
++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ;
|
++ cn.s ! Weak ! Sg ! Nom ++ i.s ! AMod (GSg Neutr) c ;
|
||||||
a = agrgP3 cn.g Sg ; -- HL 27.9.2023
|
a = agrgP3 cn.g Sg ; -- HL 27.9.2023
|
||||||
w = WDefArt ; -- im Haus 14
|
w = WDefArt ; -- im Haus 14
|
||||||
ext,rc = [] -- added
|
ext,rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|
||||||
SymbNum n = {s = \\_,_ => n.s ; n = Pl ; isNum = True} ;
|
SymbNum n = {s = \\_ => n.s ; n = Pl ; isNum = True} ;
|
||||||
SymbOrd n = {s = \\_ => glue n.s "."} ;
|
SymbOrd n = {s = \\_ => glue n.s "."} ;
|
||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
|
||||||
let prep = v.c2 ;
|
let prep = v.c2 ;
|
||||||
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
|
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
|
||||||
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
|
b : Bool = case prep.t of {isPrep | isPrepDefArt => True ; _ => False} ;
|
||||||
c = prep.c ;
|
c = prep.c ;
|
||||||
w = np.w ;
|
w = np.w ;
|
||||||
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
|
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
|
||||||
@@ -132,7 +132,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
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
|
||||||
let c = case <v.c2.c, v.c2.isPrep> of {
|
let c = case <v.c2.c, v.c2.t> of {
|
||||||
<Acc, isCase> => Nom ; _ => v.c2.c}
|
<Acc, isCase> => Nom ; _ => v.c2.c}
|
||||||
in insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = v.c2 ** {c = c} } ;
|
in insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = v.c2 ** {c = c} } ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user