diff --git a/src/french/ConstructionFre.gf b/src/french/ConstructionFre.gf index b7e2a57ae..a7818c833 100644 --- a/src/french/ConstructionFre.gf +++ b/src/french/ConstructionFre.gf @@ -31,6 +31,7 @@ lin is_wrong_VP = E.ComplCN have_V2 (mkCN (mkN "tort")) ; n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) (lin A a) ; + n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ; bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "bouteille" feminine) part_Prep)) np ; cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "tasse") part_Prep)) np ; @@ -81,6 +82,7 @@ lin InLanguage l = SyntaxFre.mkAdv (mkPrep "en") (mkNP l) ; lin weekdayN w = w ; + monthN m = m ; weekdayPN w = mkPN w ; monthPN m = mkPN m ; diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf index 57ec59ac5..f668808ec 100644 --- a/src/french/ExtendFre.gf +++ b/src/french/ExtendFre.gf @@ -5,9 +5,12 @@ concrete ExtendFre of Extend = [ ---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron, GenRP, - ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP, + ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP, ReflPron, PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP, ApposNP, CompoundN, - BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP + BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP, + BaseVPI, ConsVPI, MkVPI, ConjVPI, ComplVPIVV, + ProgrVPSlash, ReflPoss, CompoundAP, GerundCN, GerundNP, GerundAdv, + ByVP, InOrderToVP, PositAdVAdj, TPastSimple ] -- put the names of your own definitions here with (Grammar = GrammarFre) ** @@ -18,7 +21,8 @@ concrete ExtendFre of Extend = PhonoFre, Coordination, Prelude, - ParadigmsFre in { + ParadigmsFre, + (P = ParamX) in { -- put your own definitions here lincat @@ -72,6 +76,50 @@ lin PassVPSlash vps = passVPSlash vps [] ; s = \\agr,c => reflPron agr.n agr.p c } ; + ReflPoss num cn = { + s = \\agr,c => possCase cn.g num.n c ++ + possDet agr num.n cn.g ++ cn.s ! num.n + } ; + + AdvRNP np prep rnp = { + s = \\agr,c => (np.s ! c).ton ++ prep.s ++ rnp.s ! agr ! prep.c + } ; + + AdvRVP vp prep rnp = + insertComplement (\\a => prep.s ++ rnp.s ! verbAgr a ! prep.c) vp ; + + AdvRAP ap prep rnp = ap ** { + s = \\af => ap.s ! af ++ prep.s ++ + rnp.s ! (aform2aagr af ** {p = P3}) ! prep.c ; + isPre = False + } ; + + ReflA2RNP a rnp = a ** { + s = \\af => a.s ! af ++ a.c2.s ++ + rnp.s ! (aform2aagr af ** {p = P3}) ! a.c2.c ; + isPre = False + } ; + + PossPronRNP pron num cn rnp = heavyNP { + s = \\c => possCase cn.g num.n c ++ pron.poss ! num.n ! cn.g ++ + cn.s ! num.n ++ rnp.s ! pron.a ! (CPrep P_de) ; + a = agrP3 cn.g num.n ; + hasClit = False ; + isNeg = False + } ; + +oper + possDet : Agr -> Number -> Gender -> Str ; + possDet = \agr,n,g -> + case of { + => i_Pron.poss ! n ! g ; + => youSg_Pron.poss ! n ! g ; + => he_Pron.poss ! n ! g ; + => we_Pron.poss ! n ! g ; + => youPl_Pron.poss ! n ! g ; + => they_Pron.poss ! n ! g + } ; + oper passVPSlash : VPSlash -> Str -> VP = \vps, agent -> let auxvp = predV auxPassive @@ -95,6 +143,60 @@ lin ApposNP np1 np2 = np1 ** { -- guessed by KA } ; } ; +lin + PresPartAP vp = { + s = \\af => gerVP vp RPos (aform2aagr af ** {p = P3}) ; + isPre = False ; + copTyp = serCopula + } ; + + ProgrVPSlash vps = GrammarFre.ProgrVP (lin VP vps) ** {c2 = vps.c2} ; + + CompoundAP noun adj = { + s = \\af => adj.s ! af ++ "de" ++ noun.s ! (aform2number af) ; + isPre = adj.isPre ; + copTyp = adj.copTyp + } ; + + GerundNP vp = let agr = Ag Masc Sg P3 in heavyNP { + s = \\_ => infVP vp RPos agr ; + a = agr + } ; + + GerundCN vp = { + s = \\n => infVP vp RPos (Ag Masc n P3) ; + g = Masc + } ; + + GerundAdv vp = {s = "en" ++ gerVP vp RPos (Ag Masc Sg P3)} ; + ByVP vp = {s = "en" ++ gerVP vp RPos (Ag Masc Sg P3)} ; + InOrderToVP vp = {s = "afin de" ++ infVP vp RPos (Ag Masc Sg P3)} ; + PositAdVAdj a = {s = a.s ! AA} ; + + lincat + VPI = {s : Agr => Str} ; + [VPI] = {s1,s2 : Agr => Str} ; + [Comp] = {s1,s2 : Agr => Str ; cop : CopulaType} ; + [Imp] = {s1,s2 : RPolarity => P.ImpForm => Gender => Str} ; + + lin + MkVPI vp = {s = \\a => infVP vp RPos a} ; + BaseVPI = twoTable Agr ; + ConsVPI = consrTable Agr comma ; + ConjVPI = conjunctDistrTable Agr ; + ComplVPIVV vv vpi = + insertComplement (\\a => prepCase vv.c2.c ++ vpi.s ! a) (predV vv) ; + + BaseComp x y = twoTable Agr x y ** {cop = x.cop} ; + ConsComp xs x = consrTable Agr comma xs x ** xs ; + ConjComp conj cs = conjunctDistrTable Agr conj cs ** {cop = cs.cop} ; + + BaseImp = twoTable3 RPolarity P.ImpForm Gender ; + ConsImp = consrTable3 RPolarity P.ImpForm Gender comma ; + ConjImp = conjunctDistrTable3 RPolarity P.ImpForm Gender ; + + TPastSimple = {s = []} ** {t = RPasse} ; + lin CompoundN a b = lin N { s = \\n => b.s ! n ++ case b.relType of { diff --git a/src/french/NumeralFre.gf b/src/french/NumeralFre.gf index d086af230..2b16ba2f8 100644 --- a/src/french/NumeralFre.gf +++ b/src/french/NumeralFre.gf @@ -142,7 +142,21 @@ lin pot3plus n m = Pl} ; lin pot3as4 n = n ; +lin pot41 = {s = \\co => cardOrd co "un million" "millionième" ; n = Sg} ; +lin pot4 n = {s = \\co => n.s ! NCard Masc ! indep ++ cardOrd co "millions" "millionième" ; n = Pl} ; +lin pot4plus n m = { + s = \\co => n.s ! NCard Masc ! indep ++ "millions" ++ m.s ! co ; + n = Pl + } ; +lin pot4decimal d = {s = \\co => d.s ! NCard Masc ++ "millions" ; n = Pl} ; lin pot4as5 n = n ; +lin pot51 = {s = \\co => cardOrd co "un milliard" "milliardième" ; n = Sg} ; +lin pot5 n = {s = \\co => n.s ! NCard Masc ! indep ++ cardOrd co "milliards" "milliardième" ; n = Pl} ; +lin pot5plus n m = { + s = \\co => n.s ! NCard Masc ! indep ++ "milliards" ++ m.s ! co ; + n = Pl + } ; +lin pot5decimal d = {s = \\co => d.s ! NCard Masc ++ "milliards" ; n = Pl} ; oper hyphen = BIND ++ "-" ++ BIND ;