diff --git a/contrib/summerschool/foods/FoodsRon.gf b/contrib/summerschool/foods/FoodsRon.gf index bc7e51c40..d7d917ffc 100644 --- a/contrib/summerschool/foods/FoodsRon.gf +++ b/contrib/summerschool/foods/FoodsRon.gf @@ -15,9 +15,9 @@ Item = {s : Str ; n : Number; g : Gender}; lin -This = det Sg (mkTab "acest" "aceastã"); +This = det Sg (mkTab "acest" "această"); That = det Sg (mkTab "acel" "acea"); -These = det Pl (mkTab "aceºti" "aceste"); +These = det Pl (mkTab "aceÈ™ti" "aceste"); Those = det Pl (mkTab "acei" "acele"); Wine = mkNoun "vin" "vinuri" NNeut ; diff --git a/examples/phrasebook/SentencesRon.gf b/examples/phrasebook/SentencesRon.gf index 7043d7982..f7c404f60 100644 --- a/examples/phrasebook/SentencesRon.gf +++ b/examples/phrasebook/SentencesRon.gf @@ -1,4 +1,27 @@ -concrete SentencesRon of Sentences = NumeralRon ** SentencesI with - (Syntax = SyntaxRon), - (Symbolic = SymbolicRon), - (Lexicon = LexiconRon) ; + +concrete SentencesRon of Sentences = NumeralRon ** SentencesI - [ + IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale + ] + with + (Syntax = SyntaxRon), + (Symbolic = SymbolicRon), + (Lexicon = LexiconRon) ** + open SyntaxRon, ExtraRon in { + + lin + IFemale = + {name = mkNP i8fem_Pron ; isPron = True ; poss = mkQuant i_Pron} ; + YouFamFemale = + {name = mkNP youSg8fem_Pron ; isPron = True ; poss = mkQuant youSg_Pron} ; + YouPolFemale = + {name = mkNP youPol8fem_Pron ; isPron = True ; poss = mkQuant youPol_Pron}; + IMale = + {name = mkNP i_Pron ; isPron = True ; poss = mkQuant i_Pron} ; + YouFamMale = + {name = mkNP youSg_Pron ; isPron = True ; poss = mkQuant youSg_Pron} ; + YouPolMale = + {name = mkNP youPol_Pron ; isPron = True ; poss = mkQuant youPol_Pron} ; + +} + + diff --git a/examples/phrasebook/WordsRon.gf b/examples/phrasebook/WordsRon.gf index 7bd0ec252..b20c5df1c 100644 --- a/examples/phrasebook/WordsRon.gf +++ b/examples/phrasebook/WordsRon.gf @@ -1,7 +1,7 @@ -- (c) 2009 Ramona Enache under LGPL concrete WordsRon of Words = SentencesRon ** open - SyntaxRon, + SyntaxRon, ResRon, (P = ParadigmsRon), (L = LexiconRon), BeschRon, @@ -89,7 +89,7 @@ concrete WordsRon of Words = SentencesRon ** open AHasTable p num = mkCl p.name have_V2 (mkNP (mkNP a_Det (P.mkN "masa" "mese")) (SyntaxRon.mkAdv for_Prep (mkNP num (P.mkN "persoană")))) ; AHasName p name = mkCl p.name (P.dirV2 (mkRVAcc (v_besch119 "numi"))) name ; - AHungry p = DatSubjCl p.name (mkVP (mkCN (P.mkN "foame"))) ; + AHungry p = DatSubjCl p.name (mkVP (mkNP (P.mkN "foame"))) ; AIll p = mkCl p.name (P.mkA "bolnav") ; AKnow p = mkCl p.name (v_besch122 "ÅŸti") ; ALike p item = mkCl p.name (P.dirV2 (v_besch71 "plăcea")) item ; @@ -100,7 +100,7 @@ concrete WordsRon of Words = SentencesRon ** open AReady p = mkCl p.name (P.mkA "gata" "gata" "gata" "gata") ; AScared p = mkCl p.name (P.mkA "speriat") ; ASpeak p lang = mkCl p.name (P.dirV2 (P.mkV "vorbi")) lang ; - AThirsty p = DatSubjCl p.name (mkVP (mkCN (P.mkN "sete"))) ; + AThirsty p = DatSubjCl p.name (mkVP (mkNP (P.mkN "sete"))) ; ATired p = mkCl p.name (P.mkA "obosit") ; AUnderstand p = mkCl p.name (v_besch83 "înÅ£elege") ; AWant p obj = mkCl p.name (P.dirV2 (v_besch74 "vrea")) obj ; @@ -138,7 +138,7 @@ concrete WordsRon of Words = SentencesRon ** open Son = xOf sing (P.mkN "fiu") ; Daughter = xOf sing (P.mkN "fiică") ; Children = xOf plur L.child_N ; - + -- week days Monday = mkDay "luni" ; @@ -166,9 +166,6 @@ open_A : A = P.mkA "deschis" ; ad = {s = d} in mkNPDay day ad ad; ---- difference is enforced by additional constructions - -- mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,i -> - -- mkCNPlace (mkCN p) i P.dative ; - xOf : GNumber -> N -> NPPerson -> NPPerson = \n,x,p -> mkRelative n (mkCN x) p ; diff --git a/lib/src/romanian/CatRon.gf b/lib/src/romanian/CatRon.gf index e16a1370f..d1d6aedbe 100644 --- a/lib/src/romanian/CatRon.gf +++ b/lib/src/romanian/CatRon.gf @@ -52,6 +52,7 @@ concrete CatRon of Cat = Pron = {s : NCase => Str ; c1, c2 : Clitics => Str ; a : Agr ; + isPol : Bool ; poss : Number => Gender => Str } ; NP = NounPhrase ; diff --git a/lib/src/romanian/ExtraRon.gf b/lib/src/romanian/ExtraRon.gf index 3f61556df..ad9bacd16 100644 --- a/lib/src/romanian/ExtraRon.gf +++ b/lib/src/romanian/ExtraRon.gf @@ -1,30 +1,37 @@ ---# -path=.:../romance:../common:../abstract:../../prelude -concrete ExtraRon of ExtraRonAbs = CatRon ** - open ResRon, ParadigmsRon, Prelude, MorphoRon in { - - lin - at_Prep = mkPrep "la" Ac; - DatSubjCl np vp = mkClause (np.s ! Da).comp (agrP3 Masc Sg) (insertClit vp np); - - - - oper -insertClit : VerbPhrase -> NounPhrase -> VerbPhrase = \vp, np -> - let - vcDa = case np.nForm of - {HasClit => nextClit vp.nrClit PDat ; - _ => vp.nrClit - }; - vpp = insertObje (\\_ => "") RNoAg (clitFromNoun np Da) False vcDa vp; - in - {isRefl = vpp.isRefl; - s = vpp.s ; isFemSg = vpp.isFemSg ; pReflClit = vp.pReflClit ; - nrClit = vpp.nrClit; clAcc = vpp.clAcc ; - clDat = vpp.clDat ; neg = vpp.neg ; - comp = \\a => vpp.comp ! (np.a); - ext = vpp.ext ; - lock_VP = <> }; - - - -} +--# -path=.:../romance:../common:../abstract:../../prelude +concrete ExtraRon of ExtraRonAbs = CatRon ** + open ResRon, ParadigmsRon, Prelude, MorphoRon in { + + lin + at_Prep = mkPrep "la" Ac True; + DatSubjCl np vp = let ss = if_then_Str np.isPronoun "" (np.s ! Da).comp + in mkClause ss np.isPol (agrP3 Masc Sg) (insertClit vp np); +i8fem_Pron = mkPronoun "eu" "mine" "mie" [] [] "meu" "mea" "mei" "mele" Fem Sg P1 ; +youSg8fem_Pron = mkPronoun "tu" "tine" "Å£ie" [] "tu" "tău" "ta" "tăi" "tale" Fem Sg P2 ; +youPl8fem_Pron = mkPronoun "voi" "voi" "vouă" [] "voi" "vostru" "voastră" "voÅŸtri" "voastre" Fem Pl P2 ; +youPol8fem_Pron = let dvs = mkPronoun "dumneavoastră" "dumneavoastră" "dumneavoastră" [] "dumneavoastră" "dumneavoastră" "dumneavoastră" "dumneavoastră" "dumneavoastră" Fem Pl P2 + in + {s = dvs.s; c1 = dvs.c1; + c2 = dvs.c2; a = dvs.a; isPol = True; poss = dvs.poss} ; + + + oper +insertClit : VerbPhrase -> NounPhrase -> VerbPhrase = \vp, np -> + let + vcDa = case np.nForm of + {HasClit => nextClit vp.nrClit PDat ; + _ => vp.nrClit + }; + vpp = insertObje (\\_ => "") RNoAg (clitFromNoun np Da) False vcDa vp; + in + {isRefl = vpp.isRefl; + s = vpp.s ; isFemSg = vpp.isFemSg ; pReflClit = vp.pReflClit ; + nrClit = vpp.nrClit; clAcc = vpp.clAcc ; + clDat = vpp.clDat ; neg = vpp.neg ; + comp = \\a => vpp.comp ! (np.a); + ext = vpp.ext ; + lock_VP = <> }; + + + +} diff --git a/lib/src/romanian/ExtraRonAbs.gf b/lib/src/romanian/ExtraRonAbs.gf index 2115a820a..78cad03ce 100644 --- a/lib/src/romanian/ExtraRonAbs.gf +++ b/lib/src/romanian/ExtraRonAbs.gf @@ -4,5 +4,14 @@ abstract ExtraRonAbs = Cat **{ fun DatSubjCl : NP -> VP -> Cl ; - at_Prep : Prep ; + at_Prep : Prep ; + + i8fem_Pron : Pron ; + youSg8fem_Pron : Pron ; + youPl8fem_Pron : Pron ; + youPol8fem_Pron : Pron ; + + + + } diff --git a/lib/src/romanian/IdiomRon.gf b/lib/src/romanian/IdiomRon.gf index b647eaca3..8a79d0824 100644 --- a/lib/src/romanian/IdiomRon.gf +++ b/lib/src/romanian/IdiomRon.gf @@ -8,27 +8,27 @@ in { lin - ImpersCl vp = mkClause "" (agrP3 Masc Sg) vp ; + ImpersCl vp = mkClause "" False (agrP3 Masc Sg) vp ; - GenericCl vp = mkClause "cineva" (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist ! + GenericCl vp = mkClause "cineva" False (agrP3 Masc Sg) vp ; -- an exact correspondent does not exist ! ExistNP np = - mkClause "" np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ; + mkClause "" False np.a (insertSimpObj (\\ag => (np.s ! No ).comp) (useVerb (v_besch20 "existã"))) ; -- v_besch20 "exista" ExistIP ip = { s = \\t,a,p,_ => ip.s ! No ++ - (mkClause "" (agrP3 (ip.a.g) (ip.a.n)) + (mkClause "" False (agrP3 (ip.a.g) (ip.a.n)) copula).s ! DDir ! t ! a ! p ! Indic } ; - CleftNP np rs = mkClause "" np.a + CleftNP np rs = mkClause "" False np.a (insertSimpObj (\\_ => rs.s ! Indic ! np.a) (insertSimpObj (\\_ => (np.s ! rs.c).comp) copula)) ; --need adverb for - CleftAdv ad s = mkClause "" (agrP3 Masc Sg) + CleftAdv ad s = mkClause "" False (agrP3 Masc Sg) (insertSimpObj (\\_ => conjThat ++ s.s ! Indic) (insertSimpObj (\\_ => ad.s) copula)) ; diff --git a/lib/src/romanian/NounRon.gf b/lib/src/romanian/NounRon.gf index 5badd204a..9e75029f7 100644 --- a/lib/src/romanian/NounRon.gf +++ b/lib/src/romanian/NounRon.gf @@ -23,6 +23,7 @@ concrete NounRon of Noun = }; a = ag ; nForm = nf; + isPol = False; isPronoun = False; indForm = det.s ! gg ! No ++ det.size ++cn.s ! n ! rs ! ANomAcc ++ det.post ! gg ! No @@ -39,7 +40,7 @@ concrete NounRon of Noun = a = ag; nForm = if_then_else NForm hc HasClit (HasRef False) ; - isPronoun = False ; + isPronoun = False ; isPol = False; indForm = pn.s ! No } ; @@ -47,6 +48,7 @@ concrete NounRon of Noun = clit = (genCliticsCase p.a c).s } ; nForm = HasClit; isPronoun = True ; + isPol = p.isPol ; a = p.a; indForm = p.s ! Ac }; @@ -58,7 +60,7 @@ concrete NounRon of Noun = clit = (np.s ! c).clit }; a = np.a ; nForm = np.nForm ; - isPronoun = False ; + isPronoun = False ; isPol = False; indForm = pred.s ! aagr (np.a.g) (np.a.n) ! ANomAcc ++ (np.s ! pred.c).comp } ; @@ -224,6 +226,7 @@ in { clit = \\cs => [] } ; a = agrP3 g n ; nForm = HasRef False ; + isPol = False; isPronoun = False ; indForm = cn.s ! n ! Indef ! ANomAcc } ; diff --git a/lib/src/romanian/ParadigmsRon.gf b/lib/src/romanian/ParadigmsRon.gf index d570cac12..388b10452 100644 --- a/lib/src/romanian/ParadigmsRon.gf +++ b/lib/src/romanian/ParadigmsRon.gf @@ -466,7 +466,7 @@ mkNPspec : Str -> Str -> Str -> Number -> Gender -> NP = a = ag ; indForm = cineva ; nForm = HasClit ; -isPronoun = False ; +isPronoun = False ; isPol = False; lock_NP = <> } ; @@ -481,7 +481,7 @@ mkNPs : Str -> Str -> Number -> Gender -> Bool -> NP = }; a = ag ; indForm = cineva ; - isPronoun = False ; + isPronoun = False ; isPol = False; nForm = HasRef b ; lock_NP = <> }; @@ -500,7 +500,7 @@ mkNPa : Str -> Str -> Str -> Number -> Gender -> Bool -> NP = }; a = ag; nForm = HasRef b; - isPronoun = False ; + isPronoun = False; isPol = False; indForm = om ; lock_NP = <> }; @@ -517,6 +517,7 @@ mkPronoun :(_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Number -> Person -> Pron =\eu, poss = table {Sg => table {Masc => meuP ; Fem => mea}; Pl => table {Masc => mei ; Fem => mele} }; + isPol = False; lock_Pron = <>}; diff --git a/lib/src/romanian/QuestionRon.gf b/lib/src/romanian/QuestionRon.gf index 3d848f0bd..aae1bac23 100644 --- a/lib/src/romanian/QuestionRon.gf +++ b/lib/src/romanian/QuestionRon.gf @@ -18,7 +18,7 @@ concrete QuestionRon of Question = QuestVP qp vp = { s = \\t,a,b,_ => let - cl = mkClause (qp.s ! No) (agrP3 qp.a.g qp.a.n) vp + cl = mkClause (qp.s ! No) False (agrP3 qp.a.g qp.a.n) vp in cl.s ! DDir ! t ! a ! b ! Indic } ; @@ -52,7 +52,7 @@ concrete QuestionRon of Question = s = \\t,a,p,_ => let vp = predV copula ; - cls = (mkClause (np.s ! No).comp np.a vp).s ! + cls = (mkClause (np.s ! No).comp np.isPol np.a vp).s ! DInv ! t ! a ! p ! Indic ; why = icomp.s ! {g = np.a.g ; n = np.a.n} in why ++ cls diff --git a/lib/src/romanian/RelativeRon.gf b/lib/src/romanian/RelativeRon.gf index 9cf9283fb..9386e77db 100644 --- a/lib/src/romanian/RelativeRon.gf +++ b/lib/src/romanian/RelativeRon.gf @@ -16,11 +16,13 @@ concrete RelativeRon of Relative = True => {s = \\ag => (mkClause (rp.s ! {g = ag.g ; n = ag.n} ! No) + False {g = rp.a.g ; n = rp.a.n ; p = P3} vp).s ! DDir ; c = No} ; False => {s = \\ag => (mkClause (rp.s ! {g = ag.g ; n = ag.n} ! No) + False ag vp).s ! DDir ; c = No } diff --git a/lib/src/romanian/ResRon.gf b/lib/src/romanian/ResRon.gf index 8bc9131f3..0057a078f 100644 --- a/lib/src/romanian/ResRon.gf +++ b/lib/src/romanian/ResRon.gf @@ -329,8 +329,9 @@ oper a : Agr ; indForm : Str ; --needed for prepositions that demand the indefinite form of a NP nForm : NForm ; -- indicates the presence of clitic doubling and referential form - isPronoun : Bool -- in the case of pronouns, just the clitics are used, and not the comp form - } ; + isPronoun : Bool ; -- in the case of pronouns, just the clitics are used, and not the comp form + isPol : Bool -- needed for the agreement of the polite pronoun, singular form + } ; VerbPhrase :Type = { s : VForm => Str ; isRefl : Agr => RAgr ; -- the clitics for reflexive verbs @@ -512,9 +513,9 @@ oper -- clause building function : - mkClause : Str -> Agr -> VerbPhrase -> + mkClause : Str -> Bool -> Agr -> VerbPhrase -> {s : Direct => RTense => Anteriority => Polarity => Mood => Str} = - \subj,agr,vpr -> { + \subj,isPol,agr,vpr -> { s = \\d,t,a,b,m => let tm = case t of { @@ -533,9 +534,12 @@ oper sa = (vp.s ! VPFinite tm a ).sa ; verb = vps ! agr ; neg = vp.neg ! b ; - clpr = flattenClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agr) (andB vpr.isFemSg cmp) cmp vpr.pReflClit; - compl = vp.comp ! agr ++ vp.ext ! b - in + clpr = flattenClitics vpr.nrClit vpr.clAcc vpr.clDat (vpr.isRefl ! agr) (andB vpr.isFemSg cmp) cmp vpr.pReflClit; + compl = case isPol of { + True => vp.comp ! {g = agr.g ; n = Sg ; p = agr.p} ; + _ => vp.comp ! agr + } ++ vp.ext ! b +in case d of { DDir => subj ++ sa ++ neg ++ clpr.s1 ++ verb ++ clpr.s2; @@ -554,8 +558,8 @@ oper _ => [] }}; a = np.a ; indForm = np.ss ; - nForm = np.hasClit; - isPronoun = False + nForm = np.hasClit ; + isPronoun = False ;isPol = False } ; genForms : Str -> Str -> Gender => Str = \bon,bonne -> diff --git a/lib/src/romanian/SentenceRon.gf b/lib/src/romanian/SentenceRon.gf index 6d582aa87..45f1cb9b3 100644 --- a/lib/src/romanian/SentenceRon.gf +++ b/lib/src/romanian/SentenceRon.gf @@ -4,9 +4,9 @@ flags optimize=all_subs ; lin - PredVP np vp = mkClause (np.s ! No).comp np.a vp ; + PredVP np vp = mkClause (np.s ! No).comp np.isPol np.a vp ; - PredSCVP sc vp = mkClause sc.s (agrP3 Masc Sg) vp ; + PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ; ImpVP vpr = let agSg = {n = Sg ; g = Masc ; p = P2 } ; agPl = {n = Pl ; g = Masc ; p = P2 } ; @@ -40,8 +40,8 @@ bcond = andB vp.needClit bb in case of - { => (mkClause (np.s ! No).comp np.a (putClit (agrP3 ag.g ag.n) pc vp)).s ; - _ => (mkClause (np.s ! No).comp np.a vp).s + { => (mkClause (np.s ! No).comp np.isPol np.a (putClit (agrP3 ag.g ag.n) pc vp)).s ; + _ => (mkClause (np.s ! No).comp np.isPol np.a vp).s }; c2 = v2.c2 } ; @@ -60,7 +60,7 @@ SlashVS np vs slash = {s = \\bb,ag => (mkClause - (np.s ! No).comp np.a + (np.s ! No).comp np.isPol np.a (insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b)) (predV vs)) ).s ; diff --git a/lib/src/romanian/StructuralRon.gf b/lib/src/romanian/StructuralRon.gf index b5afb188b..5e0d9aa4e 100644 --- a/lib/src/romanian/StructuralRon.gf +++ b/lib/src/romanian/StructuralRon.gf @@ -244,10 +244,14 @@ whatPl_IP = youSg_Pron = mkPronoun "tu" "tine" "Å£ie" [] "tu" "tău" "ta" "tăi" "tale" Masc Sg P2 ; - youPl_Pron, youPol_Pron = + youPl_Pron = mkPronoun "voi" "voi" "vouă" [] "voi" "vostru" "voastră" "voÅŸtri" "voastre" Masc Pl P2 ; + youPol_Pron = let dvs = mkPronoun "dumneavoastră" "dumneavoastră" "dumneavoastră" [] "dumneavoastră" "dumneavoastră" "dumneavoastră" "dumneavoastră" "dumneavoastră" Masc Pl P2 + in + {s = dvs.s; c1 = dvs.c1; + c2 = dvs.c2; a = dvs.a; isPol = True; poss = dvs.poss} ; not_Predet = {s = \\a,c => "nu" ; c = No} ; diff --git a/lib/src/romanian/SymbolRon.gf b/lib/src/romanian/SymbolRon.gf index 12d2bdb29..4de701c19 100644 --- a/lib/src/romanian/SymbolRon.gf +++ b/lib/src/romanian/SymbolRon.gf @@ -1,77 +1,77 @@ ---# -path=.:../abstract:../common:../prelude -concrete SymbolRon of Symbol = - CatRon ** open Prelude, ResRon in { - -lin - SymbPN i = mkSymb i.s ; - IntPN i = mkSymb i.s ; - FloatPN i = mkSymb i.s ; - NumPN i = mkSymb (i.sp ! Masc) ; - - CNIntNP cn i = let gg = agrGender cn.g Sg in - heavyNP { - s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.s ; - a = agrP3 gg Sg ; - hasClit = HasRef False ; - ss = cn.s ! Sg ! Def ! ANomAcc ++ i.s - } ; - - CNSymbNP det cn xs = let gg = agrGender cn.g det.n; - st = if_then_else Species det.isDef Def Indef; - rs = if_then_else Species det.hasRef Def Indef; - ag = agrP3 gg det.n ; - hr = andB (getClit cn.a) det.hasRef; - nf = if_then_else NForm hr HasClit (HasRef False) - in - {s = \\c => case c of - {Vo => - {comp = det.s ! gg ! No ++ det.size ++ cn.s ! det.n ! st ! ANomAcc ++ det.post ! gg ! No ; - clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] }; - _ => {comp = det.s ! gg ! c ++ det.size ++ cn.s ! det.n ! st ! (convCase c) ++ det.post ! gg ! c ; - clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] } - }; - a = ag ; - nForm = nf ; - - isPronoun = False ; - indForm = det.s ! gg ! No ++ det.size ++cn.s ! det.n ! rs ! ANomAcc - } ; - - CNNumNP cn i = let gg = agrGender cn.g Sg in - heavyNP { - s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.sp ! gg; - a = agrP3 gg Sg ; - hasClit = HasRef False ; - ss = cn.s ! Sg ! Def ! ANomAcc ++ i.sp ! gg - } ; - SymbS sy = {s = \\_ => sy.s} ; - - SymbNum nn = {s,sp = \\_ => nn.s ; n = Pl; size = less20} ; -- need to know the size of the symbol to properly set it to less20 or plural - SymbOrd nn = {s = \\n,g,nc => case nc of - {Da | Ge => artDem g n AGenDat ++ "de-" ++ artPos g n ANomAcc ++ nn.s ++ "-lea"; - _ => artPos g n ANomAcc ++ nn.s ++ "-lea" - }; - isPre = True - } ; - -lincat - - Symb, [Symb] = SS ; - -lin - - MkSymb s = s ; - - BaseSymb = infixSS "ºi" ; - ConsSymb = infixSS "," ; - -oper mkSymb : Str -> PN = \ss -> -{ s = \\c => case c of - {Da | Ge => "lui" ++ ss; - _ => ss - }; - g = Masc; n = Sg; a = Animate ; - lock_PN = <> -}; - -} +--# -path=.:../abstract:../common:../prelude +concrete SymbolRon of Symbol = + CatRon ** open Prelude, ResRon in { + +lin + SymbPN i = mkSymb i.s ; + IntPN i = mkSymb i.s ; + FloatPN i = mkSymb i.s ; + NumPN i = mkSymb (i.sp ! Masc) ; + + CNIntNP cn i = let gg = agrGender cn.g Sg in + heavyNP { + s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.s ; + a = agrP3 gg Sg ; + hasClit = HasRef False ; + ss = cn.s ! Sg ! Def ! ANomAcc ++ i.s + } ; + + CNSymbNP det cn xs = let gg = agrGender cn.g det.n; + st = if_then_else Species det.isDef Def Indef; + rs = if_then_else Species det.hasRef Def Indef; + ag = agrP3 gg det.n ; + hr = andB (getClit cn.a) det.hasRef; + nf = if_then_else NForm hr HasClit (HasRef False) + in + {s = \\c => case c of + {Vo => + {comp = det.s ! gg ! No ++ det.size ++ cn.s ! det.n ! st ! ANomAcc ++ det.post ! gg ! No ; + clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] }; + _ => {comp = det.s ! gg ! c ++ det.size ++ cn.s ! det.n ! st ! (convCase c) ++ det.post ! gg ! c ; + clit = \\cs => if_then_Str hr ((genCliticsCase ag c).s ! cs) [] } + }; + a = ag ; + nForm = nf ; + isPol = False ; + isPronoun = False ; + indForm = det.s ! gg ! No ++ det.size ++cn.s ! det.n ! rs ! ANomAcc + } ; + + CNNumNP cn i = let gg = agrGender cn.g Sg in + heavyNP { + s = \\c => cn.s ! Sg ! Def ! (convCase c) ++ i.sp ! gg; + a = agrP3 gg Sg ; + hasClit = HasRef False ; + ss = cn.s ! Sg ! Def ! ANomAcc ++ i.sp ! gg + } ; + SymbS sy = {s = \\_ => sy.s} ; + + SymbNum nn = {s,sp = \\_ => nn.s ; n = Pl; size = less20} ; -- need to know the size of the symbol to properly set it to less20 or plural + SymbOrd nn = {s = \\n,g,nc => case nc of + {Da | Ge => artDem g n AGenDat ++ "de-" ++ artPos g n ANomAcc ++ nn.s ++ "-lea"; + _ => artPos g n ANomAcc ++ nn.s ++ "-lea" + }; + isPre = True + } ; + +lincat + + Symb, [Symb] = SS ; + +lin + + MkSymb s = s ; + + BaseSymb = infixSS "È™i" ; + ConsSymb = infixSS "," ; + +oper mkSymb : Str -> PN = \ss -> +{ s = \\c => case c of + {Da | Ge => "lui" ++ ss; + _ => ss + }; + g = Masc; n = Sg; a = Animate ; + lock_PN = <> +}; + +}