mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
more french
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
incomplete concrete AdjectiveRomance of Adjective =
|
||||
CatRomance ** open DiffRomance, ResRomance, Prelude in {
|
||||
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
PositA a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ;
|
||||
isPre = True
|
||||
s = a.s ! Posit ;
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
ComparA a np = {
|
||||
s = \\_ => a.s ! AF ACompar Nom ++ conjThan ++ np.s ! nominative ;
|
||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Ton Nom ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
@@ -29,12 +30,12 @@ incomplete concrete AdjectiveRomance of Adjective =
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
-}
|
||||
AdAP ada ap = {
|
||||
s = \\a => ada.s ++ ap.s ! a ;
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
|
||||
UseA2 a = a ;
|
||||
UseA2 a = a ** {isPre = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
incomplete concrete AdverbRomance of Adverb = CatRomance ** open DiffRomance, ResRomance, Prelude in {
|
||||
incomplete concrete AdverbRomance of Adverb =
|
||||
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||
|
||||
lin
|
||||
PositAdvAdj a = {
|
||||
s = a.s ! adverbForm
|
||||
s = a.s ! Posit ! AA
|
||||
} ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ np.s ! nominative
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ np.s ! Ton Nom
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ s.s ! Sub
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ s.s ! Conjunct --- ne
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! accusative} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! Ton Acc} ;
|
||||
|
||||
AdAdv = cc2 ;
|
||||
|
||||
SubjS subj s = {
|
||||
s = subj.s ++ s.s ! Sub
|
||||
s = subj.s ++ s.s ! subj.m
|
||||
} ;
|
||||
AdvSC s = s ;
|
||||
|
||||
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
||||
|
||||
oper
|
||||
adverbForm : AForm = AF (APosit (Strong SgNeutr)) Nom ;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ resource CommonRomance = ParamRomance ** open Prelude in {
|
||||
neg : Polarity => (Str * Str) ; -- ne-pas
|
||||
clit1 : Agr => Str ; -- se
|
||||
clit2 : Str ; -- lui
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère
|
||||
adv : Str ; -- hier
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
||||
ext : Str ; -- que je dors
|
||||
} ;
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ oper
|
||||
|
||||
partAgr : VType -> VPAgr ;
|
||||
|
||||
conjThan : Str ;
|
||||
|
||||
-- These needed above.
|
||||
|
||||
param
|
||||
|
||||
@@ -25,7 +25,7 @@ param
|
||||
|
||||
Mood = Indic | Conjunct ;
|
||||
|
||||
-- There are different types of clicic pronouns (as for position).
|
||||
-- There are different types of clitic pronouns (as for position).
|
||||
-- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".
|
||||
|
||||
ClitType = Clit0 | Clit1 | Clit2 | Clit3 ;
|
||||
|
||||
@@ -80,27 +80,50 @@ oper
|
||||
clit1 = \\a => [] ; ----
|
||||
clit2 = [] ;
|
||||
comp = \\a => [] ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
|
||||
let
|
||||
cc : Str * Str * VPAgr = case <c.isDir, np.c> of {
|
||||
<False,_> | <_,Clit0> => <[], c.s ++ np.s ! Ton c.c, vp.agr> ;
|
||||
_ => <np.s ! Aton c.c, [], VPAgrClit np.a>
|
||||
}
|
||||
cc : Str * Str * VPAgr = case <c.isDir, c.c, np.c> of {
|
||||
<False,_,_> |
|
||||
<_,_,Clit0> => <[], c.s ++ np.s ! Ton c.c, vp.agr> ;
|
||||
<_,Acc,_> => <np.s ! Aton c.c, [], VPAgrClit (aagr np.a.g np.a.n)> ; --- subty
|
||||
_ => <np.s ! Aton c.c, [], vp.agr>
|
||||
} ;
|
||||
high = case np.c of { -- whether the new clitic comes closer to verb
|
||||
Clit0 | Clit1 => False ; ---- approximation; should look at the old clit too
|
||||
_ => True
|
||||
} ;
|
||||
in {
|
||||
s = vp.s ;
|
||||
agr = cc.p3 ;
|
||||
clit1 = vp.clit1 ; ---- works for one clit now
|
||||
clit2 = cc.p1 ;
|
||||
clit1 = vp.clit1 ; ---- just a reflexive
|
||||
clit2 = preOrPost high vp.clit2 cc.p1 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ cc.p2 ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
insertComplement : (Agr => Str) -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ co ! a ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
insertAdv : Str -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ co ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP ->
|
||||
{s : Tense => Anteriority => Polarity => Mood => Str} =
|
||||
\subj,agr,vp -> {
|
||||
@@ -117,7 +140,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.adv ++ vp.ext
|
||||
compl = vp.comp ! agr ++ vp.ext
|
||||
in
|
||||
subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ++ compl
|
||||
} ;
|
||||
@@ -125,3 +148,13 @@ oper
|
||||
|
||||
}
|
||||
|
||||
-- insertObject:
|
||||
-- p -cat=Cl -tr "la femme te l' envoie"
|
||||
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
|
||||
-- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron))
|
||||
-- la femme te l' a envoyé
|
||||
--
|
||||
-- p -cat=Cl -tr "la femme te lui envoie"
|
||||
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
|
||||
-- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron))
|
||||
-- la femme te lui a envoyée
|
||||
|
||||
@@ -4,7 +4,7 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PredVP np vp = mkClause (np.s ! Ton Nom) np.a vp ;
|
||||
PredVP np vp = mkClause (np.s ! Aton Nom) np.a vp ;
|
||||
{-
|
||||
PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRomance in {
|
||||
incomplete concrete VerbRomance of Verb =
|
||||
CatRomance ** open CommonRomance, ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -7,12 +8,9 @@ incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRom
|
||||
|
||||
ComplV2 v np = insertObject v.c2 np (predV v) ;
|
||||
|
||||
{-
|
||||
ComplV3 v np np2 =
|
||||
insertObj
|
||||
(\\_ => v.c2 ++ np.s ! accusative ++ v.c3 ++ np2.s ! accusative)
|
||||
(predV v) ;
|
||||
ComplV3 v np np2 = insertObject v.c3 np2 (insertObject v.c2 np (predV v)) ;
|
||||
|
||||
{-
|
||||
ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
@@ -23,17 +21,18 @@ incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRom
|
||||
insertAdv
|
||||
(ap.s ! agrAdj np.a.gn DIndef)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||
-}
|
||||
|
||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||
UseComp comp = insertComplement comp.s (predV copula) ;
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! accusative} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n} ;
|
||||
CompNP np = {s = \\_ => np.s ! Ton Acc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
AdvVP vp adv = insertAdv adv.s vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
AdVVP adv vp = insertAdv adv.s vp ;
|
||||
|
||||
{-
|
||||
ReflV2 v = insertObj (\\a => v.c2 ++ reflPron a) (predV v) ;
|
||||
|
||||
PassV2 v =
|
||||
|
||||
Reference in New Issue
Block a user