diff --git a/resource/french/MorphoFre.gf b/resource/french/MorphoFre.gf index a50c8294f..e9f93e001 100644 --- a/resource/french/MorphoFre.gf +++ b/resource/french/MorphoFre.gf @@ -57,7 +57,15 @@ oper mkCNomInvar : Str -> Gender -> CNom = \cas -> mkCNomIrreg cas cas ; - + mkNomReg : Str -> Gender -> CNom = \cas -> + let cass = case last cas of { + "s" => cas ; + "x" => cas ; + "z" => cas ; + _ => cas + "s" + } + in mkCNomIrreg cas cass ; + -- The definite article has quite some variation: three parameters and -- elision. This is the simples definition we have been able to find. @@ -111,7 +119,11 @@ oper adjHeureux : Str -> Adj = \heureux -> let {heureu = Predef.tk 1 heureux} in - mkAdj heureux heureu (heureu+"se") (heureu+"sement") ; + mkAdj heureux (heureu+"s") (heureu+"se") (heureu+"sement") ; + + adjBanal : Str -> Adj = \banal -> + let {bana = Predef.tk 1 banal} in + mkAdj banal (bana + "ux") (banal+"e") (banal+"ement") ; adjJeune : Str -> Adj = \jeune -> mkAdj jeune (jeune+"s") jeune (jeune+"ment") ; @@ -126,6 +138,23 @@ oper let {ch = Predef.tk 2 cher} in mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ; + mkAdjReg : Str -> Adj = \creux -> + case Predef.dp 3 creux of { + "eux" => adjHeureux creux ; + _ => case Predef.dp 2 creux of { + "al" => adjBanal creux ; + "en" => adjIndien creux ; + "on" => adjIndien creux ; + "er" => adjCher creux ; + _ => case Predef.dp 1 creux of { + "s" => adjFrancais creux ; + "e" => adjJeune creux ; + "é" => adjJoli creux ; + "i" => adjJoli creux ; + _ => adjGrand creux + } + } + } ; --2 Personal pronouns diff --git a/resource/french/SyntaxFre.gf b/resource/french/SyntaxFre.gf index 9684c5c6c..24272ad3b 100644 --- a/resource/french/SyntaxFre.gf +++ b/resource/french/SyntaxFre.gf @@ -1,6 +1,7 @@ --# -path=.:../romance:../../prelude -instance SyntaxFre of SyntaxRomance = TypesFre ** open Prelude, (CO=Coordination), MorphoFre in { +instance SyntaxFre of SyntaxRomance = TypesFre ** + open Prelude, (CO=Coordination), MorphoFre in { flags optimize=parametrize ; diff --git a/resource/romance/CategoriesRomance.gf b/resource/romance/CategoriesRomance.gf index de40714d5..a438d7279 100644 --- a/resource/romance/CategoriesRomance.gf +++ b/resource/romance/CategoriesRomance.gf @@ -49,7 +49,7 @@ lincat AP = Adjective ; AS = Adjective ** {mp,mn : Mode} ; --- "more difficult for him to come than..." A2S = Adjective ** {s2 : Preposition} ; - AV = Adjective ; + AV = Adjective ** {c : CaseA} ; A2V = Adjective ** {s2 : Preposition} ; V = Verb ; diff --git a/resource/romance/ClauseRomance.gf b/resource/romance/ClauseRomance.gf index ee653c50a..19061bf04 100644 --- a/resource/romance/ClauseRomance.gf +++ b/resource/romance/ClauseRomance.gf @@ -17,17 +17,15 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance ** SPredV2A np v x y = predVerbClause np v (complDitransAdjVerb v x y) ; SPredSubjV2V np v x y = predVerbClause np v (complDitransVerbVerb False v x y) ; SPredObjV2V np v x y = predVerbClause np v (complDitransVerbVerb True v x y) ; -{- - SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ; - SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ; --} +-- SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ; +-- SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ; SPredAP np v = predCopula np (complAdjective v) ; SPredSuperl np a = predCopula np (complAdjective (superlAdjPhrase a)) ; SPredCN np v = predCopula np (complCommNoun v) ; SPredNP np v = predCopula np (complNounPhrase v) ; SPredPP np v = predCopula np (complAdverb v) ; -{- SPredAV np v x = predCopula np (complVerbAdj v x) ; +{- SPredObjA2V np v x y = predCopula np (complVerbAdj2 True v x y) ; SPredProgVP = progressiveClause ; diff --git a/resource/romance/SyntaxRomance.gf b/resource/romance/SyntaxRomance.gf index ecece8436..c50498b6c 100644 --- a/resource/romance/SyntaxRomance.gf +++ b/resource/romance/SyntaxRomance.gf @@ -215,7 +215,7 @@ oper --3 Comparison adjectives -- --- The type is defined in $types.Romance.gf$. Syntax adds to lexicon the position +-- The type is defined in $TypesRomance$. Syntax adds to lexicon the position -- information. AdjDegr = AdjComp ** {p : Bool} ; @@ -489,6 +489,11 @@ oper complAdverb : Adverb -> Complemnt = \dehors -> complCopula (\\_,_,_ => dehors.s) ; + complVerbAdj : (Adjective ** {c : CaseA}) -> VerbPhrase -> Complemnt = \facile,ouvrir -> + complCopula (\\g,n,p => + facile.s ! AF g n ++ prepCase facile.c ++ + ouvrir.s ! VIInfinit ! g ! n ! p) ; + -- Passivization is like adjectival predication. passVerb : Verb -> Complemnt = \aimer -> @@ -531,6 +536,11 @@ oper -- More will be needed when we add ditransitive verbs. complTransVerb : TransVerb -> NounPhrase -> Complemnt = \aime,jean -> + complTransVerbGen aime jean (\\_,_,_ => []) ; + + complTransVerbGen : TransVerb -> NounPhrase -> + (Gender => Number => Person => Str) -> Complemnt = + \aime,jean,ici -> let clit = andB (isNounPhraseClit jean) (isTransVerbClit aime) ; Jean = jean.s ! (case2pformClit aime.c) ; @@ -538,9 +548,12 @@ oper (aime.s ! VPart (pgen2gen jean.g) jean.n) (aime.s ! VPart Masc Sg) in - \\_,_,_ => case clit of { - True => {clit = Jean ; part = aimee ; compl = []} ; - False => {clit = [] ; part = aimee ; compl = Jean} + \\g,n,p => + let Ici = ici ! g ! n ! p + in + case clit of { + True => {clit = Jean ; part = aimee ; compl = Ici} ; + False => {clit = [] ; part = aimee ; compl = Jean ++ Ici} } ; ----- add auxVerb to Complemnt to switch to $esse$ in refl ? @@ -625,35 +638,23 @@ oper complDitransAdjVerb : TransVerb -> NounPhrase -> AdjPhrase -> Complemnt = \rend,toi,sec -> - let - rendtoi = complTransVerb rend toi - in - \\g,n,p => - let rt = rendtoi ! g ! n ! p in - {clit = rt.clit ; part = rt.part ; - compl = rt.compl ++ sec.s ! AF g n - } ; + complTransVerbGen rend toi (\\g,n,_ => sec.s ! AF g n) ; DitransVerbVerb = TransVerb ** {c3 : CaseA} ; complDitransVerbVerb : Bool -> DitransVerbVerb -> NounPhrase -> VerbPhrase -> Complemnt = \obj, demander, toi, nager -> - let - rendtoi = complTransVerb demander toi - in - \\g,n,p => - let - rt = rendtoi ! g ! n ! p ; - agr : Gender * Number * Person = case obj of { - True => ; - False => - } - in - {clit = rt.clit ; part = rt.part ; - compl = rt.compl ++ prepCase demander.c ++ - nager.s ! VIInfinit ! agr.p1 ! agr.p2 ! agr.p3 - } ; + complTransVerbGen demander toi + (\\g,n,p => + let + agr : Gender * Number * Person = case obj of { + True => ; + False => + } + in + prepCase demander.c ++ + nager.s ! VIInfinit ! agr.p1 ! agr.p2 ! agr.p3) ; --2 Adverbs @@ -763,27 +764,28 @@ oper co = comp ! pgen2gen np.g ! np.n ! np.p ; la = co.clit ; ici = co.compl ; + aimee = co.part ; aime : TMode -> Str = \t -> verb.s ! (VFin t np.n np.p) ; avoir : TMode -> Str = \t -> (auxVerb verb).s ! (VFin t np.n np.p) ; - aimee = co.part ; aimer = verb.s ! VInfin ; avoirr = (auxVerb verb).s ! VInfin in \\b => table { - ClPres Simul m => ; - ClPres a m => ; - ClImperf Simul m => ; - ClImperf a m => ; - ClPasse Simul => ; - ClPasse a => ; - ClFut Simul => ; - ClFut a => ; - ClCondit Simul => ; - ClCondit a => ; - ClInfinit Simul => ; - ClInfinit a => + ClPres Simul m => ; + ClPres a m => ; + ClImperf Simul m => ; + ClImperf a m => ; + ClPasse Simul => ; + ClPasse a => ; + ClFut Simul => ; + ClFut a => ; + ClCondit Simul => ; + ClCondit a => ; + ClInfinit Simul => ; + ClInfinit a => } ; + --3 Sentence-complement verbs -- -- Sentence-complement verbs take sentences as complements.