diff --git a/lib/resource-1.4/catalan/IdiomCat.gf b/lib/resource-1.4/catalan/IdiomCat.gf index 13f056876..193cd3b49 100644 --- a/lib/resource-1.4/catalan/IdiomCat.gf +++ b/lib/resource-1.4/catalan/IdiomCat.gf @@ -10,7 +10,7 @@ concrete IdiomCat of Idiom = CatCat ** ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ; - ProgrVP vp = + ProgrVP vpr = let vp = useVP vpr in insertComplement (\\agr => let diff --git a/lib/resource-1.4/danish/LexiconDan.gf b/lib/resource-1.4/danish/LexiconDan.gf index a9c5e350b..055a2c8dd 100644 --- a/lib/resource-1.4/danish/LexiconDan.gf +++ b/lib/resource-1.4/danish/LexiconDan.gf @@ -355,7 +355,8 @@ lin language_N = mk2N "sprog" "sproget" ; rule_N = mkN "regel" "regeln" "regler" "reglerne" ; ----- question_N = regN "fråga" ; + question_N = mk2N "spørgsmål" "spørgsmålet" ; + ---- ready_A = regA "färdig" ; ---- reason_N = regN "anledning" ; today_Adv = mkAdv "idag" ; diff --git a/lib/resource-1.4/exx-resource.gft b/lib/resource-1.4/exx-resource.gft index c99642db9..fdf05d2f2 100644 --- a/lib/resource-1.4/exx-resource.gft +++ b/lib/resource-1.4/exx-resource.gft @@ -197,7 +197,7 @@ PredVP (UsePron i_Pron) (UseComp (CompAdv here_Adv)) -- Janna's and Krasimir's long examples -RelCN (UseN car_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (Us ePron they_Pron) (SlashV2VNP beg_V2V (UsePron i_Pron) (SlashVV want_VV (SlashV2A paint_V2A (PositA red_A))))))) +RelCN (UseN car_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (UsePron they_Pron) (SlashV2VNP beg_V2V (UsePron i_Pron) (SlashVV want_VV (SlashV2A paint_V2A (PositA red_A))))))) PhrUtt NoPConj (UttImpSg PPos (ImpVP (AdVVP always_AdV (ComplSlash (SlashV2a listen_V2) (DetArtSg DefArt (UseN sea_N)))))) NoVoc PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos (ExistNP (PredetNP only_Predet (DetCN (DetArtCard IndefArt (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))) (AdvCN (SentCN (UseN woman_N) (EmbedQS (UseQCl TCond ASimul PPos (QuestSlash (IdetIP (IdetQuant which_IQuant NumPl)) (SlashPrep (PredVP (UsePron i_Pron) (ComplVV want_VV (PassV2 see_V2))) with_Prep))))) (PrepNP in_Prep (DetArtSg DefArt (UseN rain_N))))))))) NoVoc PhrUtt NoPConj (UttImpSg PPos (ImpVP (ComplSlash (SlashV2A paint_V2A (ConjAP both7and_DConj (BaseAP (ComparA small_A (DetArtSg DefArt (UseN sun_N))) (ComparA big_A (DetArtSg DefArt (UseN moon_N)))))) (DetArtSg DefArt (UseN earth_N))))) NoVoc diff --git a/lib/resource-1.4/french/DiffFre.gf b/lib/resource-1.4/french/DiffFre.gf index 00a93935d..f8800a63d 100644 --- a/lib/resource-1.4/french/DiffFre.gf +++ b/lib/resource-1.4/french/DiffFre.gf @@ -62,7 +62,7 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in { } ; vpAgrClit : Agr -> VPAgr = \a -> - VPAgrClit (aagr a.g a.n) ; --- subty + VPAgrClit a.g a.n ; ---- pronArg = pronArgGen Neg ; --- takes more space and time diff --git a/lib/resource-1.4/french/IdiomFre.gf b/lib/resource-1.4/french/IdiomFre.gf index 3f12683fa..bb38c8774 100644 --- a/lib/resource-1.4/french/IdiomFre.gf +++ b/lib/resource-1.4/french/IdiomFre.gf @@ -33,7 +33,7 @@ concrete IdiomFre of Idiom = CatFre ** (\\a => "en" ++ "train" ++ elisDe ++ infVP vp a) (predV copula) ; - ImpPl1 vp = {s = + ImpPl1 vpr = let vp = useVP vpr in {s = (mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem } ; diff --git a/lib/resource-1.4/german/NounGer.gf b/lib/resource-1.4/german/NounGer.gf index f6921f8ba..4c8dc3551 100644 --- a/lib/resource-1.4/german/NounGer.gf +++ b/lib/resource-1.4/german/NounGer.gf @@ -179,7 +179,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { } ; RelNP np rs = { - s = \\c => np.s ! c ++ rs.s ! gennum np.a.g np.a.n ; + s = \\c => np.s ! c ++ "," ++ rs.s ! gennum np.a.g np.a.n ; a = np.a ; isPron = False } ; diff --git a/lib/resource-1.4/german/ResGer.gf b/lib/resource-1.4/german/ResGer.gf index 059e150b8..9df407b3d 100644 --- a/lib/resource-1.4/german/ResGer.gf +++ b/lib/resource-1.4/german/ResGer.gf @@ -367,11 +367,15 @@ resource ResGer = ParamX ** open Prelude in { -- For $Verb$. - VP : Type = { + VPC : Type = { s : Bool => Agr => VPForm => { -- True = prefix glued to verb fin : Str ; -- hat inf : Str -- wollen - } ; + } + } ; + + VP : Type = { + s : Verb ; a1 : Polarity => Str ; -- nicht n2 : Agr => Str ; -- dich a2 : Str ; -- heute @@ -382,8 +386,10 @@ resource ResGer = ParamX ** open Prelude in { predV : Verb -> VP = predVGen False ; - predVGen : Bool -> Verb -> VP = \isAux, verb -> + useVP : VP -> VPC = \vp -> let + isAux = vp.isAux ; + verb = vp.s ; vfin : Bool -> Mood -> Tense -> Agr -> Str = \b,m,t,a -> verb.s ! vFin b m t a ; vinf = verb.s ! VInf False ; @@ -426,7 +432,18 @@ resource ResGer = ParamX ** open Prelude in { VPImperat True => vf False (verb.s ! VFin False (VPresSubj Pl P3)) [] ; VPInfinit Anter => vf True [] (vpart ++ haben) ; --# notpresent VPInfinit Simul => vf True [] (verb.s ! VInf b) - } ; + } + } ; + + + predVGen : Bool -> Verb -> VP = \isAux, verb -> { + s = { + s = verb.s ; + prefix = verb.prefix ; + aux = verb.aux ; + vtype = verb.vtype + } ; + a1 : Polarity => Str = negation ; n2 : Agr => Str = case verb.vtype of { VAct => \\_ => [] ; @@ -498,7 +515,7 @@ resource ResGer = ParamX ** open Prelude in { insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { s = vp.s ; a1 = vp.a1 ; - n2 = \\a => vp.n2 ! a ++ obj ! a ; + n2 = \\a => obj ! a ++ vp.n2 ! a ; a2 = vp.a2 ; isAux = vp.isAux ; inf = vp.inf ; @@ -551,14 +568,14 @@ resource ResGer = ParamX ** open Prelude in { s : Mood => Tense => Anteriority => Polarity => Order => Str } ; - mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> { + mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> let vps = useVP vp in { s = \\m,t,a,b,o => let ord = case o of { Sub => True ; -- glue prefix to verb _ => False } ; - verb = vp.s ! ord ! agr ! VPFinite m t a ; + verb = vps.s ! ord ! agr ! VPFinite m t a ; neg = vp.a1 ! b ; obj = vp.n2 ! agr ; compl = obj ++ neg ++ vp.a2 ; @@ -578,10 +595,10 @@ resource ResGer = ParamX ** open Prelude in { } } ; - infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp -> + infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp -> let vps = useVP vp in < \\agr => vp.n2 ! agr ++ vp.a2, - vp.a1 ! Pos ++ (vp.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf, + vp.a1 ! Pos ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf, vp.inf ++ vp.ext > ; diff --git a/lib/resource-1.4/german/SentenceGer.gf b/lib/resource-1.4/german/SentenceGer.gf index 512db531f..9154c1445 100644 --- a/lib/resource-1.4/german/SentenceGer.gf +++ b/lib/resource-1.4/german/SentenceGer.gf @@ -8,7 +8,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ; - ImpVP vp = { + ImpVP vp = let vps = useVP vp in { s = \\pol,n => let ps = case n of { @@ -16,7 +16,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { _ => } ; agr = {g = Fem ; n = numImp n ; p = ps.p1} ; --- g does not matter - verb = vp.s ! False ! agr ! VPImperat ps.p3 ; + verb = vps.s ! False ! agr ! VPImperat ps.p3 ; inf = vp.inf ++ verb.inf ; in verb.fin ++ ps.p2 ++ diff --git a/lib/resource-1.4/german/StructuralGer.gf b/lib/resource-1.4/german/StructuralGer.gf index bf9394b50..6dfe9f6ea 100644 --- a/lib/resource-1.4/german/StructuralGer.gf +++ b/lib/resource-1.4/german/StructuralGer.gf @@ -45,7 +45,7 @@ concrete StructuralGer of Structural = CatGer ** how8many_IDet = detLikeAdj Pl "wieviel" ; if_Subj = ss "wenn" ; in8front_Prep = mkPrep "vor" Dat ; - i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Fem Sg P1 ; + i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ; in_Prep = mkPrep "in" Dat ; it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ; less_CAdv = ss "weniger" ; diff --git a/lib/resource-1.4/italian/DiffIta.gf b/lib/resource-1.4/italian/DiffIta.gf index c1996398a..3cca9cd5c 100644 --- a/lib/resource-1.4/italian/DiffIta.gf +++ b/lib/resource-1.4/italian/DiffIta.gf @@ -78,7 +78,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud } ; vpAgrClit : Agr -> VPAgr = \a -> - VPAgrClit (aagr a.g a.n) ; --- subty + VPAgrClit a.g a.n ; --- subty pronArg = \n,p,acc,dat -> let diff --git a/lib/resource-1.4/italian/IdiomIta.gf b/lib/resource-1.4/italian/IdiomIta.gf index 7b74df6b2..2f1bb118d 100644 --- a/lib/resource-1.4/italian/IdiomIta.gf +++ b/lib/resource-1.4/italian/IdiomIta.gf @@ -5,7 +5,9 @@ concrete IdiomIta of Idiom = CatIta ** lin ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ; - GenericCl vp = mkClause "si" True (agrP3 Masc Sg) vp ; ---- non se ci fanno cose + + GenericCl vp = + mkClause [] True (agrP3 Masc Sg) (insertRefl vp) ; CleftNP np rs = mkClause [] True (agrP3 Masc Sg) (insertComplement (\\_ => rs.s ! Indic ! np.a) @@ -29,7 +31,8 @@ concrete IdiomIta of Idiom = CatIta ** (predV copula))).s ! DDir ! t ! a ! p ! Indic } ; - ProgrVP vp = + ProgrVP vpr = + let vp = useVP vpr in insertComplement (\\agr => let @@ -40,7 +43,7 @@ concrete IdiomIta of Idiom = CatIta ** ) (predV (essereV (verboV (stare_16 "stare")))) ; - ImpPl1 vp = {s = + ImpPl1 vpr = let vp = useVP vpr in {s = (mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem } ; diff --git a/lib/resource-1.4/italian/LexiconIta.gf b/lib/resource-1.4/italian/LexiconIta.gf index 61bf0fdd8..6cbc29d85 100644 --- a/lib/resource-1.4/italian/LexiconIta.gf +++ b/lib/resource-1.4/italian/LexiconIta.gf @@ -355,6 +355,7 @@ lin language_N = regN "lingua" ; rule_N = regN "regola" ; + question_N = regN "domanda" ; today_Adv = mkAdv "oggi" ; } ; diff --git a/lib/resource-1.4/norwegian/LexiconNor.gf b/lib/resource-1.4/norwegian/LexiconNor.gf index cceb25b41..30cda22ea 100644 --- a/lib/resource-1.4/norwegian/LexiconNor.gf +++ b/lib/resource-1.4/norwegian/LexiconNor.gf @@ -354,7 +354,7 @@ lin language_N = mk2N "språk" "språket" ; rule_N = mkN "regel" "regelen" "regler" "reglene" ; ----- question_N = regN "fråga" ; + question_N = mk2N "spørsmål" "spørsmålet" ; ---- ready_A = regA "färdig" ; ---- reason_N = regN "anledning" ; today_Adv = mkAdv "idag" ; diff --git a/lib/resource-1.4/romance/CatRomance.gf b/lib/resource-1.4/romance/CatRomance.gf index a3829d811..4a88dd082 100644 --- a/lib/resource-1.4/romance/CatRomance.gf +++ b/lib/resource-1.4/romance/CatRomance.gf @@ -44,8 +44,8 @@ incomplete concrete CatRomance of Cat = -- Verb - VP = CommonRomance.VP ; - VPSlash = CommonRomance.VP ** {c2 : Compl} ; + VP = ResRomance.VP ; + VPSlash = ResRomance.VP ** {c2 : Compl} ; Comp = {s : Agr => Str} ; -- Adjective diff --git a/lib/resource-1.4/romance/CommonRomance.gf b/lib/resource-1.4/romance/CommonRomance.gf index 528ea22d8..f167f38fa 100644 --- a/lib/resource-1.4/romance/CommonRomance.gf +++ b/lib/resource-1.4/romance/CommonRomance.gf @@ -176,11 +176,11 @@ oper appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr -> case vp of { - VPAgrSubj => agr ; - VPAgrClit a => a + VPAgrSubj => agr ; + VPAgrClit g n => {g = g ; n = n} } ; - vpAgrNone : VPAgr = VPAgrClit (aagr Masc Sg) ; + vpAgrNone : VPAgr = VPAgrClit Masc Sg ; oper mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ; @@ -193,11 +193,10 @@ oper param VPAgr = VPAgrSubj -- elle est partie, elle s'est vue - | VPAgrClit -- elle a dormi; elle les a vues - {g : Gender ; n : Number} ; + | VPAgrClit Gender Number ; -- elle a dormi; elle les a vues oper - VP : Type = { + VPC : Type = { s : VPForm => { fin : Agr => Str ; -- ai inf : AAgr => Str -- dit diff --git a/lib/resource-1.4/romance/DiffRomance.gf b/lib/resource-1.4/romance/DiffRomance.gf index acf44cb9b..4ff5f3c96 100644 --- a/lib/resource-1.4/romance/DiffRomance.gf +++ b/lib/resource-1.4/romance/DiffRomance.gf @@ -49,8 +49,7 @@ interface DiffRomance = open CommonRomance, Prelude in { -- To render imperatives (with their clitics etc). - oper mkImperative : Bool -> Person -> CommonRomance.VP -> {s : Polarity => AAgr => Str} ; - + oper mkImperative : Bool -> Person -> VPC -> {s : Polarity => AAgr => Str} ; --2 Constants that must derivatively depend on language @@ -104,5 +103,6 @@ param oper Verb = {s : VF => Str ; vtyp : VType} ; + } diff --git a/lib/resource-1.4/romance/ResRomance.gf b/lib/resource-1.4/romance/ResRomance.gf index 9191b5f5f..6e91fe665 100644 --- a/lib/resource-1.4/romance/ResRomance.gf +++ b/lib/resource-1.4/romance/ResRomance.gf @@ -48,8 +48,23 @@ oper appCompl : Compl -> (NPForm => Str) -> Str = \comp,np -> comp.s ++ np ! Ton comp.c ; - predV : Verb -> VP = \verb -> + oper + + VP : Type = { + s : Verb ; + agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic + neg : Polarity => (Str * Str) ; -- ne-pas + clAcc : CAgr ; -- le/se + clDat : CAgr ; -- lui + clit2 : Str ; -- y en + comp : Agr => Str ; -- content(e) ; ā ma mčre ; hier + ext : Polarity => Str ; -- que je dors / que je dorme + } ; + + + useVP : VP -> VPC = \vp -> let + verb = vp.s ; vfin : TMood -> Agr -> Str = \tm,a -> verb.s ! VFin tm a.n a.p ; vpart : AAgr -> Str = \a -> verb.s ! VPart a.g a.n ; vinf : Bool -> Str = \b -> verb.s ! VInfin b ; @@ -86,6 +101,23 @@ oper VPGerund => vf (\_ -> []) (\_ -> vger) ; VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b) } ; + agr = vp.agr ; -- partAgr typ ; + neg = vp.neg ; -- negation ; + clAcc = vp.clAcc ; -- case isVRefl typ of { + -- True => CRefl ; + -- _ => CNone + -- } ; + clDat = vp.clDat ; -- CNone ; --- no dative refls + clit2 = vp.clit2 ; -- [] ; + comp = vp.comp ; -- \\a => [] ; + ext = vp.ext -- \\p => [] + } ; + + predV : Verb -> VP = \verb -> + let + typ = verb.vtyp ; + in { + s = {s = verb.s ; vtyp = typ} ; agr = partAgr typ ; neg = negation ; clAcc = case isVRefl typ of { @@ -137,6 +169,7 @@ oper ext = vp.ext ; } ; + -- Agreement with preceding relative or interrogative: -- "les femmes que j'ai aimées" @@ -151,6 +184,17 @@ oper ext = vp.ext ; } ; + insertRefl : VP -> VP = \vp -> { + s = {s = vp.s.s ; vtyp = vRefl} ; + agr = vp.agr ; + clAcc = CRefl ; + clDat = vp.clDat ; + clit2 = vp.clit2 ; + neg = vp.neg ; + comp = vp.comp ; + ext = vp.ext ; + } ; + insertAdv : Str -> VP -> VP = \co,vp -> { s = vp.s ; agr = vp.agr ; @@ -199,7 +243,7 @@ oper mkClause : Str -> Bool -> Agr -> VP -> {s : Direct => RTense => Anteriority => Polarity => Mood => Str} = - \subj,hasClit,agr,vp -> { + \subj,hasClit,agr,vpr -> { s = \\d,t,a,b,m => let tm = case t of { @@ -209,6 +253,7 @@ oper RPasse => VPasse ; --# notpresent RPres => VPres m } ; + vp = useVP vpr ; vps = vp.s ! VPFinite tm a ; verb = vps.fin ! agr ; inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug @@ -229,8 +274,9 @@ oper --- have a "-" with possibly a special verb form with "t": --- "comment fera-t-il" vs. "comment fera Pierre" - infVP : VP -> Agr -> Str = \vp,agr -> + infVP : VP -> Agr -> Str = \vpr,agr -> let + vp = useVP vpr ; clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; inf = (vp.s ! VPInfinit Simul clpr.p3).inf ! (aagr agr.g agr.n) ; neg = vp.neg ! Pos ; --- Neg not in API diff --git a/lib/resource-1.4/romance/SentenceRomance.gf b/lib/resource-1.4/romance/SentenceRomance.gf index feadd991c..66b9ed8dd 100644 --- a/lib/resource-1.4/romance/SentenceRomance.gf +++ b/lib/resource-1.4/romance/SentenceRomance.gf @@ -8,7 +8,7 @@ incomplete concrete SentenceRomance of Sentence = PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ; - ImpVP vp = { + ImpVP vpr = let vp = useVP vpr in { s = \\p,i,g => case i of { ImpF n b => (mkImperative b P2 vp).s ! p ! (aagr g n) } diff --git a/lib/resource-1.4/romance/VerbRomance.gf b/lib/resource-1.4/romance/VerbRomance.gf index b6c96f06b..b09e0426b 100644 --- a/lib/resource-1.4/romance/VerbRomance.gf +++ b/lib/resource-1.4/romance/VerbRomance.gf @@ -36,15 +36,17 @@ incomplete concrete VerbRomance of Verb = (\\_ => q.s ! QIndir) (predV v)) ; + {- ---- lincat should be fixed SlashV2A v ap = - let af = AF Masc Sg - {- ---- lincat should be fixed let af = case v.c3.isDir of { True => AF np.a.g np.a.n ; -- ... bleues _ => AF Masc Sg -- il les peint en bleu } -} + + SlashV2A v ap = + let af = AF Masc Sg in mkVPSlash v.c2 (insertComplement @@ -54,7 +56,7 @@ incomplete concrete VerbRomance of Verb = ComplSlash vp np = insertObject vp.c2 np vp ; ReflVP v = case v.c2.isDir of { - True => v ** {vtyp = vRefl} ; + True => insertRefl v ; False => insertComplement (\\a => v.c2.s ++ reflPron a.n a.p v.c2.c) v } ; diff --git a/lib/resource-1.4/spanish/IdiomSpa.gf b/lib/resource-1.4/spanish/IdiomSpa.gf index 0697942ac..209d66c0a 100644 --- a/lib/resource-1.4/spanish/IdiomSpa.gf +++ b/lib/resource-1.4/spanish/IdiomSpa.gf @@ -5,7 +5,9 @@ concrete IdiomSpa of Idiom = CatSpa ** lin ImpersCl vp = mkClause [] True (agrP3 Masc Sg) vp ; - GenericCl vp = mkClause "se" True (agrP3 Masc Sg) vp ; ---- just Italian ? + + GenericCl vp = + mkClause [] True (agrP3 Masc Sg) (insertRefl vp) ; ---- just Italian ? CleftNP np rs = mkClause [] True (agrP3 Masc Sg) (insertComplement (\\_ => rs.s ! Indic ! np.a) @@ -25,7 +27,7 @@ concrete IdiomSpa of Idiom = CatSpa ** (mkClause [] True (agrP3 Masc Sg) (predV (verboV (hay_3 "haber")))).s ! DDir ! t ! a ! p ! Indic } ; - ProgrVP vp = + ProgrVP vpr = let vp = useVP vpr in insertComplement (\\agr => let @@ -36,7 +38,7 @@ concrete IdiomSpa of Idiom = CatSpa ** ) (predV (verboV (estar_2 "estar"))) ; - ImpPl1 vp = {s = + ImpPl1 vpr = let vp = useVP vpr in {s = (mkImperative False P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem } ;