From 3b55eaa89dd8be47c36186fd1c8f33502878e630 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Mon, 7 Jan 2019 13:35:31 -0200 Subject: [PATCH] (Por) misc fixes - add n_units_of_NP - add n_unit_CN - refactor adjective paradigm opers - rm identity definitions in Idiom --- src/portuguese/ConstructionPor.gf | 17 +++++++++++------ src/portuguese/IdiomPor.gf | 4 ++-- src/portuguese/ParadigmsPor.gf | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/portuguese/ConstructionPor.gf b/src/portuguese/ConstructionPor.gf index 691978bb3..585f3b1a2 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,14 +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_of_NP card cn np = variants {} ; - -- n_unit_CN card cn cn = variants {} ; + 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 @@ -50,8 +55,8 @@ 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 : ParadigmsPor.Number} ; diff --git a/src/portuguese/IdiomPor.gf b/src/portuguese/IdiomPor.gf index 8191b6b60..7e87107ae 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 3a6339018..a2b5a6034 100644 --- a/src/portuguese/ParadigmsPor.gf +++ b/src/portuguese/ParadigmsPor.gf @@ -187,27 +187,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} ; @@ -224,6 +221,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 } ;