mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Ger) Shrink Agr = Ag Gender Number Person from 3*2*3 = 18 values to 2+3+1+3+1 = 10 by
Agr = AgSgP1 | AgSgP2 | AgSgP3 Gender | AgSgP3Gen | AgPl Person | AgPlPol ;
with AgSgP3Gen resp. AgPlPol used for reflexive,possessive forms of "man", "Sie".
Compiles AllGer from src in 162sec with 15M VerbGer.gfo vs. 380sec with 17M VerbGer.gfo
This commit is contained in:
@@ -43,7 +43,7 @@ concrete AdjectiveGer of Adjective = CatGer ** open ResGer, Prelude in {
|
|||||||
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 ;
|
||||||
|
|||||||
@@ -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,14 +58,11 @@ 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 = {
|
||||||
@@ -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} ;
|
||||||
@@ -48,13 +52,13 @@ concrete ConjunctionGer of Conjunction =
|
|||||||
s1 = \\c => xs.s ! False ! c ++ bigNP xs ++ comma ++ x.s1 ! c ;
|
s1 = \\c => xs.s ! False ! c ++ bigNP xs ++ comma ++ x.s1 ! c ;
|
||||||
s2 = x.s2 ;
|
s2 = x.s2 ;
|
||||||
a = conjAgr xs.a x.a } ;
|
a = conjAgr xs.a x.a } ;
|
||||||
BaseAP x y = lin AP {
|
BaseAP x y = {
|
||||||
s1 = bigAP x ;
|
s1 = bigAP x ;
|
||||||
s2 = bigAP y ;
|
s2 = bigAP y ;
|
||||||
isPre = andB x.isPre y.isPre ;
|
isPre = andB x.isPre y.isPre ;
|
||||||
c = <[],[]> ;
|
c = <[],[]> ;
|
||||||
ext = []} ;
|
ext = []} ;
|
||||||
ConsAP xs x = lin AP {
|
ConsAP xs x = {
|
||||||
s1 = \\a => (bigAP xs) ! a ++ comma ++ x.s1 ! a ;
|
s1 = \\a => (bigAP xs) ! a ++ comma ++ x.s1 ! a ;
|
||||||
s2 = x.s2 ;
|
s2 = x.s2 ;
|
||||||
isPre = andB x.isPre xs.isPre ;
|
isPre = andB x.isPre xs.isPre ;
|
||||||
@@ -62,12 +66,12 @@ concrete ConjunctionGer of Conjunction =
|
|||||||
ext = []} ;
|
ext = []} ;
|
||||||
BaseRS x y = twoTable RelGenNum x y ** {c = y.c} ;
|
BaseRS x y = twoTable RelGenNum x y ** {c = y.c} ;
|
||||||
ConsRS xs x = consrTable RelGenNum comma xs x ** {c = xs.c} ;
|
ConsRS xs x = consrTable RelGenNum comma xs x ** {c = xs.c} ;
|
||||||
BaseCN x y = lin CN {
|
BaseCN x y = {
|
||||||
s1 = bigCN x ;
|
s1 = bigCN x ;
|
||||||
s2 = bigCN y ;
|
s2 = bigCN y ;
|
||||||
g = x.g ; --- gender of first CN, used e.g. in articles
|
g = x.g ; --- gender of first CN, used e.g. in articles
|
||||||
} ;
|
} ;
|
||||||
ConsCN x xs = lin CN {
|
ConsCN x xs = {
|
||||||
s1 = \\a,n,c => bigCN x ! a ! n ! c ++ comma ++ xs.s1 ! a ! n ! c ;
|
s1 = \\a,n,c => bigCN x ! a ! n ! c ++ comma ++ xs.s1 ! a ! n ! c ;
|
||||||
s2 = xs.s2 ;
|
s2 = xs.s2 ;
|
||||||
g = x.g ; --- gender of first CN, used e.g. in articles
|
g = x.g ; --- gender of first CN, used e.g. in articles
|
||||||
|
|||||||
@@ -1,42 +1,28 @@
|
|||||||
--# -path=.:../abstract
|
--# -path=.:../abstract
|
||||||
|
|
||||||
concrete ConstructionGer of Construction = CatGer **
|
concrete ConstructionGer of Construction = CatGer **
|
||||||
open SyntaxGer, SymbolicGer, (P = ParadigmsGer),
|
open SyntaxGer, SymbolicGer, ParadigmsGer,
|
||||||
(L = LexiconGer), (E = ExtraGer), (G = GrammarGer), (I = IrregGer), (R = ResGer), (N = NounGer), Prelude in {
|
(L = LexiconGer), (E = ExtraGer), (G = GrammarGer), (I = IrregGer), (R = ResGer), (N = NounGer), Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
oper
|
|
||||||
mkPrep : Str -> P.Case -> Prep = P.mkPrep ;
|
|
||||||
mkV2 : V -> V2 = P.mkV2 ;
|
|
||||||
accPrep = P.accPrep ;
|
|
||||||
datPrep = P.datPrep ;
|
|
||||||
anDat_Prep = P.anDat_Prep ;
|
|
||||||
inDat_Prep = P.inDat_Prep ;
|
|
||||||
|
|
||||||
dative = P.dative ;
|
|
||||||
accusative = P.accusative ;
|
|
||||||
feminine = P.feminine ;
|
|
||||||
neuter = P.neuter ;
|
|
||||||
regV = P.regV ;
|
|
||||||
invarA = P.invarA ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
hungry_VP = mkVP (P.mkA "hungrig") ;
|
hungry_VP = mkVP (mkA "hungrig") ;
|
||||||
thirsty_VP = mkVP (P.mkA "durstig") ;
|
thirsty_VP = mkVP (mkA "durstig") ;
|
||||||
tired_VP = mkVP (P.mkA "müde") ;
|
tired_VP = mkVP (mkA "müde") ;
|
||||||
scared_VP = mkVP have_V2 (mkNP (P.mkN "Angst" "Ängste" feminine)) ;
|
scared_VP = mkVP have_V2 (mkNP (mkN "Angst" "Ängste" feminine)) ;
|
||||||
ill_VP = mkVP (P.mkA "krank") ;
|
ill_VP = mkVP (mkA "krank") ;
|
||||||
ready_VP = mkVP (P.mkA "bereit") ;
|
ready_VP = mkVP (mkA "bereit") ;
|
||||||
|
|
||||||
has_age_VP card = mkVP (lin AP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A)) ;
|
has_age_VP card = mkVP (lin AP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A)) ;
|
||||||
|
|
||||||
have_name_Cl x y = mkCl (lin NP x) (mkV2 I.heißen_V) (lin NP y) ;
|
have_name_Cl x y = mkCl (lin NP x) (mkV2 I.heißen_V) (lin NP y) ;
|
||||||
married_Cl x y = ----mkCl (lin NP x) L.married_A2 (lin NP y) |
|
married_Cl x y = ----mkCl (lin NP x) L.married_A2 (lin NP y) |
|
||||||
mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (P.mkA "verheiratet") ;
|
mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "verheiratet") ;
|
||||||
|
|
||||||
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) I.heißen_V) ;
|
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) I.heißen_V) ;
|
||||||
---- how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ; ---- compilation slow
|
---- how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ; ---- compilation slow
|
||||||
how_old_QCl x = mkQCl (E.IAdvAdv (P.mkAdv "alt")) (mkCl (lin NP x) G.UseCopula) ; ----
|
how_old_QCl x = mkQCl (E.IAdvAdv (ParadigmsGer.mkAdv "alt")) (mkCl (lin NP x) G.UseCopula) ; ----
|
||||||
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (mkCl (mkVP (SyntaxGer.mkAdv to_Prep (lin NP x)))) ;
|
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (mkCl (mkVP (SyntaxGer.mkAdv to_Prep (lin NP x)))) ;
|
||||||
|
|
||||||
-- some more things
|
-- some more things
|
||||||
@@ -45,24 +31,12 @@ lin
|
|||||||
is_right_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Recht")) ;
|
is_right_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Recht")) ;
|
||||||
is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Unrecht")) ;
|
is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsGer.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 ;
|
bottle_of_CN np = N.ApposCN (mkCN (mkN "Flasche")) np ;
|
||||||
n_unit_CN card unit cn = mkCN (invarA ((mkUtt card).s ++ (mkUtt unit).s)) cn ;
|
cup_of_CN np = N.ApposCN (mkCN (mkN "Tasse")) np ;
|
||||||
|
glass_of_CN np = N.ApposCN (mkCN (mkN "Glas" "Gläser" neuter)) np ;
|
||||||
bottle_of_CN np = N.ApposCN (mkCN (P.mkN "Flasche")) np ;
|
|
||||||
cup_of_CN np = N.ApposCN (mkCN (P.mkN "Tasse")) np ;
|
|
||||||
glass_of_CN np = N.ApposCN (mkCN (P.mkN "Glas" "Gläser" neuter)) np ;
|
|
||||||
|
|
||||||
few_X_short_of_Y np x y = -- np.dat fehlen (wenige x).nom an y
|
|
||||||
let
|
|
||||||
xs : NP = (mkNP G.few_Det x) ;
|
|
||||||
ys : NP = (mkNP G.IndefArt y) ;
|
|
||||||
fehlen_V3 : V3 = P.mkV3 (regV "fehlen") datPrep (mkPrep "an" dative) ;
|
|
||||||
vp : VP = mkVP (mkVPSlash fehlen_V3 np) ys
|
|
||||||
in
|
|
||||||
mkS (mkCl xs vp) ;
|
|
||||||
|
|
||||||
-- spatial deixis and motion verbs
|
-- spatial deixis and motion verbs
|
||||||
where_go_QCl np = mkQCl (lin IAdv (ss "wohin")) (mkCl np (mkVP L.go_V)) ;
|
where_go_QCl np = mkQCl (lin IAdv (ss "wohin")) (mkCl np (mkVP L.go_V)) ;
|
||||||
@@ -72,103 +46,15 @@ lin
|
|||||||
come_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "her") ;
|
come_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "her") ;
|
||||||
come_from_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von hier") ;
|
come_from_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von hier") ;
|
||||||
|
|
||||||
go_there_VP = SyntaxGer.mkVP (SyntaxGer.mkVP L.go_V) (ParadigmsGer.mkAdv "hin") ;
|
go_there_VP = mkVP (mkVP L.go_V) (ParadigmsGer.mkAdv "hin") ;
|
||||||
come_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "hin") ;
|
come_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "hin") ;
|
||||||
come_from_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von dort") ;
|
come_from_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von dort") ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
|
||||||
Hour = {short:Str ; long:Str ; adv:Adv} ;
|
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
|
|
||||||
-- timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
|
||||||
-- timeunitRange : Card -> Card -> Timeunit -> Adv ; -- (cats live) ten to twenty years
|
|
||||||
lin
|
|
||||||
timeunitAdv n time =
|
|
||||||
let n_hours_NP : NP = mkNP n time
|
|
||||||
in SyntaxGer.mkAdv (for_Prep | accPrep) n_hours_NP ;
|
|
||||||
|
|
||||||
timeunitRange l u time =
|
|
||||||
{s = l.s ! R.Masc ! R.Nom ++ "bis" ++ u.s ! R.Masc ! R.Nom ++ time.s ! R.Pl ! R.Nom} ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
mkHour : Str -> Str -> Str -> Hour
|
|
||||||
= \n,m,daytime ->
|
|
||||||
let numeral : Str -> Str = \k -> (SyntaxGer.mkUtt (SyntaxGer.mkCard k)).s
|
|
||||||
in lin Hour {short = numeral n ; long = numeral m ; adv = P.mkAdv daytime} ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
oneHour = mkHour "1" "1" "nachts" ;
|
|
||||||
twoHour = mkHour "2" "2" "nachts" ;
|
|
||||||
threeHour = mkHour "3" "3" "nachts" ;
|
|
||||||
fourHour = mkHour "4" "4" "morgens" ;
|
|
||||||
fiveHour = mkHour "5" "5" "morgens" ;
|
|
||||||
sixHour = mkHour "6" "6" "morgens" ;
|
|
||||||
sevenHour = mkHour "7" "7" "morgens" ;
|
|
||||||
eightHour = mkHour "8" "8" "vormittags" ;
|
|
||||||
nineHour = mkHour "9" "9" "vormittags" ;
|
|
||||||
tenHour = mkHour "10" "10" "vormittags" ;
|
|
||||||
elevenHour = mkHour "11" "11" "vormittags" ;
|
|
||||||
twelveHour = mkHour "12" "12" "mittags" ;
|
|
||||||
thirteenHour = mkHour "13" "1" "mittags" ;
|
|
||||||
fourteenHour = mkHour "14" "2" "mittags" ;
|
|
||||||
fifteenHour = mkHour "15" "3" "nachmittags" ;
|
|
||||||
sixteenHour = mkHour "16" "4" "nachmittags" ;
|
|
||||||
seventeenHour = mkHour "17" "5" "nachmittags" ;
|
|
||||||
eighteenHour = mkHour "18" "6" "nachmittags" ;
|
|
||||||
nineteenHour = mkHour "19" "7" "abends" ;
|
|
||||||
twentyHour = mkHour "20" "8" "abends" ;
|
|
||||||
twentyOneHour = mkHour "21" "9" "abends" ;
|
|
||||||
twentyTwoHour = mkHour "22" "10" "abends" ;
|
|
||||||
twentyThreeHour = mkHour "23" "11" "abends" ;
|
|
||||||
twentyFourHour = mkHour "24" "12" "nachts" ;
|
|
||||||
|
|
||||||
-- timeHour : Hour -> Adv -- at three a.m./p.m.
|
|
||||||
-- um drei Uhr nachts/nachmittags
|
|
||||||
|
|
||||||
timeHour h = let ada : AdA = lin AdA {s = "um" ++ h.long ++ "Uhr"}
|
|
||||||
in SyntaxGer.mkAdv ada h.adv ;
|
|
||||||
|
|
||||||
-- timeHourMinute : Hour -> Card -> Adv ; -- at six forty a.m./p.m.
|
|
||||||
-- um sechs/achtzehn Uhr vierzig
|
|
||||||
timeHourMinute h card =
|
|
||||||
let min : Str = (SyntaxGer.mkUtt card).s
|
|
||||||
in P.mkAdv ("um" ++ h.short ++ "Uhr" ++ min) ;
|
|
||||||
|
|
||||||
{- -- Remark (HL 7/2023):
|
|
||||||
-- To avoid massive overgeneration, we'd better replace Card here by
|
|
||||||
cat
|
|
||||||
Minute ;
|
|
||||||
fun
|
|
||||||
timeHourMinute : Hour -> Minute -> Adv ; -- at six forty a.m./p.m.
|
|
||||||
min_1 : Minute ;
|
|
||||||
min_2 : Minute ; -- ... min_60 : Minute ;
|
|
||||||
lastMinute : Minute ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
Min : PType = Predef.Ints 3 ; -- short for 60
|
|
||||||
minutes : Min => Str = table {0 => "0" ; 1 => "1" ; 2 => "2" ; 3 => "3"} ;
|
|
||||||
mkMinute : Min -> Minute = \j -> lin Minute {s = minutes ! j ; i = j} ;
|
|
||||||
|
|
||||||
lincat
|
|
||||||
Minute = { s : Str ; i : Min } ;
|
|
||||||
lin
|
|
||||||
min_1 = mkMinute 1 ;
|
|
||||||
min_2 = mkMinute 2 ;
|
|
||||||
lastMinute = mkMinute 3 ;
|
|
||||||
timeHourMinute h m = P.mkAdv ("um" ++ h.short ++ ":" ++ m.s ++ "Uhr") ;
|
|
||||||
|
|
||||||
-- But this definition of timeHourMinute causes a compiler error! In
|
|
||||||
-- timeHourMinute = \h,m -> mkAdv (... ++ m.s ++ ..)
|
|
||||||
-- the argument m is not really restricted to Min, but an unbounded Int, so
|
|
||||||
-- m.s = {s = minutes ! j ; i = j}.s = (table (Ints 3) [...]) ! j
|
|
||||||
-- cannot be reduced in Compute.ConcreteNew, as *the compiler does not enforce*
|
|
||||||
-- 0 =< j =< 3.
|
|
||||||
-}
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
weekdayPunctualAdv w = SyntaxGer.mkAdv anDat_Prep (mkNP the_Det w) ; -- am Montag
|
weekdayPunctualAdv w = SyntaxGer.mkAdv anDat_Prep (mkNP the_Det w) ; -- am Montag
|
||||||
weekdayHabitualAdv w = SyntaxGer.mkAdv (mkPrep "" accusative) (mkNP every_Det w) ; ---- jeden Montag
|
weekdayHabitualAdv w = SyntaxGer.mkAdv (mkPrep "" accusative) (mkNP every_Det w) ; ---- jeden Montag
|
||||||
@@ -177,9 +63,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 ;
|
||||||
@@ -192,45 +78,37 @@ lin
|
|||||||
weekdayN w = w ;
|
weekdayN w = w ;
|
||||||
monthN m = m ;
|
monthN m = m ;
|
||||||
|
|
||||||
weekdayPN w = P.mkPN w ;
|
weekdayPN w = mkPN w ;
|
||||||
monthPN m = P.mkPN m ;
|
monthPN m = mkPN m ;
|
||||||
|
|
||||||
languageNP l = mkNP l ;
|
languageNP l = mkNP l ;
|
||||||
languageCN l = mkCN l ;
|
languageCN l = mkCN l ;
|
||||||
|
|
||||||
oper mkLanguage : Str -> N = \s -> P.mkN s neuter ; ---- produces Neuter
|
oper mkLanguage : Str -> N = \s -> mkN s neuter ; ---- produces Neuter
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
---- lexicon of special names
|
---- lexicon of special names
|
||||||
|
|
||||||
lin second_Timeunit = P.mkN "Sekunde" ;
|
lin monday_Weekday = mkN "Montag" ;
|
||||||
lin minute_Timeunit = P.mkN "Minute" ;
|
lin tuesday_Weekday = mkN "Dienstag" ;
|
||||||
lin hour_Timeunit = P.mkN "Stunde" ;
|
lin wednesday_Weekday = mkN "Mittwoch" ;
|
||||||
lin day_Timeunit = P.mkN "Tag" ;
|
lin thursday_Weekday = mkN "Donnerstag" ;
|
||||||
lin week_Timeunit = P.mkN "Woche" ;
|
lin friday_Weekday = mkN "Freitag" ;
|
||||||
lin month_Timeunit = P.mkN "Monat";
|
lin saturday_Weekday = mkN "Samstag" ;
|
||||||
lin year_Timeunit = P.mkN "Jahr" "Jahre" neuter ;
|
lin sunday_Weekday = mkN "Sonntag" ;
|
||||||
|
|
||||||
lin monday_Weekday = P.mkN "Montag" ;
|
lin january_Month = mkN "Januar" ;
|
||||||
lin tuesday_Weekday = P.mkN "Dienstag" ;
|
lin february_Month = mkN "Februar" ;
|
||||||
lin wednesday_Weekday = P.mkN "Mittwoch" ;
|
lin march_Month = mkN "März" ;
|
||||||
lin thursday_Weekday = P.mkN "Donnerstag" ;
|
lin april_Month = mkN "April" ;
|
||||||
lin friday_Weekday = P.mkN "Freitag" ;
|
lin may_Month = mkN "Mai" ;
|
||||||
lin saturday_Weekday = P.mkN "Samstag" ;
|
lin june_Month = mkN "Juni" ;
|
||||||
lin sunday_Weekday = P.mkN "Sonntag" ;
|
lin july_Month = mkN "Juli" ;
|
||||||
|
lin august_Month = mkN "August" ;
|
||||||
lin january_Month = P.mkN "Januar" ;
|
lin september_Month = mkN "September" ;
|
||||||
lin february_Month = P.mkN "Februar" ;
|
lin october_Month = mkN "Oktober" ;
|
||||||
lin march_Month = P.mkN "März" ;
|
lin november_Month = mkN "November" ;
|
||||||
lin april_Month = P.mkN "April" ;
|
lin december_Month = mkN "Dezember" ;
|
||||||
lin may_Month = P.mkN "Mai" ;
|
|
||||||
lin june_Month = P.mkN "Juni" ;
|
|
||||||
lin july_Month = P.mkN "Juli" ;
|
|
||||||
lin august_Month = P.mkN "August" ;
|
|
||||||
lin september_Month = P.mkN "September" ;
|
|
||||||
lin october_Month = P.mkN "Oktober" ;
|
|
||||||
lin november_Month = P.mkN "November" ;
|
|
||||||
lin december_Month = P.mkN "Dezember" ;
|
|
||||||
|
|
||||||
lin afrikaans_Language = mkLanguage "Afrikaans" ;
|
lin afrikaans_Language = mkLanguage "Afrikaans" ;
|
||||||
lin amharic_Language = mkLanguage "Amharisch" ;
|
lin amharic_Language = mkLanguage "Amharisch" ;
|
||||||
|
|||||||
@@ -40,66 +40,6 @@ lin
|
|||||||
)
|
)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionPN = \pn -> {
|
|
||||||
t = "pn" ;
|
|
||||||
s1 = heading1 ("Eigenname" ++
|
|
||||||
"("+case <pn.g,pn.n> of {
|
|
||||||
<Masc,Sg> => heading masculine_Parameter ;
|
|
||||||
<Fem,Sg> => heading feminine_Parameter ;
|
|
||||||
<Neutr,Sg> => heading neuter_Parameter ;
|
|
||||||
<_,Pl> => heading plural_Parameter
|
|
||||||
} ++")") ;
|
|
||||||
s2 = frameTable (
|
|
||||||
tr (th (heading nominative_Parameter) ++ td (pn.s ! Nom)) ++
|
|
||||||
tr (th (heading genitive_Parameter) ++ td (pn.s ! Gen)) ++
|
|
||||||
tr (th (heading dative_Parameter) ++ td (pn.s ! Dat)) ++
|
|
||||||
tr (th (heading accusative_Parameter) ++ td (pn.s ! Acc))
|
|
||||||
)
|
|
||||||
} ;
|
|
||||||
|
|
||||||
InflectionGN = \gn -> {
|
|
||||||
t = "vn" ;
|
|
||||||
s1 = heading1 ("Vorname" ++
|
|
||||||
case gn.g of {
|
|
||||||
Male => "(männlich)" ;
|
|
||||||
Female => "(weiblich)"
|
|
||||||
}) ;
|
|
||||||
s2 = frameTable (
|
|
||||||
tr (th (heading nominative_Parameter) ++ td (gn.s ! Nom)) ++
|
|
||||||
tr (th (heading genitive_Parameter) ++ td (gn.s ! Gen)) ++
|
|
||||||
tr (th (heading dative_Parameter) ++ td (gn.s ! Dat)) ++
|
|
||||||
tr (th (heading accusative_Parameter) ++ td (gn.s ! Acc))
|
|
||||||
) ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
InflectionSN = \sn -> {
|
|
||||||
t = "fn" ;
|
|
||||||
s1 = heading1 ("Familienname") ;
|
|
||||||
s2 = frameTable (
|
|
||||||
tr (th (heading nominative_Parameter) ++ td (sn.s ! Male ! Nom)) ++
|
|
||||||
tr (th (heading genitive_Parameter) ++ td (sn.s ! Male ! Gen)) ++
|
|
||||||
tr (th (heading dative_Parameter) ++ td (sn.s ! Male ! Dat)) ++
|
|
||||||
tr (th (heading accusative_Parameter) ++ td (sn.s ! Male ! Acc))
|
|
||||||
) ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
InflectionLN = \ln -> {
|
|
||||||
t = "pn" ;
|
|
||||||
s1 = heading1 ("Standortnamen" ++
|
|
||||||
"("+case <ln.g,ln.n> of {
|
|
||||||
<Masc,Sg> => heading masculine_Parameter ;
|
|
||||||
<Fem,Sg> => heading feminine_Parameter ;
|
|
||||||
<Neutr,Sg> => heading neuter_Parameter ;
|
|
||||||
<_,Pl> => heading plural_Parameter
|
|
||||||
} ++")") ;
|
|
||||||
s2 = frameTable (
|
|
||||||
tr (th (heading nominative_Parameter) ++ td (ln.s ! Strong ! Nom)) ++
|
|
||||||
tr (th (heading genitive_Parameter) ++ td (ln.s ! Strong ! Gen)) ++
|
|
||||||
tr (th (heading dative_Parameter) ++ td (ln.s ! Strong ! Dat)) ++
|
|
||||||
tr (th (heading accusative_Parameter) ++ td (ln.s ! Strong ! Acc))
|
|
||||||
)
|
|
||||||
} ;
|
|
||||||
|
|
||||||
InflectionA, InflectionA2 = \adj ->
|
InflectionA, InflectionA2 = \adj ->
|
||||||
let
|
let
|
||||||
gforms : Degree -> ResGer.Case -> Str = \d,c ->
|
gforms : Degree -> ResGer.Case -> Str = \d,c ->
|
||||||
@@ -223,7 +163,7 @@ oper
|
|||||||
let
|
let
|
||||||
vfin : VForm -> Str = \f ->
|
vfin : VForm -> Str = \f ->
|
||||||
verb.s ! f ++ verb.prefix ;
|
verb.s ! f ++ verb.prefix ;
|
||||||
gforms : ParadigmsGer.Number -> Person -> Str = \n,p ->
|
gforms : Number -> Person -> Str = \n,p ->
|
||||||
td (vfin (VFin False (VPresInd n p))) ++
|
td (vfin (VFin False (VPresInd n p))) ++
|
||||||
td (vfin (VFin False (VPresSubj n p)))
|
td (vfin (VFin False (VPresSubj n p)))
|
||||||
++ td (vfin (VFin False (VImpfInd n p))) --# notpresent
|
++ td (vfin (VFin False (VImpfInd n p))) --# notpresent
|
||||||
|
|||||||
@@ -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,7 +27,7 @@ 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} ;
|
||||||
|
|
||||||
@@ -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,26 +124,26 @@ 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 = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
CardCNCard card cn = {
|
CardCNCard card cn = {
|
||||||
s = \\g,c =>
|
s = \\g,c =>
|
||||||
(Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! False ! c ;
|
(Grammar.DetCN (Grammar.DetQuant Grammar.IndefArt (Grammar.NumCard card)) cn).s ! False ! c ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
lin PassVPSlash vp =
|
lin PassVPSlash vp =
|
||||||
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||||
{ c1 = subjPrep vp.c2 } ;
|
{ c1 = subjPrep vp.c2 } ;
|
||||||
@@ -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 = WLight ;
|
||||||
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 = 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
|
||||||
|
|
||||||
@@ -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,11 +206,12 @@ 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 : Gender = 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 {
|
||||||
True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! Dat ;
|
True => pred.s ! Pl ! Masc ! c
|
||||||
|
++ "von" ++ rnp.s ! a ! Dat ;
|
||||||
_ => pred.s ! n ! genderAgr a ! c ++ pred.c.p ++ rnp.s ! a ! d} ;
|
_ => pred.s ! n ! genderAgr a ! c ++ pred.c.p ++ rnp.s ! a ! d} ;
|
||||||
ext = rnp.ext ; rc = rnp.rc ;
|
ext = rnp.ext ; rc = rnp.rc ;
|
||||||
isPron = False} ;
|
isPron = False} ;
|
||||||
@@ -233,7 +232,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.isPrep of {isPrep => <[], compl> ; _ => <compl, []>} ;
|
||||||
ext = rnp.ext ++ rnp.rc
|
ext = rnp.ext ++ rnp.rc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -253,7 +252,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
** {isPron = False ; ext,rc = []} ;
|
** {isPron = False ; ext,rc = []} ;
|
||||||
|
|
||||||
Base_rr_RNP x y = twoTable2 Agr Case x y ;
|
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_nr_RNP x y = twoTable2 Agr Case {s = \\a,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} ;
|
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_rr_RNP x xs = consrTable2 Agr Case comma x xs ;
|
||||||
@@ -266,10 +265,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 +282,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,13 +340,13 @@ 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} ;
|
||||||
|
|
||||||
@@ -348,7 +363,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 +375,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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
** {
|
** {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
|
|
||||||
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)
|
||||||
@@ -25,7 +25,8 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
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 {
|
||||||
QDir => who ++ cls ! Inv ;
|
QDir => who ++ cls ! Inv ;
|
||||||
@@ -53,7 +54,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 +66,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,6 @@ 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" } ;
|
|
||||||
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" ;
|
||||||
@@ -59,7 +58,7 @@ lin
|
|||||||
clever_A = mk3A "klug" "klüger" "klügste" ;
|
clever_A = mk3A "klug" "klüger" "klügste" ;
|
||||||
close_V2 = dirV2 Irreg.schließen_V ;
|
close_V2 = dirV2 Irreg.schließen_V ;
|
||||||
coat_N = mkN "Jacke" | mkN "Mantel" "Mantel" masculine;
|
coat_N = mkN "Jacke" | mkN "Mantel" "Mantel" masculine;
|
||||||
cold_A = mk3A "kalt" "kälter" "kälteste" ;
|
cold_A = regA "kalt" ;
|
||||||
come_V = seinV (mk6V "kommen" "kommt" "komm" "kam" "käme" "gekommen") ;
|
come_V = seinV (mk6V "kommen" "kommt" "komm" "kam" "käme" "gekommen") ;
|
||||||
computer_N = reg2N "Rechner" "Rechner" masculine ;
|
computer_N = reg2N "Rechner" "Rechner" masculine ;
|
||||||
country_N = reg2N "Land" "Länder" neuter ;
|
country_N = reg2N "Land" "Länder" neuter ;
|
||||||
@@ -186,8 +185,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 "Sterne" ;
|
||||||
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 ;
|
||||||
@@ -213,9 +211,7 @@ lin
|
|||||||
dirV2 (irregV "verstehen" "versteht" "verstand" "verstände" "verstanden") ;
|
dirV2 (irregV "verstehen" "versteht" "verstand" "verstände" "verstanden") ;
|
||||||
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);
|
|
||||||
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" ;
|
||||||
war_N = mkN "Krieg" ;
|
war_N = mkN "Krieg" ;
|
||||||
@@ -239,14 +235,14 @@ lin
|
|||||||
dry_A = regA "trocken" ;
|
dry_A = regA "trocken" ;
|
||||||
dull_A = regA "stumpf" ;
|
dull_A = regA "stumpf" ;
|
||||||
full_A = regA "voll" ;
|
full_A = regA "voll" ;
|
||||||
heavy_A = mkA "schwer" "schwerer" "schwerste" ;
|
heavy_A = mkA "schwer" "schwere" "schwerer" "schwerste" ;
|
||||||
near_A = mk3A "nahe" "näher" "nächste" ;
|
near_A = mk3A "nahe" "näher" "nächste" ;
|
||||||
rotten_A = regA "verdorben" ;
|
rotten_A = regA "verdorben" ;
|
||||||
round_A = regA "rund" ;
|
round_A = regA "rund" ;
|
||||||
sharp_A = mk3A "scharf" "schärfer" "schärfste" ;
|
sharp_A = mk3A "scharf" "schärfer" "schärfste" ;
|
||||||
smooth_A = regA "glatt" ;
|
smooth_A = regA "glatt" ;
|
||||||
straight_A = regA "gerade" ;
|
straight_A = regA "gerade" ;
|
||||||
wet_A = mk4A "naß" "nass" "nasser" "nasseste" ;
|
wet_A = regA "naß" ;
|
||||||
wide_A = regA "breit" ;
|
wide_A = regA "breit" ;
|
||||||
animal_N = reg2N "Tier" "Tiere" neuter ;
|
animal_N = reg2N "Tier" "Tiere" neuter ;
|
||||||
ashes_N = mkN "Asche" ;
|
ashes_N = mkN "Asche" ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude:
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** open Prelude in {
|
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact
|
||||||
|
|||||||
@@ -27,13 +27,14 @@ oper
|
|||||||
\g,name -> {
|
\g,name -> {
|
||||||
s = \\_,c => name.s ! c ;
|
s = \\_,c => name.s ! c ;
|
||||||
a = agrgP3 g Sg ;
|
a = agrgP3 g Sg ;
|
||||||
ext,rc = [] ;
|
ext, rc = [] ;
|
||||||
w = WHeavy -- ok?
|
w = WHeavy -- ok?
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
detLikeAdj : Bool -> Number -> Str ->
|
detLikeAdj : Bool -> Number -> Str ->
|
||||||
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
||||||
{s,sp = appAdj (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
{s,sp = appAdj (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
||||||
|
|
||||||
detUnlikeAdj : Bool -> Number -> Str ->
|
detUnlikeAdj : Bool -> Number -> Str ->
|
||||||
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
{s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies ->
|
||||||
{s,sp = appAdj (regDetA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
{s,sp = appAdj (regDetA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ;
|
||||||
|
|||||||
@@ -1,31 +1,27 @@
|
|||||||
--# -path=.:../abstract:../common:
|
|
||||||
concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
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
|
-- 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
|
|
||||||
-- 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.
|
|
||||||
|
|
||||||
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 ! adjfCase det.a c ! 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
|
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
||||||
w = case det.isDef of { True => case det.hasDefArt of { True => WDefArt ;
|
-- don't see a|no man = sehe keinen Mann
|
||||||
|
w = case det.isDef of { True => case det.hasDefArt of {True => WDefArt ;
|
||||||
_ => WLight } ;
|
_ => WLight } ;
|
||||||
_ => WHeavy } ;
|
_ => WHeavy } ;
|
||||||
rc = cn.rc ! det.n ;
|
rc = cn.rc ! det.n ;
|
||||||
ext = cn.ext
|
ext = cn.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = { -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
DetNP det = {
|
||||||
s = \\b,c => det.sp ! b ! Neutr ! c ;
|
s = \\b,c => det.sp ! b ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
|
-- isLight = det.isDef ;
|
||||||
-- 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 => WLight ; _ => WHeavy } ;
|
||||||
rc, ext = []
|
rc, ext = []
|
||||||
@@ -33,9 +29,9 @@ 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 = {
|
||||||
@@ -55,7 +51,7 @@ 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?
|
||||||
@@ -67,7 +63,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
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
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -76,10 +72,10 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
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} ;
|
||||||
@@ -90,10 +86,10 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
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 +97,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,7 +114,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} ;
|
||||||
|
|
||||||
NumDecimal numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
||||||
|
|
||||||
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 } ;
|
||||||
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
@@ -129,15 +126,16 @@ 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 => [] ;
|
||||||
@@ -160,7 +158,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\_,c => cn.s ! Strong ! Sg ! c ++ cn.adv ;
|
s = \\_,c => cn.s ! Strong ! Sg ! c ++ cn.adv ;
|
||||||
a = agrgP3 cn.g Sg ;
|
a = agrgP3 cn.g Sg ;
|
||||||
w = WLight ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
||||||
|
-- isPron = False ;
|
||||||
|
w = WLight ;
|
||||||
rc = cn.rc ! Sg ;
|
rc = cn.rc ! Sg ;
|
||||||
ext = cn.ext ;
|
ext = cn.ext ;
|
||||||
hasDefArt = False
|
hasDefArt = False
|
||||||
@@ -224,19 +224,17 @@ 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 ;
|
||||||
@@ -249,10 +247,11 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
{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
|
DetDAP det = {
|
||||||
|
s = \\g,c => det.s ! False ! g ! c ; -- HL 7/22 todo: check
|
||||||
sp = \\g,c => det.sp ! False ! g ! c ;
|
sp = \\g,c => det.sp ! False ! g ! c ;
|
||||||
n = det.n ; a = det.a ; isDef = det.isDef ; hasDefArt = det.hasDefArt} ;
|
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 = "" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
--1 German Lexical Paradigms
|
--1 German Lexical Paradigms
|
||||||
--
|
--
|
||||||
-- Aarne Ranta, Harald Hammarström and Björn Bringert2003--2007
|
-- Aarne Ranta, Harald Hammarström and Björn Bringert 2003--2007
|
||||||
--
|
--
|
||||||
-- This is an API for the user of the resource grammar
|
-- This is an API for the user of the resource grammar
|
||||||
-- for adding lexical items. It gives functions for forming
|
-- for adding lexical items. It gives functions for forming
|
||||||
@@ -141,7 +141,6 @@ mkN : overload {
|
|||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
mkGN : overload {
|
mkGN : overload {
|
||||||
mkGN : Str -> Sex -> GN ; -- regular name with genitive in "s"
|
mkGN : Str -> Sex -> GN ; -- regular name with genitive in "s"
|
||||||
mkGN : (nom,gen : Str) -> Sex -> GN ; -- name with other genitive
|
mkGN : (nom,gen : Str) -> Sex -> GN ; -- name with other genitive
|
||||||
@@ -160,36 +159,10 @@ mkN : overload {
|
|||||||
mkSN : (nom,acc,dat,gen : Str) -> GN ; -- name with all case forms
|
mkSN : (nom,acc,dat,gen : Str) -> GN ; -- name with all case forms
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkLN = overload {
|
|
||||||
mkLN : Str -> LN = \s -> regLN s Masc ; -- regular name with genitive in "s", masculine
|
|
||||||
mkLN : Str -> Number -> LN = \s,n -> regLN s Masc ** {n=n} ; -- regular name with genitive in "s", masculine
|
|
||||||
mkLN : Str -> Gender -> LN = regLN ; -- regular name with genitive in "s"
|
|
||||||
|
|
||||||
-- If only the genitive differs, two strings are needed.
|
|
||||||
|
|
||||||
mkLN : (nom,gen : Str) -> Gender -> LN = mk2LN ; -- name with other genitive
|
|
||||||
|
|
||||||
-- In the worst case, all four forms are needed.
|
|
||||||
|
|
||||||
mkLN : (nom,acc,dat,gen : Str) -> Gender -> LN = \nom,acc,dat,gen,g ->
|
|
||||||
lin LN {s = \\a => table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ;
|
|
||||||
g = g ; n = Sg ;
|
|
||||||
hasArt = False}
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
defLN : LN -> LN = \n -> n ** {hasArt = True} ;
|
|
||||||
|
|
||||||
mk2LN : (karolus, karoli : Str) -> Gender -> LN = \karolus, karoli, g ->
|
|
||||||
lin LN {s = \\a => table {Gen => karoli ; _ => karolus} ; g = g ; n = Sg ;
|
|
||||||
hasArt = False} ;
|
|
||||||
regLN : (horst : Str) -> Gender -> LN = \horst, g ->
|
|
||||||
mk2LN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) g ;
|
|
||||||
|
|
||||||
-- To extract the number of a noun phrase
|
-- To extract the number of a noun phrase
|
||||||
|
|
||||||
-- ifPluralNP : NP -> Bool
|
ifPluralNP : CatGer.NP -> Bool
|
||||||
-- = \np -> case (numberAgr np.a) of {Sg => False ; Pl => True} ;
|
= \np -> case (numberAgr np.a) of {Sg => False ; Pl => True} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
@@ -234,9 +207,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
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -246,15 +219,14 @@ mkN : overload {
|
|||||||
datPrep : Prep ; -- no string, just dative case
|
datPrep : Prep ; -- no string, just dative case
|
||||||
genPrep : Prep ; -- no string, just genitive case
|
genPrep : Prep ; -- no string, just genitive case
|
||||||
|
|
||||||
-- A couple of common prepositions (the first three always with the dative).
|
-- A couple of common prepositions (the first two always with the dative).
|
||||||
|
|
||||||
von_Prep : Prep ; -- von + dative, with contraction vom
|
von_Prep : Prep ; -- von + dative, with contraction vom
|
||||||
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
|
|
||||||
anDat_Prep : Prep ; -- an + dative, with contraction am
|
anDat_Prep : Prep ; -- an + dative, with contraction am
|
||||||
inDat_Prep : Prep ; -- in + dative, with contraction im
|
inDat_Prep : Prep ; -- in + dative, with contraction im
|
||||||
|
anAcc_Prep : Prep ; -- an + accusative, with contraction ans
|
||||||
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
||||||
aufAcc_Prep : Prep ; -- auf + accusative, with contraction aufs
|
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
@@ -337,12 +309,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 +325,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 ; --%
|
||||||
@@ -413,7 +385,6 @@ mkV2 : overload {
|
|||||||
Gender = MorphoGer.Gender ;
|
Gender = MorphoGer.Gender ;
|
||||||
Case = MorphoGer.Case ;
|
Case = MorphoGer.Case ;
|
||||||
Number = MorphoGer.Number ;
|
Number = MorphoGer.Number ;
|
||||||
|
|
||||||
masculine = Masc ;
|
masculine = Masc ;
|
||||||
feminine = Fem ;
|
feminine = Fem ;
|
||||||
neuter = Neutr ;
|
neuter = Neutr ;
|
||||||
@@ -583,26 +554,23 @@ mkV2 : overload {
|
|||||||
{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 ;
|
|
||||||
inDat_Prep = mkPrep "in" "im" "in der" "im" dative ;
|
inDat_Prep = mkPrep "in" "im" "in der" "im" dative ;
|
||||||
inAcc_Prep = mkPrep "in" "in den" "in die" "ins" accusative ;
|
inAcc_Prep = mkPrep "in" "in den" "in die" "ins" accusative ;
|
||||||
anDat_Prep = mkPrep "an" "am" "an der" "am" dative ;
|
anDat_Prep = mkPrep "an" "am" "an der" "am" dative ;
|
||||||
anAcc_Prep = mkPrep "an" "an den" "an die" "ans" accusative ;
|
anAcc_Prep = mkPrep "an" "an den" "an die" "ans" accusative ;
|
||||||
aufAcc_Prep = mkPrep "auf" "auf den" "auf die" "aufs" accusative ;
|
|
||||||
|
|
||||||
mk6V geben gibt gib gab gaebe gegeben =
|
mk6V geben gibt gib gab gaebe gegeben =
|
||||||
let
|
let
|
||||||
@@ -672,7 +640,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 = <>} ;
|
||||||
@@ -701,7 +669,8 @@ mkV2 : overload {
|
|||||||
subjV2V v = v ** {objCtrl = False} ;
|
subjV2V v = v ** {objCtrl = False} ;
|
||||||
|
|
||||||
mkV2A = overload {
|
mkV2A = overload {
|
||||||
mkV2A : V -> V2A = \v -> dirV2 v ** {isAux = False ; lock_V2A = <>} ;
|
mkV2A : V -> V2A
|
||||||
|
= \v -> dirV2 v ** {isAux = False ; lock_V2A = <>} ;
|
||||||
mkV2A : V -> Prep -> V2A
|
mkV2A : V -> Prep -> V2A
|
||||||
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2A = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2A = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -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 ;
|
||||||
|
|||||||
@@ -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,41 @@ 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 8, 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", add AgSgP3Gen. HL 29.9.2023
|
||||||
|
|
||||||
|
Agr = AgSgP1 | AgSgP2 | AgSgP3 Gender | AgSgP3Gen | 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 _ | AgSgP3Gen => 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 _ | AgSgP3Gen => P3 ;
|
||||||
|
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 +83,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 +105,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 +156,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 +200,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,12 +214,16 @@ 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 _ | AgSgP3Gen => 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
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@@ -419,8 +451,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
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
|
||||||
@@ -429,37 +461,30 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
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
|
||||||
|
|
||||||
@@ -486,7 +511,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,22 +533,6 @@ 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 ->
|
||||||
@@ -526,7 +540,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
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 +573,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
|
||||||
@@ -577,6 +591,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
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 +602,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 ;
|
||||||
@@ -730,7 +745,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 isPrep 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 ;
|
||||||
@@ -759,10 +774,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 +851,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 +927,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 +938,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 +949,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,7 +960,7 @@ 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 : Agr = AgSgP3Gen ; -- HL 17.8.2023
|
||||||
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 ;
|
||||||
@@ -953,47 +968,64 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
-- 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" ;
|
AgSgP3Gen => caselist "man selbst" "sich" "sich" "seiner" ; -- älter als man selbst sein
|
||||||
Ag _ Pl P2 => caselist "ihr" "euch" "euch" "euer" ;
|
AgPl P1 => caselist "wir" "uns" "uns" "unser" ;
|
||||||
Ag _ Pl P3 => caselist "sie" "sich" "sich" "ihrer"
|
AgPl P2 => caselist "ihr" "euch" "euch" "euer" ;
|
||||||
|
AgPl P3 => caselist "sie" "sich" "sich" "ihrer" ;
|
||||||
|
AgPlPol => caselist "Sie" "sich" "sich" "Ihrer" -- HL 8/2023
|
||||||
|
-- ; 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 ;
|
<AgSgP3 Fem,Sg,Masc> => caselist "ihr" "ihren" "ihrem" "ihres" ! c ;
|
||||||
<Ag (Masc|Neutr) Sg P3,Sg,Fem> => caselist "seine" "seine" "seiner" "seiner" ! c ;
|
<AgSgP3 Fem,Sg,Fem> => caselist "ihre" "ihre" "ihrer" "ihrer" ! c ;
|
||||||
<Ag (Masc|Neutr) Sg P3,Sg,Neutr> => caselist "sein" "sein" "seinem" "seines" ! c ;
|
<AgSgP3 Fem,Sg,Neutr> => caselist "ihr" "ihr" "ihrem" "ihres" ! c ;
|
||||||
<Ag (Masc|Neutr) Sg P3,Pl,_> => caselist "seine" "seine" "seinen" "seiner" ! c ;
|
<AgSgP3 Fem,Pl,_> => caselist "ihre" "ihre" "ihren" "ihrer" ! c ;
|
||||||
|
|
||||||
<Ag _ _ P3,Sg,Masc> => caselist "ihr" "ihren" "ihrem" "ihres" ! c ;
|
<AgSgP3 _,Sg,Masc> => caselist "sein" "seinen" "seinem" "seines" ! c ;
|
||||||
<Ag _ _ P3,Sg,Fem> => caselist "ihre" "ihre" "ihrer" "ihrer" ! c ;
|
<AgSgP3 _,Sg,Fem> => caselist "seine" "seine" "seiner" "seiner" ! c ;
|
||||||
<Ag _ _ P3,Sg,Neutr> => caselist "ihr" "ihr" "ihrem" "ihres" ! c ;
|
<AgSgP3 _,Sg,Neutr> => caselist "sein" "sein" "seinem" "seines" ! c ;
|
||||||
<Ag _ _ P3,Pl,_> => caselist "ihre" "ihre" "ihren" "ihrer" ! c ;
|
<AgSgP3 _,Pl,_> => caselist "seine" "seine" "seinen" "seiner" ! c ;
|
||||||
|
|
||||||
<Ag _ Pl P1,Sg,Masc> => caselist "unser" "unseren" "unserem" "unseres" ! c ;
|
<AgSgP3Gen,Sg,Masc> => caselist "sein" "seinen" "seinem" "seines" ! c ;
|
||||||
<Ag _ Pl P1,Sg,Fem> => caselist "unsere" "unsere" "unserer" "unserer" ! c ;
|
<AgSgP3Gen,Sg,Fem> => caselist "seine" "seine" "seiner" "seiner" ! c ;
|
||||||
<Ag _ Pl P1,Sg,Neutr> => caselist "unser" "unser" "unserem" "unseres" ! c ;
|
<AgSgP3Gen,Sg,Neutr> => caselist "sein" "sein" "seinem" "seines" ! c ;
|
||||||
<Ag _ Pl P1,Pl,_> => caselist "unsere" "unsere" "unseren" "unserer" ! c ;
|
<AgSgP3Gen,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 +1054,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,16 +21,21 @@ 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
|
||||||
|
vagr = VAg (numImp n) ps.p1 ;
|
||||||
|
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
|
||||||
} ;
|
} ;
|
||||||
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
|
||||||
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
|
||||||
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
|
||||||
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 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvImp adv imp = {
|
AdvImp adv imp = {
|
||||||
@@ -54,7 +59,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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -81,21 +81,22 @@ 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" ;
|
||||||
@@ -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,14 +169,13 @@ 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} ;
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
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
|
||||||
@@ -93,6 +90,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
-- 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 110.592.000 (46080,240)
|
||||||
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
|
||||||
-- 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 ;
|
||||||
@@ -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
|
||||||
@@ -161,6 +158,6 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
(ist verheiratet:VP mit:Prep):VPSlash,
|
(ist verheiratet:VP mit:Prep):VPSlash,
|
||||||
ComplA2 is used to parse "sie ist verheiratet mit mir"
|
ComplA2 is used to parse "sie ist verheiratet mit mir"
|
||||||
-}
|
-}
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
|
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ; -- HL 7.8.23
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user