mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Romancs reflexives and passives
This commit is contained in:
@@ -81,6 +81,29 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
||||
|
||||
partQIndir = elision "c" ;
|
||||
|
||||
reflPron : Number => Person => Case => Str =
|
||||
let
|
||||
cases : (x,y : Str) -> (Case => Str) = \me,moi -> table {
|
||||
Acc | CPrep P_a => me ;
|
||||
_ => moi
|
||||
} ;
|
||||
in
|
||||
\\n,p => case <n,p> of {
|
||||
<Sg,P1> => cases (elision "m") "moi" ;
|
||||
<Sg,P2> => cases (elision "t") "toi" ;
|
||||
<Pl,P1> => \\_ => "nous" ;
|
||||
<Pl,P2> => \\_ => "vous" ;
|
||||
_ => cases (elision "s") "soi"
|
||||
} ;
|
||||
|
||||
vRefl : VType = VRefl ;
|
||||
isVRefl : VType -> Bool = \ty -> case ty of {
|
||||
VRefl => True ;
|
||||
_ => False
|
||||
} ;
|
||||
|
||||
auxPassive : Verb = copula ;
|
||||
|
||||
copula : Verb = {s = table VF ["être";"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois";"soit";"soyons";"soyez";"soient";"étais";"étais";"était";"étions";"étiez";"étaient";"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";"fus";"fus";"fut";"fûmes";"fûtes";"furent";"serai";"seras";"sera";"serons";"serez";"seront";"serais";"serais";"serait";"serions";"seriez";"seraient";"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant"]; vtyp=VHabere} ;
|
||||
|
||||
avoir_V : Verb = {s=table VF ["avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait";"ayons";"ayez";"aient";"avais";"avais";"avait";"avions";"aviez";"avaient";"eusse";"eusses";"eût";"eussions";"eussiez";"eussent";"eus";"eus";"eut";"eûmes";"eûtes";"eurent";"aurai";"auras";"aura";"aurons";"aurez";"auront";"aurais";"aurais";"aurait";"aurions";"auriez";"auraient";"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant"];vtyp=VHabere};
|
||||
|
||||
@@ -18,13 +18,13 @@ incomplete concrete AdjectiveRomance of Adjective =
|
||||
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) ; ----
|
||||
|
||||
ReflA2 adj = {
|
||||
s = \\af =>
|
||||
adj.s ! Posit ! af ++ adj.c2.s ++ reflPron ! Sg ! P3 ! adj.c2.c ; --- agr
|
||||
isPre = False
|
||||
} ;
|
||||
-}
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\a => ap.s ! a ++ sc.s ; --- mood
|
||||
isPre = False
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
interface DiffRomance = open CommonRomance, Prelude in {
|
||||
|
||||
|
||||
--2 Constants whose definitions depend on language.
|
||||
|
||||
-- Prepositions that fuse with the article vary.
|
||||
@@ -19,8 +18,6 @@ oper
|
||||
|
||||
partitive : Gender -> Case -> Str ;
|
||||
|
||||
reflPron : Number -> Person -> Str ;
|
||||
|
||||
artDef : Gender -> Number -> Case -> Str ;
|
||||
artIndef : Gender -> Number -> Case -> Str ;
|
||||
|
||||
@@ -40,7 +37,15 @@ oper
|
||||
|
||||
partQIndir : Str ; -- ce, ciò
|
||||
|
||||
-- These needed above.
|
||||
reflPron : Number => Person => Case => Str ;
|
||||
|
||||
vRefl : VType ;
|
||||
isVRefl : VType -> Bool ;
|
||||
|
||||
auxPassive : Verb ;
|
||||
|
||||
|
||||
-- These are needed above.
|
||||
|
||||
param
|
||||
Case = Nom | Acc | CPrep Prep ;
|
||||
|
||||
@@ -51,7 +51,8 @@ oper
|
||||
vpart : AAgr -> Str = \a -> verb.s ! VPart a.g a.n ;
|
||||
vinf = verb.s ! VInfin ;
|
||||
|
||||
aux = auxVerb verb.vtyp ;
|
||||
typ = verb.vtyp ;
|
||||
aux = auxVerb typ ;
|
||||
|
||||
habet : TMood -> Agr -> Str = \tm,a -> aux ! VFin tm a.n a.p ;
|
||||
habere : Str = aux ! VInfin ;
|
||||
@@ -73,9 +74,12 @@ oper
|
||||
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) ;
|
||||
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a)
|
||||
} ;
|
||||
agr = partAgr verb.vtyp ;
|
||||
agr = partAgr typ ;
|
||||
neg = negation ;
|
||||
clit1 = \\a => [] ; ----
|
||||
clit1 = \\a => case isVRefl typ of {
|
||||
True => reflPron ! a.n ! a.p ! Acc ;
|
||||
_ => []
|
||||
} ;
|
||||
clit2 = [] ;
|
||||
comp = \\a => [] ;
|
||||
ext = \\p => []
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
incomplete concrete VerbRomance of Verb =
|
||||
CatRomance ** open CommonRomance, ResRomance in {
|
||||
CatRomance ** open Prelude, CommonRomance, ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -31,14 +31,13 @@ incomplete concrete VerbRomance of Verb =
|
||||
AdvVP vp adv = insertAdv adv.s vp ;
|
||||
AdVVP adv vp = insertAdv adv.s vp ;
|
||||
|
||||
{-
|
||||
ReflV2 v = insertObj (\\a => v.c2 ++ reflPron a) (predV v) ;
|
||||
ReflV2 v = case v.c2.isDir of {
|
||||
True => predV {s = v.s ; vtyp = vRefl} ;
|
||||
False => insertComplement
|
||||
(\\a => v.c2.s ++ reflPron ! a.n ! a.p ! v.c2.c) (predV v)
|
||||
} ;
|
||||
|
||||
PassV2 v =
|
||||
insertObj
|
||||
(\\a => v.s ! VI (VPtPret (agrAdj a.gn DIndef) Nom))
|
||||
(predV verbBecome) ;
|
||||
-}
|
||||
PassV2 v = insertComplement (\\a => v.s ! VPart a.g a.n) (predV auxPassive) ;
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = complAcc ; vtyp = vv.vtyp} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user