diff --git a/src/portuguese/ConstructionPor.gf b/src/portuguese/ConstructionPor.gf index 1a1cad14..585f3b1a 100644 --- a/src/portuguese/ConstructionPor.gf +++ b/src/portuguese/ConstructionPor.gf @@ -17,7 +17,8 @@ lin has_age_VP card = mkVP have_V2 (mkNP L.year_N) ; have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "chamar"))) y ; - married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ; + married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) + | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ; what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "chamar"))) ; how_old_QCl x = mkQCl (mkIP how8many_IDet L.year_N) x have_V2 ; @@ -29,12 +30,18 @@ lin is_right_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "certo")) ; is_wrong_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "errado")) ; - n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) (lin A a) ; - + n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) + (lin A a) ; + n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ; + n_unit_CN card cn cn = mkCN (invarA ("de" ++ card.s ! cn.g ++ cn.s ! card.n)) cn ; + bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ; cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ; glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "taça") part_Prep)) np ; + -- falta X para NP ser Y + few_X_short_of_Y np cn cn = variants {} ; + {- -- spatial deixis and motion verbs @@ -48,11 +55,11 @@ lin go_there_VP = mkVP (mkVP L.go_V) there_Adv ; come_there_VP = mkVP (mkVP L.come_V) there_Adv ; come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "de allí") ; -- "de allá" --} - + -} + lincat Timeunit = N ; - Hour = {s : Str ; pe : Period ; n : Number} ; + Hour = {s : Str ; pe : Period ; n : ParadigmsPor.Number} ; Weekday = N ; Monthday = NP ; Month = N ; @@ -97,15 +104,15 @@ lin twentyThreeHour = mkHour "23" Noite Pl ; twentyFourHour = {s = "meia-noite" ; pe = None ; n = Sg} ; - timeHour h = mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ; + timeHour h = ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ; timeHourMinute h m = let min = m.s ! Masc in - mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ; + ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ; oper - mkHour : Str -> Period -> Number -> {s : Str ; pe : Period ; n : Number} ; + mkHour : Str -> Period -> ParadigmsPor.Number -> {s : Str ; pe : Period ; n : ParadigmsPor.Number} ; mkHour num pe n = S.mkUtt (S.mkCard num) ** {pe = pe ; n = n} ; period : Period => Str ; diff --git a/src/portuguese/DiffPor.gf b/src/portuguese/DiffPor.gf index d2e80ee4..1f608218 100644 --- a/src/portuguese/DiffPor.gf +++ b/src/portuguese/DiffPor.gf @@ -1,6 +1,6 @@ --# -path=.:../romance:../abstract:../common:../prelude -instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { +instance DiffPor of DiffRomance - [chooseTA,partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { flags optimize=noexpand ; coding=utf8 ; @@ -199,6 +199,23 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo vpAgrClit : Agr -> VPAgr = \a -> vpAgrNone ; + oper + chooseTA : RTense -> Anteriority + -> (VF => Str) -> (VF => Str) + -> Number -> Person -> Mood -> Str -> Str * Str ; + chooseTA t a verb vaux n p m part = case of { + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => + } ; + -- oper's opers oper argPron : Gender -> Number -> Person -> Case -> Str = @@ -216,8 +233,8 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo \g,n,p -> case < : Gender * Number * Person> of { <_,Sg,P1> => cases "me" "mim" ; <_,Sg,P2> => cases "te" "ti" ; - <_,Pl,P1> => cases "nos" "nós" ; --- nosotros - <_,Pl,P2> => cases "vos" "vós" ; --- vosotros + <_,Pl,P1> => cases "nos" "nós" ; + <_,Pl,P2> => cases "vos" "vós" ; => cases3 "a" "sua" "ela" ; <_, Sg,P3> => cases3 "o" "seu" "ele" ; => cases3 "as" "suas" "elas" ; diff --git a/src/portuguese/DocumentationPorFunctor.gf b/src/portuguese/DocumentationPorFunctor.gf index 84d94543..8e550541 100644 --- a/src/portuguese/DocumentationPorFunctor.gf +++ b/src/portuguese/DocumentationPorFunctor.gf @@ -27,7 +27,7 @@ oper heading : N -> Str = \n -> (nounHeading n).s ; lin - InflectionN, InflectionN3, InflectionN3 = \noun -> { + InflectionN, InflectionN2, InflectionN3 = \noun -> { t = "n" ; s1 = heading1 (heading noun_Category ++ case noun.g of { @@ -111,8 +111,8 @@ lin InflectionVV v = { t = "v" ; s1 = heading1 (heading verb_Category) ++ - paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ; - s2 = inflVerb v + paragraph (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP L.sleep_V))) ; + s2 = inflVerb (lin VV v) } ; InflectionVS v = { @@ -223,4 +223,4 @@ oper {- --# notpresent -} -} +} ; diff --git a/src/portuguese/IdiomPor.gf b/src/portuguese/IdiomPor.gf index 8191b6b6..7e87107a 100644 --- a/src/portuguese/IdiomPor.gf +++ b/src/portuguese/IdiomPor.gf @@ -56,7 +56,7 @@ concrete IdiomPor of Idiom = CatPor ** s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ; } ; - SelfAdvVP vp = vp ; + SelfAdvVP vp = variants {} ; SelfAdVVP = insertComplement ( \\agr => case agr of { @@ -68,6 +68,6 @@ concrete IdiomPor of Idiom = CatPor ** } ) ; - SelfNP np = np ; + SelfNP np = variants {} ; } ; diff --git a/src/portuguese/ParadigmsPor.gf b/src/portuguese/ParadigmsPor.gf index 874be4cf..d4b285be 100644 --- a/src/portuguese/ParadigmsPor.gf +++ b/src/portuguese/ParadigmsPor.gf @@ -182,27 +182,24 @@ oper --2 Adjectives compADeg : A -> A ; - compADeg a = lin A { + compADeg a = a ** { s = table { Posit => a.s ! Posit ; _ => \\f => "mais" ++ a.s ! Posit ! f } ; - isPre = a.isPre ; - copTyp = a.copTyp } ; + liftAdj : Adj -> A ; + liftAdj adj = compADeg (lin A {s = \\_ => adj.s ; isPre = False ; copTyp = serCopula}) ; + regA : Str -> A ; - regA a = compADeg (lin A {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula}) ; + regA a = liftAdj (mkAdjReg a) ; mk2A : (único,unicamente : Str) -> A ; - mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ; - copTyp = serCopula ; - lock_A = <>} ; + mk2A adj adv = liftAdj (mkAdj2 adj adv) ; mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ; - mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ; - isPre = False ; copTyp = serCopula ; - lock_A = <>} ; + mk5A a b c d e = liftAdj (mkAdj a b c d e) ; adjCopula : A -> CopulaType -> A ; adjCopula a cop = a ** {copTyp = cop} ; @@ -219,6 +216,9 @@ oper copTyp = a.copTyp } ; + invarA : Str -> A ; + invarA a = liftAdj (adjBlu a) ; + mkNonInflectA : A -> Str -> A ; mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ; diff --git a/src/romance/DiffRomance.gf b/src/romance/DiffRomance.gf index e9d0c055..22021c0d 100644 --- a/src/romance/DiffRomance.gf +++ b/src/romance/DiffRomance.gf @@ -169,5 +169,20 @@ oper contractInf : Bool -> Bool -> Bool = \_,_ -> False ; -- only True in Ita, by orB -} + chooseTA : RTense -> Anteriority + -> (VF => Str) -> (VF => Str) + -> Number -> Person -> Mood -> Str -> Str * Str ; + chooseTA t a verb vaux n p m part = case of { + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => + } ; +} ; diff --git a/src/romance/ResRomance.gf b/src/romance/ResRomance.gf index bd0ab912..ad38ed32 100644 --- a/src/romance/ResRomance.gf +++ b/src/romance/ResRomance.gf @@ -228,18 +228,7 @@ oper ---- } ; - vps : Str * Str = case of { - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => - } ; + vps : Str * Str = chooseTA te a verb vaux num per m part ; fin = vps.p1 ; inf = vps.p2 ; diff --git a/src/romance/SentenceRomance.gf b/src/romance/SentenceRomance.gf index 8ade9cc9..a2ac17c2 100644 --- a/src/romance/SentenceRomance.gf +++ b/src/romance/SentenceRomance.gf @@ -113,19 +113,8 @@ incomplete concrete SentenceRomance of Sentence = ---- VPAgrClit g n => verb ! VPart g n ---- } ; - vpss : Str * Str = case of { + vpss : Str * Str = chooseTA te a verb vaux num per m part ; - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => - } ; fin = vpss.p1 ; inf = vpss.p2 ; hypt = verbHyphen vp.s ; -- in French, -t- in some cases, otherwise - ; empty in other langs diff --git a/src/spanish/LangSpa.gf b/src/spanish/LangSpa.gf index 1c3abf3f..1e3c5c0d 100644 --- a/src/spanish/LangSpa.gf +++ b/src/spanish/LangSpa.gf @@ -1,4 +1,4 @@ ---# -path=.:../romance:../abstract:../common:../api +--# -path=.:../romance:../abstract:../common:../api:../prelude concrete LangSpa of Lang = GrammarSpa,