1
0
forked from GitHub/gf-core

romanian_mod

This commit is contained in:
ra.monique
2009-09-20 15:06:10 +00:00
parent eb139fd705
commit d7817e5317
12 changed files with 114 additions and 125 deletions

View File

@@ -24,7 +24,7 @@ concrete AdverbRon of Adverb =
s = subj.s ++ s.s ! Indic
} ;
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
AdnCAdv cadv = {s = cadv.s ++ cadv.sNum ++ conjThan} ;
-- doesn't yield to a correct form for more_CAdv
}

View File

@@ -1,7 +1,7 @@
--# -path=.:../Romance:../common:../abstract:../common:prelude
concrete CatRon of Cat =
CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
CommonX - [CAdv,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
** open Prelude, ResRon, MorphoRon,(R = ParamX) in {
flags optimize=all_subs ;
@@ -41,6 +41,10 @@ concrete CatRon of Cat =
AP = {s : AForm => Str ; isPre : Bool} ;
-- Adverb
CAdv = {s, sNum, p : Str };
-- Noun
CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy } ;

View File

@@ -12,7 +12,7 @@ concrete GrammarRon of Grammar =
RelativeRon,
ConjunctionRon,
PhraseRon,
TextX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond],
TextX - [CAdv,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond],
Prelude, MorphoRon, Coordination,
StructuralRon
** {

View File

@@ -1,6 +1,6 @@
concrete IdiomRon of Idiom =
-- CatRon ** open (P = ParamX), MorphoRon, ParadigmsRon,Prelude
CatRon ** open Prelude, ResRon
CatRon ** open Prelude, ResRon,BeschRon
in {
flags optimize=all_subs ;
@@ -10,10 +10,10 @@ in {
lin
ImpersCl vp = mkClause "" (agrP3 Masc Sg) vp ;
GenericCl vp = mkClause "" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
GenericCl vp = mkClause "cineva" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist !
ExistNP np =
mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) copula) ;
mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ;
-- v_besch20 "exista"
ExistIP ip = {

View File

@@ -209,7 +209,7 @@ rubber_N = mkNR "cauciuc";
wine_N = mkNR "vin" ;
win_V2 = dirV2 (v_besch17 "câºtiga") ;
woman_N = chV "femeie" (mkAnim (mkN "femeie")) ;
wonder_VQ = mkVQ (mkRVAcc (regV "minuna")) ;
wonder_VQ = mkVQ (mkRVAcc (v_besch29 "întreba")) ;
wood_N = mkN "lemn" ;
write_V2 = dirV2 (v_besch117 "scrie") ;
yellow_A = mkA "galben" ;

View File

@@ -2133,7 +2133,7 @@ in
verbAffixes sti (mkFromAffix root affixSgGr44 affixPlGr44)
(mkFromAffix root affixSgI2 affixPlI2) (mkFromAffix root affixSgPS7 affixPlPS7)
(mkFromAffix root affixSgPP7 affixPlPP7) (root +"ie") (mkAdjReg (root + "iut"))
(root + "iind") (variants{}) ;
(root + "iind") "ºtii" ;
--subGroup 5
mkV123 : Str -> Verbe = \sui ->
let root = init sui

View File

@@ -24,7 +24,7 @@ concrete NounRon of Noun =
hasClit = hr ;
hasRef = hr ;
isPronoun = False ;
indForm = det.s ! gg ! No ++ det.size ++cn.s ! n ! rs ! ANomAcc
indForm = det.s ! gg ! No ++ det.size ++cn.s ! n ! rs ! ANomAcc ++ det.post ! gg ! No
} ;
@@ -60,7 +60,7 @@ concrete NounRon of Noun =
clit = (np.s ! c).clit };
a = np.a ;
hasClit = np.hasClit ;
hasRef = False ;
hasRef = np.hasRef ;
isPronoun = False ;
indForm = pred.s ! aagr (np.a.g) (np.a.n) ! ANomAcc ++ (np.s ! pred.c).comp
} ;
@@ -77,42 +77,45 @@ concrete NounRon of Noun =
RelNP np rs = heavyNP {
s = \\c => (np.s ! c).comp ++ rs.s ! Indic ! np.a ;
a = np.a ;
hasClit = False ;
hasClit = np.hasClit ;
ss = (np.s ! No).comp ++ rs.s ! Indic ! np.a
} ;
AdvNP np adv = heavyNP {
s = \\c => (np.s ! c).comp ++ adv.s ;
a = np.a ;
hasClit = False;
hasClit = np.hasClit;
ss = (np.s ! No).comp ++adv.s ;
} ;
DetQuantOrd quant num ord = let n = num.n
in {
s = \\g,c => let s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No);
s2 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c) )
s2 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c) ++ s1)
in
s2 ++ s1 ++ num.s ! g ;
s2 ++ num.s ! g ;
sp = \\g,c => let
s1 = if_then_Str quant.isDef (ord.s ! n ! g ! c) (ord.s ! n ! g ! No) ;
s3 = if_then_Str quant.isPost (s1 ++ num.sp ! g ++ quant.sp ! n ! g ! ANomAcc) (quant.sp ! n ! g ! (convCase c) ++ s1 ++ num.sp ! g)
in
s3 ;
post = \\g,c => let s2 = if_then_Str quant.isPost (quant.s ! num.isNum ! n ! g ! (convCase c)) ""
post = \\g,c => let s1 = ord.s ! n ! g ! No;
s2 = if_then_Str quant.isPost (quant.s ! num.isNum ! n ! g ! (convCase c) ++ s1) ""
in
s2 ;
n = num.n ;
isDef = False;
isDef = quant.hasRef;
size = num.size;
hasRef = quant.hasRef
} ;
DetQuant quant num = let n = num.n ;
needDem = andB quant.isDef num.isNum
needDem = case num.n of
{ Sg => False ; -- for the moment, since no other construction would convey the proper meaning of "the one man"
_ => andB quant.isDef num.isNum}
in {
s = \\g,c => let s1 = if_then_Str quant.isPost "" (quant.s ! num.isNum ! n ! g ! (convCase c)) ;
s2 = if_then_Str needDem (artDem g n (convCase c)) ""
@@ -130,7 +133,7 @@ in {
hasRef = quant.hasRef
} ;
-- consider fixing for possesive pronouns !
DetNP det =
let
g = Masc ;
@@ -159,8 +162,9 @@ in {
NumPl = {s = \\_ => [] ; sp = \\_ => [] ; isNum = False ; n = Pl ; size = ""} ;
NumCard n = {s = n.s ; sp = n.sp ; size = getSize n.size ;
isNum = True; n = getNumber n.size
} ;
isNum = True;
n = getNumber n.size
} ;
NumDigits nu = {s,sp = \\g => nu.s ! NCard g ;
size = nu.n; n = getNumber nu.n };
@@ -210,6 +214,7 @@ in {
} ;
-- since mass noun phrases are not referential, it's no point keeping track of clitics
-- no matter if the noun is animate or not
MassNP cn = let
g = case cn.g of
@@ -221,10 +226,9 @@ in {
s = \\c => {comp = cn.s ! n ! Indef ! (convCase c);
clit = \\cs => [] } ;
a = agrP3 g n ;
hasClit = hc ;
hasClit = False ;
hasRef = False ;
isPronoun = False ;
poss = \\g,n => [] ;
indForm = cn.s ! n ! Indef ! ANomAcc
} ;
@@ -254,19 +258,10 @@ in {
g = cn.g
in {
s = case ap.isPre of
{True => \\n => table {Def => \\c => case c of
{Voc => ap.s ! (AF (agrGender g n) n Def ANomAcc) ++ cn.s ! n ! Indef ! ANomAcc;
_ => ap.s ! (AF (agrGender g n) n Def c) ++ cn.s ! n ! Indef ! c
};
Indef => \\c => case c of
{Voc => ap.s ! (AF (agrGender g n) n Indef ANomAcc) ++ cn.s ! n ! Indef ! ANomAcc;
_ => ap.s ! (AF (agrGender g n) n Indef c) ++ cn.s ! n ! Indef ! c}};
False => \\n => table {Def => \\c => case c of
{Voc => cn.s ! n ! Indef ! ANomAcc ++ ap.s ! (AF (agrGender g n) n Indef ANomAcc);
_ => cn.s ! n ! Def ! c ++ ap.s ! (AF (agrGender g n) n Indef c)};
Indef => \\c => case c of
{Voc => cn.s ! n ! Indef ! ANomAcc ++ ap.s ! (AF (agrGender g n) n Indef ANomAcc);
_ => cn.s ! n ! Indef ! c ++ ap.s ! (AF (agrGender g n) n Indef c) }}
{True => \\n => table {Def => \\c => ap.s ! (AF (agrGender g n) n Def c) ++ cn.s ! n ! Indef ! c;
Indef => \\c => ap.s ! (AF (agrGender g n) n Indef c) ++ cn.s ! n ! Indef ! c};
False => \\n => table {Def => \\c => cn.s ! n ! Def ! c ++ ap.s ! (AF (agrGender g n) n Indef c);
Indef => \\c => cn.s ! n ! Indef ! c ++ ap.s ! (AF (agrGender g n) n Indef c) }
};
g = g ;
a = cn.a

View File

@@ -200,23 +200,23 @@ ccompN : N -> Str -> N ;
ccompN x y = ccompose x y ** {lock_N = <>} ;
mkNI : Str -> Str -> NGender -> N;
mkNI s ss g = mkIn (mkNomIrreg s ss g) ** {lock_N = <>} ;
mkNI s ss g = mkInanimate (mkNomIrreg s ss g) ** {lock_N = <>};
regN : Str -> NGender -> N ;
regN s g = mkIn (mkNomReg s g) ** {lock_N = <>};
regN s g = mkInanimate (mkNomReg s g) ** {lock_N = <>};
mkVI : Str -> Str -> Str -> N;
mkVI s ss sss = mkIn (mkNomVIrreg s ss sss) ** {lock_N = <>} ;
mkVI s ss sss = mkInanimate (mkNomVIrreg s ss sss) ** {lock_N = <>};
mkIn : N -> N ;
mkIn n = mkInanimate n ** {lock_N = <> };
mkIn n = mkInanimate n ** {lock_N = <>};
mkAnim : N -> N ;
mkAnim n = mkAnimate n ** {lock_N = <> };
mkAnim n = mkAnimate n ** {lock_N = <>};
chV : Str -> N -> N ;
chV s n = mkVocc n s ** {lock_N = <> } ;
chV s n = mkVocc n s ** {lock_N = <>};
--smart paradigm for inferring the gender of the nouns
@@ -255,7 +255,7 @@ mkNN s ss = case s of
--we treat this case separately :
mkNR : Str -> N;
mkNR s = mkIn (mkNomNeut s) ** {lock_N = <>} ;
mkNR s = mkInanimate (mkNomNeut s) ** {lock_N = <>} ;
--------------------------------------------------------------------

View File

@@ -189,14 +189,13 @@ oper
in {
s = table {
VPFinite tm Simul => case tm of
{
VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
VPres Conjunct => vf "" (\a -> verb ! Subjo SPres a.n a.p) ;
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VPasse Conjunct => vf "" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
{VPres Indic => vf "" (\a -> verb ! Indi Presn a.n a.p) ;
VPres Conjunct => vf "" (\a -> verb ! Subjo SPres a.n a.p) ;
VImperff => vf "" (\a -> verb ! Indi Imparf a.n a.p) ;
VPasse Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VPasse Conjunct => vf "" (\a -> copula.s! Inf ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
VFut => vf "" (\a -> pFut ! a.n ! a.p ++ verb ! Inf) ;
VCondit => vf "" (\a -> pCond ! a.n ! a.p ++ verb ! Inf)
} ;
VPFinite tm Anter => case tm of
{VPres Indic => vf "" (\a -> pComp ! a.n ! a.p ++ verb ! PPasse Masc Sg Indef ANomAcc) ;
@@ -237,7 +236,21 @@ oper
} ;
-- various helper functions for VerbRon
useVerb : Verb -> VerbPhrase =\verb ->
{
s = verb.s ;
isRefl = verb.isRefl;
nrClit = verb.nrClit;
isFemSg = False ; pReflClit = verb.pReflClit ;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ; nrClit = verb.nrClit;
clDat = RNoAg ;
comp = \\a => [] ;
ext = \\p => [] ;
lock_V = <>
} ;
insertExtrapos : (Polarity => Str) -> VerbPhrase -> VerbPhrase = \co,vp -> {
s = vp.s ;
isFemSg = vp.isFemSg ;
@@ -273,7 +286,18 @@ oper
comp = \\a => obj ! a ++ vp.comp ! a ;
ext = vp.ext
};
insertAdv : Str -> VerbPhrase -> VerbPhrase = \co,vp -> {
s = vp.s ;
isRefl = vp.isRefl;
isFemSg = vp.isFemSg ; pReflClit = vp.pReflClit ;
clAcc = vp.clAcc ; nrClit = vp.nrClit ;
clDat = vp.clDat ;
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext
} ;
-----------------------------------------------------------------
---------------3 CATEGORY DEFINITIONS ---------------------------
-----------------------------------------------------------------
@@ -288,8 +312,8 @@ oper
NounPhrase : Type = {s : NCase => {comp : Str ; clit : Clitics => Str} ;
a : Agr ;
indForm : Str ; --needed for prepositions that demand the indefinite form of a NP
hasClit : Bool ; --
hasRef : Bool ; -- needed to indicate if the NP is referenced or not - for the use of clitics
hasClit : Bool ; -- needed to indicate if the NP has clitics or not (and is referenced also)
hasRef : Bool ; -- needed to indicate if the NP is referenced or not - for the use of the preposition for Accusative
isPronoun : Bool -- in the case of pronouns, just the clitics are used, and not the comp form
} ;
VerbPhrase :Type = {
@@ -484,9 +508,9 @@ oper
RCond => VCondit ;
RPres => VPres m
} ;
cmp = case <<t,a,m> : RTense * Anteriority * Mood> of {
<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ; --# notpresent
<RCond, _, _> => True; --# notpresent
cmp = case <t,a,m> of
{<RPast,Simul,Indic> | <RPres, Anter,Indic> => True ;
<RCond, _, _> => True;
_ => False
} ;
vp = useVP vpr ;
@@ -515,7 +539,7 @@ oper
indForm = np.ss ;
hasClit = np.hasClit ;
isPronoun = False;
hasRef = False
hasRef = np.hasClit
} ;
genForms : Str -> Str -> Gender => Str = \bon,bonne ->

View File

@@ -36,7 +36,7 @@
SlashVP np v2 =
{s = \\bb,ag=>
let
vp = v2 ;
vp = v2 ** {lock_VP = <>};
bcond = andB vp.needClit bb
in
case <bcond,v2.c2.isDir> of

View File

@@ -62,9 +62,9 @@ lin
mkPronoun
"" "el" "lui" "lui" [] "său" "sa" "săi" "sale" Masc Sg P3 ;
less_CAdv = X.mkCAdv "mai puţin" conjThan ;
less_CAdv = {s = "mai puţin" ; sNum = ""; p = conjThan ; lock_CAdv = <> } ;
many_Det = mkDet "mulţi" "multe" "multor" "multor" "mulţi" "multe" "multora" "multora" Pl;
more_CAdv = X.mkCAdv "mai" conjThan ;
more_CAdv = {s = "mai" ; sNum = "mult" ; p =conjThan ; lock_CAdv = <>};
most_Predet = {
s = \\a => table { AGenDat => "marii parţi a" ;
ANomAcc => "marea parte a";
@@ -294,7 +294,7 @@ whatPl_IP =
except_Prep = mkPrep "cu excepţia" Ge ;
as_CAdv = X.mkCAdv "la fel de" "ca" ;
as_CAdv = { s = "la fel de"; sNum = "mult"; p = "ca" ; lock_CAdv = <> };
}

View File

@@ -4,20 +4,9 @@ concrete VerbRon of Verb =
flags optimize=all_subs ;
lin
UseV = \verb ->
{
s = verb.s ;
isRefl = verb.isRefl;
nrClit = verb.nrClit;
isFemSg = False ; pReflClit = verb.pReflClit ;
neg = table {Pos => ""; Neg => "nu"} ;
clAcc = RNoAg ; nrClit = verb.nrClit;
clDat = RNoAg ;
comp = \\a => [] ;
ext = \\p => [] ;
} ;
UseV = useVerb ;
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (UseV v) ;
ComplVV v vp =insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++vp.comp ! a ++ vp.ext ! Pos) (useVerb v) ;
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
@@ -25,7 +14,7 @@ concrete VerbRon of Verb =
ComplVA v ap =
insertSimpObj (\\a => ap.s ! AF a.g a.n Indef ANomAcc) (UseV v) ;
insertSimpObj (\\a => ap.s ! AF a.g a.n Indef ANomAcc) (useVerb v) ;
SlashV2a verb = {s = verb.s ; isRefl = verb.isRefl; nrClit = verb.nrClit;
@@ -43,36 +32,36 @@ concrete VerbRon of Verb =
Slash2V3 v np = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
sir = if_then_Str np.isPronoun "" ss ;
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit
in
case v.c2.isDir of
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3};
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c3}
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3};
_ => (insertSimpObjPre (\\_ => ss) (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c3}
};
Slash3V3 v np = let s1 = v.c3.s ++ (np.s ! (v.c3.c)).comp ;
ss = if_then_Str np.hasRef (v.c3.prepDir ++ s1) s1 ;
sir = if_then_Str np.isPronoun "" ss ;
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit
in
case v.c3.isDir of
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
_ => (insertSimpObjPre (\\_ => ss) (UseV v)) ** {needAgr = False ; needClit = True ;c2 = v.c2}
{Dir PAcc => (insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
Dir PDat => (insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
_ => (insertSimpObjPre (\\_ => ss) (useVerb v)) ** {needAgr = False ; needClit = True ;c2 = v.c2}
};
-- needs fixing - agreement for the added verb must be made accordingly to what we add in ComplSlash !!!
-- fixed with extra parameter !
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (UseV v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
SlashV2V v vp = (insertSimpObj (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) (useVerb v)) ** {needAgr = True ; needClit = True ;c2 = v.c2} ;
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (UseV v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
SlashV2S v s = (insertExtrapos (\\b => conjThat ++ s.s ! Indic) (useVerb v)) ** {needAgr = False; needClit = True ;c2 = v.c2};
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (UseV v)) ** {needAgr = False ; needClit = False ;c2 = v.c2 } ;
SlashV2Q v q = (insertExtrapos (\\_ => q.s ! QIndir) (useVerb v)) ** {needAgr = False ; needClit = False ;c2 = v.c2 } ;
@@ -80,13 +69,13 @@ concrete VerbRon of Verb =
SlashV2A v ap =
(insertSimpObj (\\a => v.c3.s ++ ap.s ! (AF Masc Sg Indef (convCase v.c3.c)))
(UseV v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
(useVerb v)) ** {needAgr = False ; needClit = True ; c2 = v.c2} ;
ComplSlash vp np = let s1 = vp.c2.s ++(np.s ! (vp.c2.c)).comp ;
ss = if_then_Str np.hasRef (vp.c2.prepDir ++ s1) s1 ;
sir = if_then_Str np.isPronoun "" ss ;
vcDa = if_then_else VClit np.hasRef (nextClit vp.nrClit PDat) vp.nrClit;
vcAc = if_then_else VClit np.hasRef (nextClit vp.nrClit PAcc) vp.nrClit;
vcDa = if_then_else VClit np.hasClit (nextClit vp.nrClit PDat) vp.nrClit;
vcAc = if_then_else VClit np.hasClit (nextClit vp.nrClit PAcc) vp.nrClit;
vpp = case vp.c2.isDir of
{Dir PAcc => insertObje (\\_ => sir) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc vp ;
Dir PDat => insertObje (\\_ => sir) RNoAg (clitFromNoun np Da) False vcDa vp;
@@ -129,25 +118,26 @@ concrete VerbRon of Verb =
SlashVV v vp =
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((UseV v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
insertObjc (\\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp a ++ vp.comp ! a ++ vp.ext ! Pos) ((useVerb v) **{c2=vp.c2; needAgr= vp.needAgr ; needClit = False; lock_VPSlash = <>}) ;
SlashV2VNP v np vp = let s1 = v.c2.s ++(np.s ! (v.c2.c)).comp ;
ss = if_then_Str np.hasRef (v.c2.prepDir ++ s1) s1;
sir = if_then_Str np.isPronoun "" ss ;
vcDa = if_then_else VClit np.hasRef (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasRef (nextClit v.nrClit PAcc) v.nrClit ;
vcomp = (getConjComp vp np.a).s
vcDa = if_then_else VClit np.hasClit (nextClit v.nrClit PDat) v.nrClit;
vcAc = if_then_else VClit np.hasClit (nextClit v.nrClit PAcc) v.nrClit ;
vvp = vp ** {lock_VP = <>};
vcomp = (getConjComp vvp np.a).s
in
case v.c2.isDir of
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ;c2 = vp.c2} ;
{Dir PAcc => (insertObje (\\a => sir ++ vcomp ! a) (clitFromNoun np Ac) RNoAg (isAgrFSg np.a) vcAc (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ;c2 = vp.c2} ;
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2};
Dir PDat => (insertObje (\\a => sir ++ vcomp ! a) RNoAg (clitFromNoun np Da) False vcDa (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2};
_ => (insertSimpObjPre (\\a => ss ++ vcomp ! a) (UseV v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2}
_ => (insertSimpObjPre (\\a => ss ++ vcomp ! a) (useVerb v)) ** {needAgr = vp.needAgr ; needClit = False ; c2 = vp.c2}
};
UseComp comp = insertSimpObj comp.s (UseV copula) ;
UseComp comp = insertSimpObj comp.s copula ;
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n Indef ANomAcc} ;
CompNP np = {s = \\_ => (np.s ! No).comp} ;
@@ -157,26 +147,7 @@ concrete VerbRon of Verb =
AdvVP vp adv = insertAdv adv.s vp ;
AdVVP adv vp = insertAdv adv.s vp ;
PassV2 v = insertSimpObj (\\a => v.s ! PPasse a.g a.n Indef ANomAcc) (UseV auxPassive) ;
oper
insertAdv : Str -> VP -> VP = \co,vp -> {
s = vp.s ;
isRefl = vp.isRefl;
isFemSg = vp.isFemSg ; pReflClit = vp.pReflClit ;
clAcc = vp.clAcc ; nrClit = vp.nrClit ;
clDat = vp.clDat ;
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext ;
lock_VP = <>
} ;
PassV2 v = insertSimpObj (\\a => v.s ! PPasse a.g a.n Indef ANomAcc) auxPassive ** {lock_VP = <>};
@@ -193,9 +164,4 @@ insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
getConjComp : VP -> Agr -> {s: Agr => Str} = \vp,ag ->
{s = \\a => "sã" ++ (flattenSimpleClitics vp.nrClit vp.clAcc vp.clDat (vp.isRefl ! a)) ++ conjVP vp ag ++ vp.comp ! a ++ vp.ext ! Pos};
-- discuss example
-- l -table (ComplSlash (Slash3V3 sell_V3 (UsePN john_PN)) (UsePN paris_PN))
-- in English the direct object always comes first, which could lead to incorrect longer examples
-- while in French it always comes last
-- ?!?
};