diff --git a/src/romance/CatRomance.gf b/src/romance/CatRomance.gf index 8aee01c3..3fb733aa 100644 --- a/src/romance/CatRomance.gf +++ b/src/romance/CatRomance.gf @@ -16,7 +16,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] QS = {s : QForm => Str} ; RS = {s : Mood => Agr => Str ; c : Case} ; SSlash = { - s : AAgr => Mood => Str ; + s : AAgr => Mood => Str ; c2 : Compl } ; @@ -26,7 +26,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] Cl = {s : Direct => RTense => Anteriority => RPolarity => Mood => Str} ; ClSlash = { - s : AAgr => Direct => RTense => Anteriority => RPolarity => Mood => Str ; + s : AAgr => Direct => RTense => Anteriority => RPolarity => Mood => Str ; c2 : Compl } ; Imp = {s : RPolarity => ImpForm => Gender => Str} ; @@ -35,14 +35,14 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] QCl = {s : RTense => Anteriority => RPolarity => QForm => Str} ; IP = {s : Case => Str ; a : AAgr} ; - IComp = {s : AAgr => Str ; cop : CopulaType} ; + IComp = {s : AAgr => Str ; cop : CopulaType} ; IDet = {s : Gender => Case => Str ; n : Number} ; IQuant = {s : Number => Gender => Case => Str} ; -- Relative RCl = { - s : Agr => RTense => Anteriority => RPolarity => Mood => Str ; + s : Agr => RTense => Anteriority => RPolarity => Mood => Str ; c : Case } ; RP = {s : Bool => AAgr => Case => Str ; a : AAgr ; hasAgr : Bool} ; @@ -51,11 +51,11 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] VP = ResRomance.VP ; VPSlash = ResRomance.VP ** {c2 : Compl} ; - Comp = {s : Agr => Str ; cop : CopulaType} ; + Comp = {s : Agr => Str ; cop : CopulaType} ; -- Adjective - AP = {s : AForm => Str ; isPre : Bool} ; + AP = {s : AForm => Str ; isPre : Bool} ; -- Noun @@ -63,20 +63,21 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] Pron = Pronoun ; NP = NounPhrase ; Det = { - s : Gender => Case => Str ; - n : Number ; - s2 : Str ; -- -ci + s : Gender => Case => Str ; + n : Number ; + s2 : Str ; -- -ci sp : Gender => Case => Str ; -- substantival: mien, mienne isNeg : Bool -- negative element, e.g. aucun } ; Quant = { - s : Bool => Number => Gender => Case => Str ; - s2 : Str ; + s : Bool => Number => Gender => Case => Str ; + s2 : Str ; sp : Number => Gender => Case => Str ; isNeg : Bool -- negative element, e.g. aucun } ; + DAP = {s : Gender => Str ; n : Number} ; Predet = { - s : AAgr => Case => Str ; + s : AAgr => Case => Str ; c : Case ; -- c : la plupart de a : PAgr -- if an agr is forced, e.g. chacun de nous } ; @@ -107,7 +108,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol] A = {s : Degree => AForm => Str ; isPre : Bool} ; A2 = {s : Degree => AForm => Str ; c2 : Compl} ; - N = Noun ; + N = Noun ; N2 = Noun ** {c2 : Compl} ; N3 = Noun ** {c2,c3 : Compl} ; PN = {s : Str ; g : Gender} ; diff --git a/src/romance/NounRomance.gf b/src/romance/NounRomance.gf index 9fecb054..b0e94ae0 100644 --- a/src/romance/NounRomance.gf +++ b/src/romance/NounRomance.gf @@ -4,8 +4,8 @@ incomplete concrete NounRomance of Noun = flags optimize=all_subs ; coding = utf8 ; lin - DetCN det cn = - let + DetCN det cn = + let g = cn.g ; n = det.n in heavyNPpol det.isNeg { @@ -18,7 +18,7 @@ incomplete concrete NounRomance of Noun = UsePron p = p ** {isNeg = False} ; - PredetNP pred np = + PredetNP pred np = let agr = complAgr np.a in heavyNPpol np.isNeg { s = \\c => pred.s ! agr ! c ++ (np.s ! pred.c).ton ; @@ -26,7 +26,7 @@ incomplete concrete NounRomance of Noun = hasClit = False } ; - PPartNP np v2 = + PPartNP np v2 = let agr = complAgr np.a in heavyNPpol np.isNeg { s = \\c => (np.s ! c).ton ++ v2.s ! VPart agr.g agr.n ; @@ -53,7 +53,7 @@ incomplete concrete NounRomance of Noun = } ; DetQuantOrd quant num ord = { - s,sp = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ++ + s,sp = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ++ ord.s ! aagr g num.n ; s2 = quant.s2 ; n = num.n ; @@ -61,18 +61,18 @@ incomplete concrete NounRomance of Noun = } ; DetQuant quant num = { - s = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ; + s = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ; sp = \\g,c => case num.isNum of { - True => quant.s ! True ! num.n ! g ! c ++ num.s ! g ; + True => quant.s ! True ! num.n ! g ! c ++ num.s ! g ; False => quant.sp ! num.n ! g ! c ++ num.s ! g - } ; + } ; s2 = quant.s2 ; n = num.n ; isNeg = quant.isNeg } ; - DetNP det = - let + DetNP det = + let g = Masc ; ---- Fem in Extra n = det.n in heavyNPpol det.isNeg { @@ -103,24 +103,24 @@ incomplete concrete NounRomance of Noun = OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ; - OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! AF a.g a.n} ; -- la terza più grande + OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! AF a.g a.n} ; -- la terza più grande ---- could be discontinuous: la terza città più grande DefArt = { - s = \\_,n,g,c => artDef False g n c ; - sp = \\n,g,c => artDef True g n c ; + s = \\_,n,g,c => artDef False g n c ; + sp = \\n,g,c => artDef True g n c ; s2 = [] ; isNeg = False } ; IndefArt = { s = \\b,n,g,c => if_then_Str b (prepCase c) (artIndef False g n c) ; - sp = \\n,g,c => artIndef True g n c ; + sp = \\n,g,c => artIndef True g n c ; s2 = [] ; isNeg = False } ; - MassNP cn = let + MassNP cn = let g = cn.g ; n = Sg in heavyNP { @@ -149,9 +149,9 @@ incomplete concrete NounRomance of Noun = c2 = f.c3 } ; - AdjCN ap cn = - let - g = cn.g + AdjCN ap cn = + let + g = cn.g in { s = \\n => preOrPost ap.isPre (ap.s ! (AF g n)) (cn.s ! n) ; g = g ; @@ -179,4 +179,14 @@ incomplete concrete NounRomance of Noun = s = \\n => cn.s ! n ++ appCompl {s = [] ; c = genitive ; isDir = False} np ; g = cn.g ; } ; + + -- PartNP and CounNP missing: how to define 'of' in the functor? + + AdjDAP det ap = { + s = \\g => det.s ! g ++ ap.s ! AF g det.n ; + n = det.n ; + } ; + + DetDAP det = {s = \\g => det.s ! g ! Nom ; n = det.n } ; + }