diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 01e94d5f..f3fd1131 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -277,4 +277,13 @@ abstract Extend = Cat ** { UttDatIP : IP -> Utt ; -- whom (dative) +-- UseDAP replaces DetNP from the RGL which is more limited. +-- Instead of (DetNP d) use (UseDAP (DetDAP d)). The advantage +-- is that now we can also have an adjective inserted, i.e. +-- (UseDAP (AdjDAP (DetDAP d) a). There are also versions of +-- UseDAP for different genders. +fun UseDAP : DAP -> NP ; + UseDAPMasc : DAP -> NP ; + UseDAPFem : DAP -> NP ; + } diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index 42cdd6bf..2d2d82bc 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -270,5 +270,35 @@ lin p = NounP3 det.p } ; +lin UseDAP dap = { + s = \\role => let s = dap.s ! False ! ANeut ! role + in case role of { + RObj c => linCase c dap.p ++ s; + _ => s + } ; + gn = gennum ANeut (numnnum dap.nn); + p = NounP3 dap.p + } ; + + UseDAPMasc dap = { + s = \\role => let s = dap.s ! False ! (AMasc Human) ! role + in case role of { + RObj c => linCase c dap.p ++ s; + _ => s + } ; + gn = gennum (AMasc Human) (numnnum dap.nn); + p = NounP3 dap.p + } ; + + UseDAPFem dap = { + s = \\role => let s = dap.s ! False ! AFem ! role + in case role of { + RObj c => linCase c dap.p ++ s; + _ => s + } ; + gn = gennum AFem (numnnum dap.nn); + p = NounP3 dap.p + } ; + } diff --git a/src/dutch/CatDut.gf b/src/dutch/CatDut.gf index 02345e64..c48adbe3 100644 --- a/src/dutch/CatDut.gf +++ b/src/dutch/CatDut.gf @@ -48,7 +48,7 @@ concrete CatDut of Cat = Pron = Pronoun ; - Det = Determiner ; + Det, DAP = Determiner ; Quant = Quantifier ; Predet = {s : Number => Gender => Str} ; Num = {s : Str ; n : Number ; isNum : Bool} ; diff --git a/src/dutch/ExtendDut.gf b/src/dutch/ExtendDut.gf index 93f55b28..4cc3d758 100644 --- a/src/dutch/ExtendDut.gf +++ b/src/dutch/ExtendDut.gf @@ -101,4 +101,18 @@ lin ICompAP ap = {s = \\agr => "hoe" ++ ap.s ! agr ! APred} ; IAdvAdv adv = {s = "hoe" ++ adv.s} ; + +lin + UseDAP dap = dap ** { + s = \\_ => dap.sp ! Neutr ; + a = agrP3 dap.n ; + isPron = False + } ; + + UseDAPMasc, UseDAPFem = \dap -> dap ** { + s = \\_ => dap.sp ! Utr ; + a = agrP3 dap.n ; + isPron = False + } ; + } diff --git a/src/dutch/NounDut.gf b/src/dutch/NounDut.gf index 2daca07c..18e52291 100644 --- a/src/dutch/NounDut.gf +++ b/src/dutch/NounDut.gf @@ -197,4 +197,6 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in { g = cn.g } ; + DetDAP det = det ; + } diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index 539c15af..3418dcf9 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -447,4 +447,19 @@ lin BaseImp = twoTable2 CPolarity ImpForm ; UncontractedNeg = {s = [] ; p = CNeg False} ; UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ; +lin UseDAP dap = { + s = dap.sp ! Neutr ! False ; + a = agrP3 dap.n + } ; + +lin UseDAPMasc dap = { + s = dap.sp ! Masc ! False ; + a = agrgP3 dap.n Masc + } ; + +lin UseDAPFem dap = { + s = dap.sp ! Fem ! False ; + a = agrgP3 dap.n Fem + } ; + } diff --git a/src/finnish/ExtendFin.gf b/src/finnish/ExtendFin.gf index 1d034005..647b8cf3 100644 --- a/src/finnish/ExtendFin.gf +++ b/src/finnish/ExtendFin.gf @@ -210,4 +210,20 @@ lin vptyp = vp.vptyp ; } ; + UseDAP, UseDAPFem, UseDAPMasc = \dap -> + let + n : ParadigmsFin.Number = case dap.isNum of { + True => Sg ; + _ => dap.n + } ; + in { + s = \\c => let k = npform2case n c in + dap.sp ! k ; -- det.s2 is possessive suffix + a = agrP3 (case dap.isDef of { + False => Sg ; -- autoja menee; kolme autoa menee + _ => dap.n + }) ; + isPron = False ; isNeg = dap.isNeg + } ; + } diff --git a/src/german/CatGer.gf b/src/german/CatGer.gf index 990b1a09..1b247c85 100644 --- a/src/german/CatGer.gf +++ b/src/german/CatGer.gf @@ -57,7 +57,7 @@ concrete CatGer of Cat = g : Gender} ; NP = ResGer.NP ; Pron = {s : NPForm => Str ; a : Agr} ; - Det = {s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} ; + Det, DAP = {s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} ; Quant = { s : Bool => Number => Gender => PCase => Str ; -- Bool is True if a cardinal number is present sp : Bool => Number => Gender => PCase => Str ; diff --git a/src/german/ExtendGer.gf b/src/german/ExtendGer.gf index dcfd81fc..244a1d7a 100644 --- a/src/german/ExtendGer.gf +++ b/src/german/ExtendGer.gf @@ -104,6 +104,25 @@ lin ConjVPS = conjunctDistrTable2 Order Agr ; + UseDAP det = { + s = \\c => det.sp ! Neutr ! c ; + a = agrP3 det.n ; + w = case det.isDef of { True => WLight ; _ => WHeavy } ; + rc, ext = [] + } ; + UseDAPMasc det = { + s = \\c => det.sp ! Masc ! c ; + a = agrP3 det.n ; + w = WLight ; + rc, ext = [] + } ; -} \ No newline at end of file + UseDAPFem det = { + s = \\c => det.sp ! Fem ! c ; + a = agrP3 det.n ; + w = WLight ; + rc, ext = [] + } ; + +} diff --git a/src/german/NounGer.gf b/src/german/NounGer.gf index 8d82510b..8bae4da5 100644 --- a/src/german/NounGer.gf +++ b/src/german/NounGer.gf @@ -235,4 +235,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { PossNP cn np = cn ** { s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPP CVonDat ++ bigNP np } ; + + DetDAP det = det ; + } diff --git a/src/polish/CatPol.gf b/src/polish/CatPol.gf index e3283b29..e8bcabaa 100644 --- a/src/polish/CatPol.gf +++ b/src/polish/CatPol.gf @@ -58,7 +58,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX) Pron = ResPol.Pron; - Det = Determiner; + Det, DAP = Determiner; Predet = {s : AForm => Str; np:NounPhrase; adj:Bool }; -- 'all', 'most' and 'only' belong in Polish to three completly different parts of speach Quant = {s,sp : AForm => Str}; diff --git a/src/polish/ExtendPol.gf b/src/polish/ExtendPol.gf index 1e13aa91..b976212e 100644 --- a/src/polish/ExtendPol.gf +++ b/src/polish/ExtendPol.gf @@ -21,4 +21,20 @@ lin ProDrop p = { gn = p.gn ; } ; +lin + UseDAP = dap2np Neut ; + UseDAPMasc = dap2np (Masc Personal) ; + UseDAPFem = dap2np Fem ; + +oper + dap2np : Gender -> DAP -> NP ; + dap2np g dap = lin NP { + nom = dap.sp ! Nom ! g; + voc = dap.sp ! VocP ! g; + dep = \\cc => let c = extract_case ! cc + in dap.sp ! c ! g; + gn = accom_gennum ! ; + p = P3 + }; + } diff --git a/src/polish/NounPol.gf b/src/polish/NounPol.gf index fbaa054f..0b64dc54 100644 --- a/src/polish/NounPol.gf +++ b/src/polish/NounPol.gf @@ -205,4 +205,7 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol, Mor s= \\n,c=> cn.s!n!c ++ sc.s; g= cn.g }; + + DetDAP d = d ; + } diff --git a/src/romance/CatRomance.gf b/src/romance/CatRomance.gf index e37f2dca..17e61e3c 100644 --- a/src/romance/CatRomance.gf +++ b/src/romance/CatRomance.gf @@ -62,7 +62,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] CN = {s : Number => Str ; g : Gender} ; Pron = Pronoun ; NP = NounPhrase ; - Det = { + Det,DAP = { s : Gender => Case => Str ; n : Number ; s2 : Str ; -- -ci @@ -75,7 +75,6 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] sp : Number => Gender => Case => Str ; isNeg : Bool -- negative element, e.g. aucun } ; - DAP = {s : Gender => Case => Str ; n : Number} ; Predet = { s : AAgr => Case => Str ; c : Case ; -- c : la plupart de diff --git a/src/romance/ExtendRomanceFunctor.gf b/src/romance/ExtendRomanceFunctor.gf index fe9524c0..1c74278a 100644 --- a/src/romance/ExtendRomanceFunctor.gf +++ b/src/romance/ExtendRomanceFunctor.gf @@ -239,6 +239,26 @@ incomplete concrete ExtendRomanceFunctor of Extend = hasClit = False } ; + + UseDAP, UseDAPMasc = \dap -> + let + g = Masc ; + n = dap.n + in heavyNPpol dap.isNeg { + s = dap.sp ! g ; + a = agrP3 g n ; + hasClit = False + } ; + UseDAPFem dap = + let + g = Fem ; + n = dap.n + in heavyNPpol dap.isNeg { + s = dap.sp ! g ; + a = agrP3 g n ; + hasClit = False + } ; + lin iFem_Pron = i_Pron ; -- DEFAULT I (masc) youFem_Pron = youSg_Pron ; -- DEFAULT you (masc) diff --git a/src/romance/NounRomance.gf b/src/romance/NounRomance.gf index a6b0457e..d52fa224 100644 --- a/src/romance/NounRomance.gf +++ b/src/romance/NounRomance.gf @@ -192,8 +192,11 @@ incomplete concrete NounRomance of Noun = AdjDAP det ap = { s = \\g,c => det.s ! g ! c ++ ap.s ! genNum2Aform g det.n ; n = det.n ; + s2 = det.s2 ; -- -ci + sp = \\g,c => det.s ! g ! c ++ ap.s ! genNum2Aform g det.n ; + isNeg = det.isNeg } ; - DetDAP det = {s = \\g,c => det.s ! g ! c ; n = det.n } ; + DetDAP det = det ; } diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index 27b6151e..5717fd96 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -368,4 +368,30 @@ lin BaseImp = twoTable2 Polarity Number ; EmbedSSlash ss = {s = "det" ++ ss.s ! Main ++ ss.c2.s ++ ss.n3 ! agrUSgP3} ; UttAccNP np = {s = np.s ! NPAcc} ; + +lin UseDAP dap = + let + g = neutrum ; ---- + m = True ; ---- is this needed for other than Art? + in { + s = table { + NPPoss _ _ => dap.sp ! m ! g ++ BIND ++ "s" ; + _ => dap.sp ! m ! g + } ; + a = agrP3 (ngen2gen g) dap.n ; + isPron = False + } ; + +lin UseDAPMasc, UseDAPFem = \dap -> + let + g = utrum ; ---- + m = True ; ---- is this needed for other than Art? + in { + s = table { + NPPoss _ _ => dap.sp ! m ! g ++ BIND ++ "s" ; + _ => dap.sp ! m ! g + } ; + a = agrP3 (ngen2gen g) dap.n ; + isPron = False + } ; }