mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 17:42:51 -06:00
French almost complete (reflexives, ordinals missing)
This commit is contained in:
@@ -12,25 +12,24 @@ incomplete concrete AdjectiveRomance of Adjective =
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++ np.s ! accusative ;
|
||||
ComplA2 adj np = {
|
||||
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
{-
|
||||
ReflA2 a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ++ a.c2 ++
|
||||
reflPron (agrP3 Utr Sg) ; ----
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
-}
|
||||
SentAP ap sc = {
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
s = \\a => ap.s ! a ++ sc.s ; --- mood
|
||||
isPre = False
|
||||
} ;
|
||||
-}
|
||||
|
||||
AdAP ada ap = {
|
||||
s = \\a => ada.s ++ ap.s ! a ;
|
||||
isPre = ap.isPre
|
||||
|
||||
@@ -73,9 +73,10 @@ incomplete concrete CatRomance of Cat =
|
||||
|
||||
-- Open lexical classes, e.g. Basic
|
||||
|
||||
V, VS, VQ, VA = Verb ;
|
||||
V, VQ, VA = Verb ;
|
||||
V2, VV, V2A = Verb ** {c2 : Compl} ;
|
||||
V3 = Verb ** {c2,c3 : Compl} ;
|
||||
VS = Verb ** {m : Polarity => Mood} ;
|
||||
|
||||
A = {s : Degree => AForm => Str ; isPre : Bool} ;
|
||||
A2 = {s : Degree => AForm => Str ; c2 : Compl} ;
|
||||
|
||||
@@ -35,7 +35,7 @@ resource CommonRomance = ParamRomance ** open Prelude in {
|
||||
clit1 : Agr => Str ; -- se
|
||||
clit2 : Str ; -- lui
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
||||
ext : Str ; -- que je dors
|
||||
ext : Polarity => Str ; -- que je dors / que je dorme
|
||||
} ;
|
||||
|
||||
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
|
||||
|
||||
@@ -38,6 +38,8 @@ oper
|
||||
relPron : Bool => AAgr => Case => Str ;
|
||||
pronSuch : AAgr => Str ;
|
||||
|
||||
partQIndir : Str ; -- ce, ciò
|
||||
|
||||
-- These needed above.
|
||||
|
||||
param
|
||||
|
||||
@@ -12,7 +12,7 @@ incomplete concrete PhraseRomance of Phrase =
|
||||
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! Ton Nom} ;
|
||||
---- UttVP vp = {s = infVP vp (agrP3 Utr Sg)} ;
|
||||
UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
|
||||
UttAdv adv = adv ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
|
||||
@@ -21,27 +21,24 @@ incomplete concrete QuestionRomance of Question =
|
||||
in
|
||||
cl.s ! t ! a ! b ! Indic
|
||||
} ;
|
||||
{-
|
||||
|
||||
QuestSlash ip slash = {
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
cls = slash.s ! t ! a ! p ;
|
||||
who = slash.c2 ++ ip.s ! accusative --- stranding in ExtRomance
|
||||
cls = slash.s ! t ! a ! p ! Indic ;
|
||||
who = slash.c2.s ++ ip.s ! slash.c2.c
|
||||
in table {
|
||||
QDir => who ++ cls ! Inv ;
|
||||
QIndir => who ++ cls ! Sub
|
||||
QDir => who ++ cls ;
|
||||
QIndir => partQIndir ++ who ++ cls
|
||||
}
|
||||
} ;
|
||||
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,a,p =>
|
||||
s = \\t,a,p,_ =>
|
||||
let
|
||||
cls = cl.s ! t ! a ! p ;
|
||||
cls = cl.s ! t ! a ! p ! Indic ;
|
||||
why = iadv.s
|
||||
in table {
|
||||
QDir => why ++ cls ! Inv ;
|
||||
QIndir => why ++ cls ! Sub
|
||||
}
|
||||
in why ++ cls
|
||||
} ;
|
||||
|
||||
PrepIP p ip = {
|
||||
@@ -50,13 +47,17 @@ incomplete concrete QuestionRomance of Question =
|
||||
|
||||
AdvIP ip adv = {
|
||||
s = \\c => ip.s ! c ++ adv.s ;
|
||||
gn = ip.gn
|
||||
a = ip.a
|
||||
} ;
|
||||
|
||||
IDetCN idet num ord cn = let g = cn.g in {
|
||||
s = \\c =>
|
||||
idet.s ! g ++ num.s ! g ++ ord.s ++ cn.s ! idet.n ! idet.det ! caseNP c ;
|
||||
gn = gennum g idet.n
|
||||
IDetCN idet num ord cn =
|
||||
let
|
||||
g = cn.g ;
|
||||
n = idet.n ;
|
||||
a = aagr g n
|
||||
in {
|
||||
s = \\c => idet.s ! g ! c ++ num.s ! g ++ ord.s ! a ++ cn.s ! n ;
|
||||
a = a
|
||||
} ;
|
||||
-}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,12 +20,11 @@ incomplete concrete RelativeRomance of Relative =
|
||||
in
|
||||
cl.s ! t ! ant ! b ! m
|
||||
} ;
|
||||
{-
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! ag.gn ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.c2
|
||||
s = \\t,a,p,m,ag =>
|
||||
slash.c2.s ++ rp.s ! False ! ag ! slash.c2.c ++ slash.s ! t ! a ! p ! m
|
||||
} ;
|
||||
-}
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\_,a,c => np.s ! Ton Nom ++ p.s ++ rp.s ! True ! a ! p.c ;
|
||||
@@ -36,7 +35,4 @@ incomplete concrete RelativeRomance of Relative =
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
-- RCl = {s : Tense => Anteriority => Polarity => Mood => Agr => Str} ;
|
||||
-- RP = {s : AAgr => RelForm => Str ; a : RAgr} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ oper
|
||||
clit1 = \\a => [] ; ----
|
||||
clit2 = [] ;
|
||||
comp = \\a => [] ;
|
||||
ext = [] ;
|
||||
ext = \\p => []
|
||||
} ;
|
||||
|
||||
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
|
||||
@@ -121,6 +121,15 @@ oper
|
||||
comp = \\a => vp.comp ! a ++ co ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = vp.comp ;
|
||||
ext = \\p => vp.ext ! p ++ co ! p ;
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP ->
|
||||
{s : Tense => Anteriority => Polarity => Mood => Str} =
|
||||
@@ -138,7 +147,7 @@ oper
|
||||
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
|
||||
neg = vp.neg ! b ;
|
||||
clit = vp.clit1 ! agr ++ vp.clit2 ;
|
||||
compl = vp.comp ! agr ++ vp.ext
|
||||
compl = vp.comp ! agr ++ vp.ext ! b
|
||||
in
|
||||
subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ++ compl
|
||||
} ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
incomplete concrete SentenceRomance of Sentence =
|
||||
CatRomance ** open CommonRomance, ResRomance in {
|
||||
CatRomance ** open Prelude, CommonRomance, ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PredVP np vp = mkClause (np.s ! Aton Nom) np.a vp ;
|
||||
|
||||
-- PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
|
||||
PredSCVP sc vp = mkClause sc.s (agrP3 Masc Sg) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,aag =>
|
||||
@@ -14,30 +14,30 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
agr = aag ** {p = P2} ;
|
||||
verb = (vp.s ! VPImperat).fin ! agr
|
||||
in
|
||||
verb ++ vp.comp ! agr ++ vp.ext --- neg,clit
|
||||
} ;
|
||||
{-
|
||||
verb ++ vp.comp ! agr ++ vp.ext ! pol ---- neg,clit
|
||||
} ;
|
||||
|
||||
SlashV2 np v2 =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
(np.s ! Aton Nom) np.a
|
||||
(predV v2) **
|
||||
{c2 = v2.c2} ;
|
||||
|
||||
SlashVVV2 np vv v2 =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
(insertObj (\\_ => vv.c2 ++ infVP (predV v2) np.a) (predV vv)) **
|
||||
(np.s ! Aton Nom) np.a
|
||||
(insertComplement (\\a => prepCase vv.c2.c ++ v2.s ! VInfin) (predV v2)) **
|
||||
{c2 = v2.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||
s = \\t,a,b,m => slash.s ! t ! a ! b ! m ++ adv.s ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
SlashPrep cl prep = cl ** {c2 = {s = prep.s ; c = prep.c ; isDir = False}} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedS s = {s = conjThat ++ s.s ! Indic} ; --- mood
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP vp (agrP3 utrum Sg)} ; --- agr
|
||||
-}
|
||||
EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ incomplete concrete TensedRomance of Tensed = CatRomance, TenseX **
|
||||
lin
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
-- UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||
UseRCl t a p cl =
|
||||
{s = \\r,ag => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ! ag} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,17 +12,15 @@ incomplete concrete VerbRomance of Verb =
|
||||
|
||||
ComplVV v vp = insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ;
|
||||
|
||||
{-
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
||||
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
|
||||
|
||||
ComplVA v ap =
|
||||
insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||
ComplVA v ap =
|
||||
insertComplement (\\a => ap.s ! AF a.g a.n) (predV v) ;
|
||||
ComplV2A v np ap =
|
||||
insertAdv
|
||||
(ap.s ! agrAdj np.a.gn DIndef)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||
-}
|
||||
insertComplement
|
||||
(\\a => ap.s ! AF np.a.g np.a.n)
|
||||
(insertObject v.c2 np (predV v)) ;
|
||||
|
||||
UseComp comp = insertComplement comp.s (predV copula) ;
|
||||
|
||||
@@ -40,8 +38,8 @@ incomplete concrete VerbRomance of Verb =
|
||||
insertObj
|
||||
(\\a => v.s ! VI (VPtPret (agrAdj a.gn DIndef) Nom))
|
||||
(predV verbBecome) ;
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; vtype = vv.vtype} ;
|
||||
-}
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = complAcc ; vtyp = vv.vtyp} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user