From 72b257b9b7d6a5c67f5acc405b898d591bbe62fd Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 8 Nov 2017 10:36:49 +0100 Subject: [PATCH] ExtendFre with some definitions --- src/french/AllFre.gf | 2 +- src/french/ExtendFre.gf | 43 +++++++++++++++++++++++++++++++++++++++ src/romance/ResRomance.gf | 10 +++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/french/ExtendFre.gf diff --git a/src/french/AllFre.gf b/src/french/AllFre.gf index 3ce0e6e3..9fc759a8 100644 --- a/src/french/AllFre.gf +++ b/src/french/AllFre.gf @@ -3,5 +3,5 @@ concrete AllFre of AllFreAbs = LangFre, IrregFre, - ExtraFre + ExtendFre ---- ExtraFre ** {} ; diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf new file mode 100644 index 00000000..d03498d0 --- /dev/null +++ b/src/french/ExtendFre.gf @@ -0,0 +1,43 @@ +--# -path=alltenses:../common:../abstract + +concrete ExtendFre of Extend = + CatFre ** ExtendFunctor - + [ +---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron, + ExistCN, ExistMassCN, ExistPluralCN + ] -- put the names of your own definitions here + with + (Grammar = GrammarFre) ** + open + GrammarFre, + ResFre, + MorphoFre, + PhonoFre, + Coordination, + Prelude, + ParadigmsFre in { + -- put your own definitions here + +lin + ExistCN cn = + let + pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; + neg = ExistNP (DetCN (DetQuant de_Quant NumSg) cn) ; + in posNegClause pos neg PNeg.p ; + ExistMassCN cn = + let + pos = ExistNP (MassNP cn) ; + neg = ExistNP (DetCN (DetQuant de_Quant NumSg) cn) ; + in posNegClause pos neg PNeg.p ; + ExistPluralCN cn = + let + pos = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ; + neg = ExistNP (DetCN (DetQuant de_Quant NumPl) cn) ; + in posNegClause pos neg PNeg.p ; + +oper + de_Quant : Quant = IndefArt ** {s = \\_,_,_,_ => elisDe} ; + + + + } \ No newline at end of file diff --git a/src/romance/ResRomance.gf b/src/romance/ResRomance.gf index 21476547..5e928d78 100644 --- a/src/romance/ResRomance.gf +++ b/src/romance/ResRomance.gf @@ -178,6 +178,16 @@ oper mkVPSlash : Compl -> VP -> VP ** {c2 : Compl} = \c,vp -> vp ** {c2 = c} ; + Clause : Type = {s : Direct => RTense => Anteriority => RPolarity => Mood => Str} ; + +-- for pos/neg variation other than negation word, e.g. "il y a du vin" / "il n'y a pas de vin" + posNegClause : Clause -> Clause -> RPolarity -> Clause = \pos,neg,pol -> { + s = \\d,t,a,b,m => case b of { + RPos => pos.s ! d ! t ! a ! b ! m ; + _ => neg.s ! d ! t ! a ! pol ! m + } + } ; + mkClause : Str -> Bool -> Bool -> Agr -> VP -> {s : Direct => RTense => Anteriority => RPolarity => Mood => Str} = mkClausePol False ;