From 97c2575f0fcf61db8fc132a511744120155db9f0 Mon Sep 17 00:00:00 2001 From: "ramona.enache" Date: Mon, 26 Apr 2010 09:32:05 +0000 Subject: [PATCH] FixedRon --- src/romanian/CatRon.gf | 3 ++- src/romanian/ExtraRon.gf | 8 ++++++-- src/romanian/ExtraRonAbs.gf | 4 +++- src/romanian/NounRon.gf | 11 +++++++++-- src/romanian/ParadigmsRon.gf | 6 ++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/romanian/CatRon.gf b/src/romanian/CatRon.gf index d1d6aedb..91b4199c 100644 --- a/src/romanian/CatRon.gf +++ b/src/romanian/CatRon.gf @@ -47,7 +47,8 @@ concrete CatRon of Cat = -- Noun - CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy ; isComp : Bool} ; + CN = {s : Number => Species => ACase => Str; g : NGender; + a : Animacy; isComp : Bool; needsRefForm : Bool} ; Pron = {s : NCase => Str ; c1, c2 : Clitics => Str ; diff --git a/src/romanian/ExtraRon.gf b/src/romanian/ExtraRon.gf index ad9bacd1..e481755b 100644 --- a/src/romanian/ExtraRon.gf +++ b/src/romanian/ExtraRon.gf @@ -3,7 +3,10 @@ concrete ExtraRon of ExtraRonAbs = CatRon ** open ResRon, ParadigmsRon, Prelude, MorphoRon in { lin - at_Prep = mkPrep "la" Ac True; + at_Prep = mkPrep "la" Ac True; + DatSubjCompCl np vp np2 = let ss = if_then_Str np.isPronoun "" (np.s ! Dat).comp + in + mkClause ss np.isPol np2.a (insertClit (insertSimpObj (\\_ => (np2.s ! Nom).comp) vp) np); 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 ; @@ -13,7 +16,8 @@ youPol8fem_Pron = let dvs = mkPronoun "dumneavoastră" "dumneavoastră" "dumneav in {s = dvs.s; c1 = dvs.c1; c2 = dvs.c2; a = dvs.a; isPol = True; poss = dvs.poss} ; - + +refCN n = n ** {isComp = False; needsRefForm = True}; oper insertClit : VerbPhrase -> NounPhrase -> VerbPhrase = \vp, np -> diff --git a/src/romanian/ExtraRonAbs.gf b/src/romanian/ExtraRonAbs.gf index 78cad03c..cb17982e 100644 --- a/src/romanian/ExtraRonAbs.gf +++ b/src/romanian/ExtraRonAbs.gf @@ -4,13 +4,15 @@ abstract ExtraRonAbs = Cat **{ fun DatSubjCl : NP -> VP -> Cl ; + DatSubjCompCl : NP -> VP -> NP -> Cl ; at_Prep : Prep ; + refCN : N -> CN ; i8fem_Pron : Pron ; youSg8fem_Pron : Pron ; youPl8fem_Pron : Pron ; youPol8fem_Pron : Pron ; - + diff --git a/src/romanian/NounRon.gf b/src/romanian/NounRon.gf index 9e75029f..60eaf238 100644 --- a/src/romanian/NounRon.gf +++ b/src/romanian/NounRon.gf @@ -9,7 +9,7 @@ concrete NounRon of Noun = n = det.n; gg = agrGender cn.g n ; ag = agrP3 gg n ; - hr = orB (andB (getClit cn.a) det.hasRef) (andB det.isDef cn.isComp); + hr = orB cn.needsRefForm (orB (andB (getClit cn.a) det.hasRef) (andB det.isDef cn.isComp)); nf = if_then_else NForm hr HasClit (HasRef False); st= if_then_else Species det.isDef Def Indef; rs = if_then_else Species det.hasRef Def Indef @@ -233,7 +233,7 @@ in { -- This is based on record subtyping. - UseN, UseN2 = \noun -> noun ** {isComp = False}; + UseN, UseN2 = \noun -> noun ** {isComp = False; needsRefForm = False}; Use2N3 f = f ; @@ -243,6 +243,7 @@ in { s = \\n,sp,c => f.s ! n ! sp ! c ++ appCompl f.c2 x ; g = f.g ; a = f.a ; + needsRefForm = False ; isComp = getClit f.a } ; @@ -251,6 +252,7 @@ in { g = f.g ; c2 = f.c3; a = f.a ; + needsRefForm = False ; isComp = getClit f.a } ; @@ -266,6 +268,7 @@ in { }; g = g ; a = cn.a ; + needsRefForm = cn.needsRefForm ; isComp = getClit cn.a } ; @@ -274,6 +277,7 @@ in { s = \\n,sp,c => cn.s ! n ! sp ! c ++ rs.s ! Indic ! agrP3 (agrGender cn.g n) n ; g = cn.g ; a = cn.a ; + needsRefForm = cn.needsRefForm; isComp = False } ; @@ -281,6 +285,7 @@ in { s = \\n,sp,c => cn.s ! n ! sp ! c ++ sc.s ; g = g ; a = cn.a ; + needsRefForm = cn.needsRefForm; isComp = False } ; @@ -288,6 +293,7 @@ in { s = \\n,sp,c => cn.s ! n ! sp ! c ++ sc.s ; g = g; a = cn.a ; + needsRefForm = cn.needsRefForm; isComp = False } ; @@ -295,6 +301,7 @@ in { s = \\n,sp,c => cn.s ! n ! sp ! c ++ (np.s ! No).comp ; g = g; a = cn.a ; + needsRefForm = cn.needsRefForm; isComp = False } ; diff --git a/src/romanian/ParadigmsRon.gf b/src/romanian/ParadigmsRon.gf index 388b1045..1b02d086 100644 --- a/src/romanian/ParadigmsRon.gf +++ b/src/romanian/ParadigmsRon.gf @@ -54,7 +54,9 @@ oper Acc : NCase ; Dat : NCase ; Gen : NCase ; - mkPrep : overload { + Nom : NCase ; + +mkPrep : overload { mkPrep : Str -> NCase-> Bool -> Prep ; mkPrep : Str -> NCase -> Prep; }; @@ -173,7 +175,7 @@ lock_PN = <> Acc = Ac ; Dat = Da ; Gen = Ge ; - + Nom = No ; Preposition = Compl ;