From d7817e53174d27c8f58f958cd055dd423c3a0c3c Mon Sep 17 00:00:00 2001 From: "ra.monique" Date: Sun, 20 Sep 2009 15:06:10 +0000 Subject: [PATCH] romanian_mod --- lib/src/romanian/AdverbRon.gf | 2 +- lib/src/romanian/CatRon.gf | 6 +- lib/src/romanian/GrammarRon.gf | 2 +- lib/src/romanian/IdiomRon.gf | 6 +- lib/src/romanian/LexiconRon.gf | 2 +- lib/src/romanian/MorphoRon.gf | 2 +- lib/src/romanian/NounRon.gf | 49 ++++++++-------- lib/src/romanian/ParadigmsRon.gf | 14 ++--- lib/src/romanian/ResRon.gf | 56 +++++++++++++------ lib/src/romanian/SentenceRon.gf | 2 +- lib/src/romanian/StructuralRon.gf | 6 +- lib/src/romanian/VerbRon.gf | 92 ++++++++++--------------------- 12 files changed, 114 insertions(+), 125 deletions(-) diff --git a/lib/src/romanian/AdverbRon.gf b/lib/src/romanian/AdverbRon.gf index bbcc0c2ae..a40746ed7 100644 --- a/lib/src/romanian/AdverbRon.gf +++ b/lib/src/romanian/AdverbRon.gf @@ -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 } diff --git a/lib/src/romanian/CatRon.gf b/lib/src/romanian/CatRon.gf index e5140e6ce..6acaaeaf1 100644 --- a/lib/src/romanian/CatRon.gf +++ b/lib/src/romanian/CatRon.gf @@ -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 } ; diff --git a/lib/src/romanian/GrammarRon.gf b/lib/src/romanian/GrammarRon.gf index 427dc167d..ae055e7ff 100644 --- a/lib/src/romanian/GrammarRon.gf +++ b/lib/src/romanian/GrammarRon.gf @@ -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 ** { diff --git a/lib/src/romanian/IdiomRon.gf b/lib/src/romanian/IdiomRon.gf index 8215dc69a..b647eaca3 100644 --- a/lib/src/romanian/IdiomRon.gf +++ b/lib/src/romanian/IdiomRon.gf @@ -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 = { diff --git a/lib/src/romanian/LexiconRon.gf b/lib/src/romanian/LexiconRon.gf index 6fd3b198e..963409a69 100644 --- a/lib/src/romanian/LexiconRon.gf +++ b/lib/src/romanian/LexiconRon.gf @@ -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" ; diff --git a/lib/src/romanian/MorphoRon.gf b/lib/src/romanian/MorphoRon.gf index d62468910..18eb6dbf9 100644 --- a/lib/src/romanian/MorphoRon.gf +++ b/lib/src/romanian/MorphoRon.gf @@ -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 diff --git a/lib/src/romanian/NounRon.gf b/lib/src/romanian/NounRon.gf index 9f14adaf6..b2dbfe77f 100644 --- a/lib/src/romanian/NounRon.gf +++ b/lib/src/romanian/NounRon.gf @@ -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 diff --git a/lib/src/romanian/ParadigmsRon.gf b/lib/src/romanian/ParadigmsRon.gf index 4102159e9..b601a8ab0 100644 --- a/lib/src/romanian/ParadigmsRon.gf +++ b/lib/src/romanian/ParadigmsRon.gf @@ -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 = <>} ; -------------------------------------------------------------------- diff --git a/lib/src/romanian/ResRon.gf b/lib/src/romanian/ResRon.gf index d9f783fcf..cb76b8343 100644 --- a/lib/src/romanian/ResRon.gf +++ b/lib/src/romanian/ResRon.gf @@ -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 "să" (\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 "să" (\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 "să" (\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 "să" (\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 < : RTense * Anteriority * Mood> of { - | => True ; --# notpresent - => True; --# notpresent + cmp = case of + { | => True ; + => 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 -> diff --git a/lib/src/romanian/SentenceRon.gf b/lib/src/romanian/SentenceRon.gf index c946d8df9..6d582aa87 100644 --- a/lib/src/romanian/SentenceRon.gf +++ b/lib/src/romanian/SentenceRon.gf @@ -36,7 +36,7 @@ SlashVP np v2 = {s = \\bb,ag=> let - vp = v2 ; + vp = v2 ** {lock_VP = <>}; bcond = andB vp.needClit bb in case of diff --git a/lib/src/romanian/StructuralRon.gf b/lib/src/romanian/StructuralRon.gf index 1ce18aeff..aceb99b22 100644 --- a/lib/src/romanian/StructuralRon.gf +++ b/lib/src/romanian/StructuralRon.gf @@ -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 = <> }; } diff --git a/lib/src/romanian/VerbRon.gf b/lib/src/romanian/VerbRon.gf index 71ee8efe6..7f676f7f1 100644 --- a/lib/src/romanian/VerbRon.gf +++ b/lib/src/romanian/VerbRon.gf @@ -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 --- ?!? };