some Ger corrections by Erzsébet

This commit is contained in:
aarne
2012-05-15 09:16:57 +00:00
parent f6b87a7d88
commit c15c55a142
3 changed files with 43 additions and 7 deletions

View File

@@ -51,6 +51,7 @@ oper
inAcc_Case : Case ; -- preposition "in" accusative with contraction "ins" --%
inDat_Case : Case ; -- preposition "in" dative with contraction "am" --%
zuDat_Case : Case ; -- preposition "zu" dative with contractions "zum", "zur" --%
vonDat_Case : Case ;
-- To abstract over number names, we define the following.
@@ -308,6 +309,7 @@ mkV2 : overload {
inAcc_Case = NPP CInAcc ;
inDat_Case = NPP CInDat ;
zuDat_Case = NPP CZuDat ;
vonDat_Case = NPP CVonDat ;
singular = Sg ;
plural = Pl ;
@@ -401,7 +403,8 @@ mkV2 : overload {
accPrep = mkPrep [] accusative ;
datPrep = mkPrep [] dative ;
genPrep = mkPrep [] genitive ;
von_Prep = mkPrep "von" dative ;
--von_Prep = mkPrep "von" dative ;
von_Prep = mkPrep [] vonDat_Case ;
zu_Prep = mkPrep [] zuDat_Case ;
anDat_Prep = mkPrep [] anDat_Case ;
inDat_Prep = mkPrep [] inDat_Case ;

View File

@@ -36,7 +36,7 @@ resource ResGer = ParamX ** open Prelude in {
-- Case of $NP$ extended to deal with contractions like "zur", "im".
PCase = NPC Case | NPP CPrep ;
CPrep = CAnDat | CInAcc | CInDat | CZuDat ;
CPrep = CAnDat | CInAcc | CInDat | CZuDat | CVonDat ;
oper
NPNom : PCase = NPC Nom ;
@@ -45,7 +45,9 @@ resource ResGer = ParamX ** open Prelude in {
NPP CAnDat => {s = "an" ; c = Dat} ;
NPP CInAcc => {s = "in" ; c = Acc} ;
NPP CInDat => {s = "in" ; c = Dat} ;
NPP CZuDat => {s = "zu" ; c = Dat}
NPP CZuDat => {s = "zu" ; c = Dat} ;
NPP CVonDat => {s = "von" ; c = Dat}
} ;
usePrepC : PCase -> (Case -> Str) -> Str = \c,fs ->
@@ -392,6 +394,7 @@ resource ResGer = ParamX ** open Prelude in {
<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
}
} ;
@@ -641,6 +644,34 @@ resource ResGer = ParamX ** open Prelude in {
s : Mood => Tense => Anteriority => Polarity => Order => Str
} ;
{-
-- Erzsébet Galgóczy 15/5/2012
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> let vps = useVP vp in {
s = \\m,t,a,b,o =>
let
ord = case o of {
Sub => True ; -- glue prefix to verb
_ => False
} ;
verb = vps.s ! ord ! agr ! VPFinite m t a ;
neg = vp.a1 ! b ;
obj0 = vp.n0 ! agr ;
obj = vp.n2 ! agr ;
compl = obj0 ++ obj ++ neg ++ vp.a2 ;
inf = vp.inf ++ verb.inf ;
extra = vp.ext ;
inffin = inf ++ verb.fin ;
--# notpresent
in
case o of {
Main => subj ++ verb.fin ++ compl ++ extra ++ inf;
Inv => verb.fin ++ subj ++ compl ++ extra ++ inf ;
Sub => subj ++ compl ++ extra ++ inffin
}
} ;
-}
-- before 15/5/2012
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> let vps = useVP vp in {
s = \\m,t,a,b,o =>
let
@@ -652,7 +683,7 @@ resource ResGer = ParamX ** open Prelude in {
neg = vp.a1 ! b ;
obj0 = vp.n0 ! agr ;
obj = vp.n2 ! agr ;
compl = obj0 ++ neg ++ obj ++ vp.a2 ;
compl = obj0 ++ obj ++ neg ++ vp.a2 ; -- from EG 15/5
inf = vp.inf ++ verb.inf ;
extra = vp.ext ;
inffin =
@@ -669,6 +700,7 @@ resource ResGer = ParamX ** open Prelude in {
}
} ;
infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp -> let vps = useVP vp in
<
\\agr => vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2,

View File

@@ -68,9 +68,9 @@ concrete StructuralGer of Structural = CatGer **
on_Prep = mkPrep "auf" P.dative ;
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
otherwise_PConj = ss "sonst" ;
part_Prep = mkPrep "von" P.dative ;
part_Prep = P.von_Prep ; -- mkPrep "von" P.dative ;
please_Voc = ss "bitte" ;
possess_Prep = mkPrep "von" P.dative ;
possess_Prep = P.von_Prep ;-- mkPrep "von" P.dative ;
quite_Adv = ss "ziemlich" ;
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
so_AdA = ss "so" ;
@@ -80,7 +80,8 @@ concrete StructuralGer of Structural = CatGer **
s,sp = \\g,c =>
usePrepC c (\k -> "ein" + pronEnding ! GSg g ! k) ; ---- einer,eines
n = Sg ;
a = Strong
a = Strong ;
hasNum = True
} ;
something_NP = nameNounPhrase {s = \\_ => "etwas"} ;
somewhere_Adv = ss "irgendwo" ;