mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 18:52:50 -06:00
improved the performance of Romance while retaining correct agreement ; removed Diff modules from Phrasebook
This commit is contained in:
@@ -118,21 +118,21 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
||||
_ => <pdat ++ pacc, []>
|
||||
} ;
|
||||
|
||||
mkImperative b p vp = {
|
||||
s = \\pol,ag =>
|
||||
mkImperative b p vp =
|
||||
\\pol,g,n =>
|
||||
let
|
||||
agr = verbAgr ag ;
|
||||
num = if_then_else Number b Pl agr.n ;
|
||||
verb = vp.s.s ! vImperForm ag ;
|
||||
agr = Ag g n p ;
|
||||
num = if_then_else Number b Pl n ;
|
||||
verb = vp.s.s ! vImper n p ;
|
||||
neg = vp.neg ! pol ;
|
||||
clpr = <vp.clit1 ++ vp.clit2, False> ; ---- TODO: True if clit
|
||||
compl = vp.comp ! ag ++ vp.ext ! pol
|
||||
compl = vp.comp ! agr ++ vp.ext ! pol
|
||||
in
|
||||
case pol of {
|
||||
Pos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
|
||||
Neg => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
|
||||
}
|
||||
} ; ---- TODO: vois-le vs. vois-moi vs. ne me vois pas
|
||||
} ;
|
||||
---- TODO: vois-le vs. vois-moi vs. ne me vois pas
|
||||
|
||||
|
||||
negation : Polarity => (Str * Str) = table {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
|
||||
open CommonRomance, PhonoFre, MorphoFre, ParadigmsFre, ParamX, ResFre in {
|
||||
open CommonRomance, PhonoFre, MorphoFre, ParadigmsFre, ParamX, ResFre, Prelude in {
|
||||
|
||||
lin
|
||||
EstcequeS qs = {s = "est-ce" ++ elisQue ++ qs.s ! Indic} ;
|
||||
@@ -42,8 +42,9 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
|
||||
Fem Sg P2 ;
|
||||
youPl8fem_Pron,
|
||||
youPol8fem_Pron =
|
||||
let vous = mkPronoun "vous" "vous" "vous" "vous" "votre" "votre" "vos" Masc Pl P2
|
||||
in {s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = AgPol Fem} ;
|
||||
let vous = mkPronoun "vous" "vous" "vous" "vous" "votre" "votre" "vos" Fem Pl P2
|
||||
in
|
||||
{s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = vous.a ; isPol = True} ;
|
||||
|
||||
oper
|
||||
prepQue : Case -> Str = \c -> case c of {
|
||||
|
||||
@@ -4,26 +4,26 @@ concrete IdiomFre of Idiom = CatFre **
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
ImpersCl vp = mkClause "il" True (agrP3 Masc Sg) vp ;
|
||||
GenericCl vp = mkClause "on" True (agrP3 Masc Sg) vp ;
|
||||
ImpersCl vp = mkClause "il" True False (agrP3 Masc Sg) vp ;
|
||||
GenericCl vp = mkClause "on" True False (agrP3 Masc Sg) vp ;
|
||||
|
||||
ExistNP np =
|
||||
mkClause "il" True (agrP3 Masc Sg)
|
||||
mkClause "il" True False (agrP3 Masc Sg)
|
||||
(insertClit3 "y" (insertComplement (\\_ => (np.s ! Acc).ton) (predV avoir_V))) ;
|
||||
|
||||
ExistIP ip = {
|
||||
s = \\t,a,p,_ =>
|
||||
ip.s ! Nom ++
|
||||
(mkClause "il" True (agrP3 Masc Sg)
|
||||
(mkClause "il" True False (agrP3 Masc Sg)
|
||||
(insertClit3 "y" (predV avoir_V))).s
|
||||
! DDir ! t ! a ! p ! Indic ---- DInv
|
||||
} ;
|
||||
|
||||
CleftNP np rs = mkClause elisCe True (agrP3 Masc Sg)
|
||||
CleftNP np rs = mkClause elisCe True np.isPol (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => rs.s ! Indic ! np.a)
|
||||
(insertComplement (\\_ => (np.s ! rs.c).ton) (predV copula))) ;
|
||||
|
||||
CleftAdv ad s = mkClause elisCe True (agrP3 Masc Sg)
|
||||
CleftAdv ad s = mkClause elisCe True False (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
|
||||
(insertComplement (\\_ => ad.s) (predV copula))) ;
|
||||
|
||||
@@ -33,12 +33,12 @@ concrete IdiomFre of Idiom = CatFre **
|
||||
(\\a => "en" ++ "train" ++ elisDe ++ infVP vp a)
|
||||
(predV copula) ;
|
||||
|
||||
ImpPl1 vp = {s =
|
||||
(mkImperative False P1 vp).s ! Pos ! Ag Masc Pl P1 --- fem
|
||||
ImpPl1 vp = {
|
||||
s = mkImperative False P1 vp ! Pos ! Masc ! Pl --- fem
|
||||
} ;
|
||||
|
||||
ImpP3 np vp = {
|
||||
s = (mkClause (np.s ! Nom).comp np.hasClit np.a vp).s
|
||||
s = (mkClause (np.s ! Nom).comp np.hasClit False np.a vp).s
|
||||
! DInv ! RPres ! Simul ! Pos ! Conjunct
|
||||
} ;
|
||||
|
||||
|
||||
@@ -178,7 +178,8 @@ oper
|
||||
_ => ses
|
||||
} ;
|
||||
a = Ag g n p ;
|
||||
hasClit = True
|
||||
hasClit = True ;
|
||||
isPol = False
|
||||
} ;
|
||||
|
||||
elisPoss : Str -> Str = \s ->
|
||||
|
||||
@@ -403,7 +403,7 @@ oper
|
||||
--------------------------- obsolete
|
||||
|
||||
makeNP : Str -> Gender -> Number -> NP ;
|
||||
makeNP x g n = {s = (pn2np {s=x;g= g}).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
makeNP x g n = {s = (pn2np {s=x;g= g}).s; a = agrP3 g n ; hasClit = False ; isPol = False ; lock_NP = <>} ;
|
||||
regPN : Str -> PN ;
|
||||
mk2PN : Str -> Gender -> PN = \x,g -> {s = x ; g = g} ** {lock_PN = <>} ;
|
||||
|
||||
|
||||
@@ -172,7 +172,8 @@ lin
|
||||
Masc Pl P2 ;
|
||||
youPol_Pron =
|
||||
let vous = mkPronoun "vous" "vous" "vous" "vous" "votre" "votre" "vos" Masc Pl P2
|
||||
in {s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = AgPol Masc} ;
|
||||
in
|
||||
{s = vous.s ; hasClit = vous.hasClit ; poss = vous.poss ; a = vous.a ; isPol = True} ;
|
||||
|
||||
not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom ; a = PNoAg} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user