forked from GitHub/gf-rgl
Add forgotten hunks of branch master to smallAgr
This commit is contained in:
@@ -52,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 = {
|
BaseAP x y = lin AP {
|
||||||
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 = {
|
ConsAP xs x = lin AP {
|
||||||
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 ;
|
||||||
@@ -66,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 = {
|
BaseCN x y = lin CN {
|
||||||
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 = {
|
ConsCN x xs = lin CN {
|
||||||
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,65 @@
|
|||||||
--# -path=.:../abstract
|
--# -path=.:../abstract
|
||||||
|
|
||||||
concrete ConstructionGer of Construction = CatGer **
|
concrete ConstructionGer of Construction = CatGer **
|
||||||
open SyntaxGer, SymbolicGer, ParadigmsGer,
|
open SyntaxGer, SymbolicGer, (P = 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 (mkA "hungrig") ;
|
hungry_VP = mkVP (P.mkA "hungrig") ;
|
||||||
thirsty_VP = mkVP (mkA "durstig") ;
|
thirsty_VP = mkVP (P.mkA "durstig") ;
|
||||||
tired_VP = mkVP (mkA "müde") ;
|
tired_VP = mkVP (P.mkA "müde") ;
|
||||||
scared_VP = mkVP have_V2 (mkNP (mkN "Angst" "Ängste" feminine)) ;
|
scared_VP = mkVP have_V2 (mkNP (P.mkN "Angst" "Ängste" feminine)) ;
|
||||||
ill_VP = mkVP (mkA "krank") ;
|
ill_VP = mkVP (P.mkA "krank") ;
|
||||||
ready_VP = mkVP (mkA "bereit") ;
|
ready_VP = mkVP (P.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)) (mkA "verheiratet") ;
|
mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (P.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 (ParadigmsGer.mkAdv "alt")) (mkCl (lin NP x) G.UseCopula) ; ----
|
how_old_QCl x = mkQCl (E.IAdvAdv (P.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
|
||||||
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
||||||
|
|
||||||
is_right_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Recht")) ;
|
is_right_VP = mkVP have_V2 (mkNP (P.mkN "Recht")) ;
|
||||||
is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Unrecht")) ;
|
is_wrong_VP = mkVP have_V2 (mkNP (P.mkN "Unrecht")) ;
|
||||||
|
|
||||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
||||||
n_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 ;
|
bottle_of_CN np = N.ApposCN (mkCN (P.mkN "Flasche")) np ;
|
||||||
cup_of_CN np = N.ApposCN (mkCN (mkN "Tasse")) np ;
|
cup_of_CN np = N.ApposCN (mkCN (P.mkN "Tasse")) np ;
|
||||||
glass_of_CN np = N.ApposCN (mkCN (mkN "Glas" "Gläser" neuter)) 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)) ;
|
||||||
@@ -46,15 +69,103 @@ 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 = mkVP (mkVP L.go_V) (ParadigmsGer.mkAdv "hin") ;
|
go_there_VP = SyntaxGer.mkVP (SyntaxGer.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
|
||||||
@@ -78,37 +189,45 @@ lin
|
|||||||
weekdayN w = w ;
|
weekdayN w = w ;
|
||||||
monthN m = m ;
|
monthN m = m ;
|
||||||
|
|
||||||
weekdayPN w = mkPN w ;
|
weekdayPN w = P.mkPN w ;
|
||||||
monthPN m = mkPN m ;
|
monthPN m = P.mkPN m ;
|
||||||
|
|
||||||
languageNP l = mkNP l ;
|
languageNP l = mkNP l ;
|
||||||
languageCN l = mkCN l ;
|
languageCN l = mkCN l ;
|
||||||
|
|
||||||
oper mkLanguage : Str -> N = \s -> mkN s neuter ; ---- produces Neuter
|
oper mkLanguage : Str -> N = \s -> P.mkN s neuter ; ---- produces Neuter
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
---- lexicon of special names
|
---- lexicon of special names
|
||||||
|
|
||||||
lin monday_Weekday = mkN "Montag" ;
|
lin second_Timeunit = P.mkN "Sekunde" ;
|
||||||
lin tuesday_Weekday = mkN "Dienstag" ;
|
lin minute_Timeunit = P.mkN "Minute" ;
|
||||||
lin wednesday_Weekday = mkN "Mittwoch" ;
|
lin hour_Timeunit = P.mkN "Stunde" ;
|
||||||
lin thursday_Weekday = mkN "Donnerstag" ;
|
lin day_Timeunit = P.mkN "Tag" ;
|
||||||
lin friday_Weekday = mkN "Freitag" ;
|
lin week_Timeunit = P.mkN "Woche" ;
|
||||||
lin saturday_Weekday = mkN "Samstag" ;
|
lin month_Timeunit = P.mkN "Monat";
|
||||||
lin sunday_Weekday = mkN "Sonntag" ;
|
lin year_Timeunit = P.mkN "Jahr" "Jahre" neuter ;
|
||||||
|
|
||||||
lin january_Month = mkN "Januar" ;
|
lin monday_Weekday = P.mkN "Montag" ;
|
||||||
lin february_Month = mkN "Februar" ;
|
lin tuesday_Weekday = P.mkN "Dienstag" ;
|
||||||
lin march_Month = mkN "März" ;
|
lin wednesday_Weekday = P.mkN "Mittwoch" ;
|
||||||
lin april_Month = mkN "April" ;
|
lin thursday_Weekday = P.mkN "Donnerstag" ;
|
||||||
lin may_Month = mkN "Mai" ;
|
lin friday_Weekday = P.mkN "Freitag" ;
|
||||||
lin june_Month = mkN "Juni" ;
|
lin saturday_Weekday = P.mkN "Samstag" ;
|
||||||
lin july_Month = mkN "Juli" ;
|
lin sunday_Weekday = P.mkN "Sonntag" ;
|
||||||
lin august_Month = mkN "August" ;
|
|
||||||
lin september_Month = mkN "September" ;
|
lin january_Month = P.mkN "Januar" ;
|
||||||
lin october_Month = mkN "Oktober" ;
|
lin february_Month = P.mkN "Februar" ;
|
||||||
lin november_Month = mkN "November" ;
|
lin march_Month = P.mkN "März" ;
|
||||||
lin december_Month = mkN "Dezember" ;
|
lin april_Month = P.mkN "April" ;
|
||||||
|
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" ;
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ oper
|
|||||||
lin
|
lin
|
||||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||||
t = "s" ;
|
t = "s" ;
|
||||||
s1 = heading1 (heading noun_Category ++
|
s1 = heading1 (heading noun_Category ++
|
||||||
case noun.g of {
|
case noun.g of {
|
||||||
Masc => "("+heading masculine_Parameter+")" ;
|
Masc => "("+heading masculine_Parameter+")" ;
|
||||||
Fem => "("+heading feminine_Parameter+")" ;
|
Fem => "("+heading feminine_Parameter+")" ;
|
||||||
Neutr => "("+heading neuter_Parameter+")"
|
Neutr => "("+heading neuter_Parameter+")"
|
||||||
}) ;
|
}) ;
|
||||||
s2 = frameTable (
|
s2 = frameTable (
|
||||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
||||||
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++
|
tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++
|
||||||
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++
|
tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++
|
||||||
@@ -40,6 +40,66 @@ 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 ->
|
||||||
@@ -48,8 +108,8 @@ lin
|
|||||||
td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
|
td (adj.s ! d ! (AMod (GSg Neutr) c)) ++
|
||||||
td (adj.s ! d ! (AMod GPl c)) ;
|
td (adj.s ! d ! (AMod GPl c)) ;
|
||||||
dtable : Parameter -> Degree -> Str = \s,d ->
|
dtable : Parameter -> Degree -> Str = \s,d ->
|
||||||
paragraph (heading2 (heading s) ++ frameTable (
|
paragraph (heading2 (heading s) ++ frameTable (
|
||||||
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++
|
||||||
th (heading plural_Parameter)) ++
|
th (heading plural_Parameter)) ++
|
||||||
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
tr (th (heading nominative_Parameter) ++ gforms d Nom) ++
|
||||||
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
|
tr (th (heading genitive_Parameter) ++ gforms d Gen) ++
|
||||||
@@ -163,7 +223,7 @@ oper
|
|||||||
let
|
let
|
||||||
vfin : VForm -> Str = \f ->
|
vfin : VForm -> Str = \f ->
|
||||||
verb.s ! f ++ verb.prefix ;
|
verb.s ! f ++ verb.prefix ;
|
||||||
gforms : Number -> Person -> Str = \n,p ->
|
gforms : ParadigmsGer.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
|
||||||
|
|||||||
@@ -36,14 +36,14 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
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 = WLight ;
|
w = case det.isDef of {True => WLight ; _ => WHeavy} ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNPFem det = {
|
DetNPFem det = {
|
||||||
s = \\b,c => det.sp ! b ! Fem ! c ;
|
s = \\b,c => det.sp ! b ! Fem ! c ;
|
||||||
a = agrgP3 Fem det.n ;
|
a = agrgP3 Fem det.n ;
|
||||||
w = WLight ;
|
w = case det.isDef of {True => WLight ; _ => WHeavy} ;--WLight ;
|
||||||
ext, rc = []
|
ext, rc = []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -207,11 +207,10 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
PredetRNP pred rnp = rnp ** { -- HL 5/2022
|
PredetRNP pred rnp = rnp ** { -- HL 5/2022
|
||||||
s = \\a,c => let n : Number = 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 : Gender = genderAgr a ;
|
g = genderAgr a ;
|
||||||
d = case pred.c.k of {NoCase => c ; PredCase k => k} ;
|
d = case pred.c.k of {NoCase => c ; PredCase k => k} ;
|
||||||
in case rnp.isPron of {
|
in case rnp.isPron of {
|
||||||
True => pred.s ! Pl ! Masc ! c
|
True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! Dat ;
|
||||||
++ "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} ;
|
||||||
@@ -228,11 +227,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
|
|
||||||
ReflA2RNP adj rnp = -- would need AP.c : Agr => Str*Str, not AP.c : Str*Str
|
ReflA2RNP adj rnp = -- would need AP.c : Agr => Str*Str, not AP.c : Str*Str
|
||||||
let -- as we have no reflexive AP,
|
let -- as we have no reflexive AP,
|
||||||
compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement
|
compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement
|
||||||
in {
|
in {
|
||||||
s = adj.s ! Posit ;
|
s = adj.s ! Posit ;
|
||||||
isPre = True ;
|
isPre = True ;
|
||||||
c = case adj.c2.isPrep of {isPrep => <[], compl> ; _ => <compl, []>} ;
|
c = case adj.c2.isPrep of {isCase => <compl, []> ; _ => <[], compl>} ;
|
||||||
ext = rnp.ext ++ rnp.rc
|
ext = rnp.ext ++ rnp.rc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -252,7 +251,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 = \\a,c => x.s ! False ! c ++ x.ext ++ x.rc} 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} ;
|
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 ;
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ concrete IdiomGer of Idiom = CatGer **
|
|||||||
ExistIP ip = {
|
ExistIP ip = {
|
||||||
s = \\m,t,a,p =>
|
s = \\m,t,a,p =>
|
||||||
let
|
let
|
||||||
cls =
|
cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ;
|
||||||
(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 ;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ flags
|
|||||||
lin
|
lin
|
||||||
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
add_V3 = dirV3 (prefixV "hinzu" (regV "fügen")) zu_Prep ;
|
||||||
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
airplane_N = mkN "Flugzeug" "Flugzeuge" neuter ;
|
||||||
|
alas_Interj = {s = "ach"} ;
|
||||||
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" ;
|
||||||
@@ -58,7 +59,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 = regA "kalt" ;
|
cold_A = mk3A "kalt" "kälter" "kälteste" ;
|
||||||
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 ;
|
||||||
@@ -185,7 +186,7 @@ lin
|
|||||||
sock_N = reg2N "Strumpf" "Strümpfe" masculine ;
|
sock_N = reg2N "Strumpf" "Strümpfe" masculine ;
|
||||||
song_N = reg2N "Lied" "Lieder" neuter ;
|
song_N = reg2N "Lied" "Lieder" neuter ;
|
||||||
speak_V2 = dirV2 Irreg.sprechen_V ;
|
speak_V2 = dirV2 Irreg.sprechen_V ;
|
||||||
star_N = mkN "Sterne" ;
|
star_N = mkN "Stern" ;
|
||||||
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 ;
|
||||||
@@ -211,7 +212,8 @@ 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" | "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" ;
|
||||||
@@ -235,14 +237,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" "schwere" "schwerer" "schwerste" ;
|
heavy_A = mkA "schwer" "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 = regA "naß" ;
|
wet_A = mk4A "naß" "nass" "nasser" "nasseste" ;
|
||||||
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" ;
|
||||||
@@ -295,7 +297,7 @@ lin
|
|||||||
sand_N = mkN "Sand" ;
|
sand_N = mkN "Sand" ;
|
||||||
seed_N = mkN "Same" ;
|
seed_N = mkN "Same" ;
|
||||||
skin_N = mkN "Haut" "Häute" feminine ;
|
skin_N = mkN "Haut" "Häute" feminine ;
|
||||||
sky_N = mkN "Himmel" ; ---- pl
|
sky_N = mkN "Himmel" ;
|
||||||
smoke_N = mkN "Rauch" ;
|
smoke_N = mkN "Rauch" ;
|
||||||
snow_N = mkN "Schnee" "Schneen" masculine ; ---- pl
|
snow_N = mkN "Schnee" "Schneen" masculine ; ---- pl
|
||||||
stick_N = mkN "Stock" "Stöcke" masculine ;
|
stick_N = mkN "Stock" "Stöcke" masculine ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common
|
--# -path=.:../abstract:../common:../prelude:
|
||||||
|
|
||||||
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** {
|
concrete MarkupGer of Markup = CatGer, MarkHTMLX ** open Prelude in {
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -20,21 +20,20 @@ oper
|
|||||||
mkPrep : Str -> Case -> Preposition = \s,c ->
|
mkPrep : Str -> Case -> Preposition = \s,c ->
|
||||||
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep} ;
|
{s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep} ;
|
||||||
|
|
||||||
nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ;
|
nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ;
|
||||||
a : Agr ;
|
a : Agr ;
|
||||||
w : Weight ;
|
w : Weight ;
|
||||||
ext,rc : Str} =
|
ext,rc : Str} =
|
||||||
\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,27 +1,28 @@
|
|||||||
|
--# -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
|
-- 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
|
||||||
-- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht
|
-- HL 6/2019 (but:) sehe (die|einige) Männer nicht; don't see a|no man = sehe keinen Mann
|
||||||
-- don't see a|no man = sehe keinen Mann
|
w = case det.isDef of { True => case det.hasDefArt of { True => WDefArt ;
|
||||||
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 = {
|
DetNP det = { -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
||||||
s = \\b,c => det.sp ! b ! Neutr ! c ; -- more genders in ExtraGer -- HL: der+er,den+en ; der drei,den drei+en
|
s = \\b,c => det.sp ! b ! Neutr ! c ;
|
||||||
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 = []
|
||||||
@@ -115,6 +116,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ;
|
||||||
|
|
||||||
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
NumFloat dig1 dig2 = {s = \\g,c => dig1.s ! invNum ++ BIND ++ "." ++ BIND ++ dig2.s ! NCard g c ; n = Pl } ;
|
||||||
|
NumDecimal numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ;
|
||||||
|
|
||||||
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} ;
|
||||||
@@ -158,9 +160,7 @@ 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 ;
|
||||||
-- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier
|
w = WLight ; -- 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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
--1 German Lexical Paradigms
|
--1 German Lexical Paradigms
|
||||||
--
|
--
|
||||||
-- Aarne Ranta, Harald Hammarström and Björn Bringert 2003--2007
|
-- Aarne Ranta, Harald Hammarström and Björn Bringert2003--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,6 +141,7 @@ 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
|
||||||
@@ -159,10 +160,36 @@ 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 : CatGer.NP -> Bool
|
-- ifPluralNP : 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
|
||||||
@@ -219,14 +246,16 @@ 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 two always with the dative).
|
-- A couple of common prepositions (the first three 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
|
||||||
anDat_Prep : Prep ; -- an + dative, with contraction am
|
bei_Prep : Prep ; -- bei + dative, with contraction beim
|
||||||
inDat_Prep : Prep ; -- in + dative, with contraction im
|
anDat_Prep : Prep ; -- an + dative, with contraction am
|
||||||
anAcc_Prep : Prep ; -- an + accusative, with contraction ans
|
anAcc_Prep : Prep ; -- an + accusative, with contraction ans
|
||||||
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
inDat_Prep : Prep ; -- in + dative, with contraction im
|
||||||
|
inAcc_Prep : Prep ; -- in + accusative, with contraction ins
|
||||||
|
aufAcc_Prep : Prep ; -- auf + accusative, with contraction aufs
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
@@ -383,8 +412,9 @@ mkV2 : overload {
|
|||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
|
|
||||||
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 ;
|
||||||
@@ -537,7 +567,7 @@ mkV2 : overload {
|
|||||||
dunk + "el" => mk3A a (dunk + "ler") (dunk + "leste") ;
|
dunk + "el" => mk3A a (dunk + "ler") (dunk + "leste") ;
|
||||||
te + "uer" => mk3A a (te + "urer") (te + "ureste") ;
|
te + "uer" => mk3A a (te + "urer") (te + "ureste") ;
|
||||||
_ + "e" => mk3A a (a + "r") (a + "ste") ;
|
_ + "e" => mk3A a (a + "r") (a + "ste") ;
|
||||||
_ + ("t" | "d" | "s" | "ß" | "sch" | "z" | "au" | "eu") => mk3A a (a + "er") (a + "este") ;
|
_ + ("t" | "d" | "s" | "ß" | "sch" | "z" | "au" | "eu") => mk3A a (a + "er") (a + "este") ;
|
||||||
_ => mk3A a (a + "er") (a + "ste")
|
_ => mk3A a (a + "er") (a + "ste")
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -567,10 +597,12 @@ mkV2 : overload {
|
|||||||
|
|
||||||
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
|
||||||
@@ -655,35 +687,34 @@ mkV2 : overload {
|
|||||||
mkV0 v = v ** {lock_V = <>} ;
|
mkV0 v = v ** {lock_V = <>} ;
|
||||||
|
|
||||||
mkV2V = overload { -- default: object-control
|
mkV2V = overload { -- default: object-control
|
||||||
mkV2V : V -> V2V
|
mkV2V : V -> V2V
|
||||||
= \v -> dirV2 v ** {isAux = False ; objCtrl = True ; lock_V2V = <>} ; -- ermahne jmdn, sich zu waschen
|
= \v -> dirV2 v ** {isAux = False ; objCtrl = True ; lock_V2V = <>} ; -- ermahne jmdn, sich zu waschen
|
||||||
mkV2V : V -> Prep -> V2V
|
mkV2V : V -> Prep -> V2V
|
||||||
= \v,p -> prepV2 v p ** {isAux = False ; objCtrl = True ; lock_V2V = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = False ; objCtrl = True ; lock_V2V = <>} ;
|
||||||
} ;
|
} ;
|
||||||
auxV2V = overload {
|
auxV2V = overload {
|
||||||
auxV2V : V -> V2V
|
auxV2V : V -> V2V
|
||||||
= \v -> dirV2 v ** {isAux = True ; objCtrl = True ; lock_V2V = <>} ; -- lasse jmdn sich waschen
|
= \v -> dirV2 v ** {isAux = True ; objCtrl = True ; lock_V2V = <>} ; -- lasse jmdn sich waschen
|
||||||
auxV2V : V -> Prep -> V2V
|
auxV2V : V -> Prep -> V2V
|
||||||
= \v,p -> prepV2 v p ** {isAux = True ; objCtrl = True ; lock_V2V = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = True ; objCtrl = True ; lock_V2V = <>} ;
|
||||||
} ;
|
} ;
|
||||||
subjV2V v = v ** {objCtrl = False} ;
|
subjV2V v = v ** {objCtrl = False} ;
|
||||||
|
|
||||||
mkV2A = overload {
|
mkV2A = overload {
|
||||||
mkV2A : V -> V2A
|
mkV2A : V -> V2A = \v -> dirV2 v ** {isAux = False ; lock_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 = <>} ;
|
||||||
} ;
|
} ;
|
||||||
mkV2S = overload {
|
mkV2S = overload {
|
||||||
mkV2S : V -> V2S
|
mkV2S : V -> V2S
|
||||||
= \v -> dirV2 v ** {isAux = False ; lock_V2S = <>} ;
|
= \v -> dirV2 v ** {isAux = False ; lock_V2S = <>} ;
|
||||||
mkV2S : V -> Prep -> V2S
|
mkV2S : V -> Prep -> V2S
|
||||||
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2S = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2S = <>} ;
|
||||||
} ;
|
} ;
|
||||||
mkV2Q = overload {
|
mkV2Q = overload {
|
||||||
mkV2Q : V -> V2Q
|
mkV2Q : V -> V2Q
|
||||||
= \v -> dirV2 v ** {isAux = False ; lock_V2Q = <>} ;
|
= \v -> dirV2 v ** {isAux = False ; lock_V2Q = <>} ;
|
||||||
mkV2Q : V -> Prep -> V2Q
|
mkV2Q : V -> Prep -> V2Q
|
||||||
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2Q = <>} ;
|
= \v,p -> prepV2 v p ** {isAux = False ; lock_V2Q = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -745,10 +745,10 @@ 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 isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
|
b : Bool = case prep.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 ;
|
||||||
|
|
||||||
insertObj' : Str -> Bool -> Weight -> Case -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp ->
|
insertObj' : Str -> Bool -> Weight -> Case -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp ->
|
||||||
vp ** {
|
vp ** {
|
||||||
|
|||||||
@@ -32,10 +32,11 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
|||||||
<Pl,P2,False> => AgPl P2 ; -- euch | euer-
|
<Pl,P2,False> => AgPl P2 ; -- euch | euer-
|
||||||
_ => AgSgP1 -- default, does not occur
|
_ => AgSgP1 -- default, does not occur
|
||||||
} ;
|
} ;
|
||||||
|
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
|
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.adj
|
||||||
in
|
in
|
||||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ neg ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvImp adv imp = {
|
AdvImp adv imp = {
|
||||||
|
|||||||
@@ -158,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} ; -- HL 7.8.23
|
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user