From 2c2c83f11c8ef775a3229e2a78e9061e100eade0 Mon Sep 17 00:00:00 2001 From: "inari.listenmaa" Date: Fri, 19 Oct 2012 11:45:45 +0000 Subject: [PATCH] spanish_catalan_corrections --- examples/phrasebook/SentencesCat.gf | 9 ++-- examples/phrasebook/SentencesSpa.gf | 8 +++ examples/phrasebook/WordsCat.gf | 37 ++++++++------ examples/phrasebook/WordsSpa.gf | 76 ++++++++++++----------------- 4 files changed, 67 insertions(+), 63 deletions(-) diff --git a/examples/phrasebook/SentencesCat.gf b/examples/phrasebook/SentencesCat.gf index ec5977fdc..3bf19534d 100644 --- a/examples/phrasebook/SentencesCat.gf +++ b/examples/phrasebook/SentencesCat.gf @@ -2,7 +2,7 @@ concrete SentencesCat of Sentences = NumeralCat ** SentencesI - [ IsMass, IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale, WeMale, WeFemale, YouPlurFamMale, YouPlurFamFemale, YouPlurPolFemale, YouPlurPolMale, TheyMale, TheyFemale, - WherePlace, WherePerson, ABePlace, + PImperativeFamNeg, PImperativePolNeg, PImperativePlurNeg, --negative imperatives in subjunctive Superlative ] with @@ -52,13 +52,12 @@ lin TheyFemale = {name = mkNP (ProDrop they8fem_Pron) ; isPron = True ; poss = mkQuant they_Pron} ; + PImperativeFamNeg v = phrasePlease (ImpNeg (mkNP (ProDrop youSg_Pron)) v) ; + PImperativePolNeg v = phrasePlease (ImpNeg (mkNP (ProDrop youPol_Pron)) v) ; + PImperativePlurNeg v = phrasePlease (ImpNeg (mkNP (ProDrop youPl_Pron)) v) ; - ABePlace p place = mkCl p.name (mkVP (mkVP ser) place.at) ; - WherePlace place = mkQS (mkQCl where_IAdv (mkCl place.name ser) ) ; - WherePerson person = mkQS (mkQCl where_IAdv (mkCl person.name ser) ) ; oper - ser = mkV (ser_52 "ser") ; CNPlace : Type = {name : CN ; at : Prep ; to : Prep } ; diff --git a/examples/phrasebook/SentencesSpa.gf b/examples/phrasebook/SentencesSpa.gf index db378bd89..162d5ab78 100644 --- a/examples/phrasebook/SentencesSpa.gf +++ b/examples/phrasebook/SentencesSpa.gf @@ -3,6 +3,7 @@ concrete SentencesSpa of Sentences = NumeralSpa ** SentencesI - [ IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale, WeMale, WeFemale, YouPlurFamMale, YouPlurFamFemale, YouPlurPolFemale, YouPlurPolMale, TheyMale, TheyFemale, WherePlace, WherePerson, ABePlace, + PImperativeFamNeg, PImperativePlurNeg, --negative imperatives in subjunctive Superlative ] with @@ -53,6 +54,13 @@ flags coding = utf8 ; TheyFemale = {name = mkNP (ProDrop they8fem_Pron) ; isPron = True ; poss = mkQuant they_Pron} ; + --IL 2012-10-12 + --Negative imperative is done with subjunctive. + --PImperativePolNeg is fine in RGL, but fam and plur are wrong + --A special ImpNeg in ExtraSpa is defined for that + PImperativeFamNeg v = phrasePlease (ImpNeg (mkNP (ProDrop youSg_Pron)) v) ; + PImperativePlurNeg v = phrasePlease (ImpNeg (mkNP (ProDrop youPl_Pron)) v) ; + ABePlace p place = mkCl p.name (mkVP (mkVP estar) place.at) ; WherePlace place = mkQS (mkQCl where_IAdv (mkCl place.name estar) ) ; diff --git a/examples/phrasebook/WordsCat.gf b/examples/phrasebook/WordsCat.gf index feedc2ca9..ae301792a 100644 --- a/examples/phrasebook/WordsCat.gf +++ b/examples/phrasebook/WordsCat.gf @@ -210,12 +210,22 @@ lin -- transports - HowFar place = mkQS (mkQCl far_IP place.name placeCopula) ; - HowFarFrom x y = mkQS (mkQCl (mkIP far_IP (S.mkAdv from_Prep x.name)) y.name placeCopula) ; - HowFarFromBy x y t = mkQS (mkQCl how8much_IAdv - (mkCl (mkVP (mkVP (mkVP (mkVP (mkV "durar")) (S.mkAdv desde_Prep x.name)) (S.mkAdv fins_Prep y.name)) t ))) ; - HowFarBy y t = mkQS (mkQCl how8much_IAdv - (mkCl (mkVP (mkVP (mkVP (mkV "durar")) (S.mkAdv fins_Prep y.name)) t ))) ; + --a quina distŕncia estŕ PLACE + HowFar place = mkQS (mkQCl what_distance_IAdv (mkCl place.name placeCopula) ); + + HowFarFrom x y = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP (mkVP placeCopula) + (S.mkAdv from_Prep x.name)))); + + HowFarFromBy x y t = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP + (mkVP (mkVP placeCopula) + (S.mkAdv from_Prep x.name)) + t))); + + HowFarBy y t = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP (mkVP placeCopula) t))); + WhichTranspPlace trans place = mkQS (mkQCl (mkIP which_IDet trans.name) (mkVP (mkVP L.go_V) place.to)) ; IsTranspPlace trans place = @@ -223,10 +233,10 @@ lin -- modifiers of places TheBest = mkSuperl L.good_A True ; - TheClosest = mkSuperl L.near_A False; + TheClosest = mkSuperl L.near_A False; TheCheapest = mkSuperl cheap_A False ; TheMostExpensive = mkSuperl expensive_A False ; - TheMostPopular = mkSuperl (mkA "popular") False ; + TheMostPopular = mkSuperl (mkA "popular" "popular" "populars" "populars" "popularment") False ; TheWorst = mkSuperl L.bad_A True ; SuperlPlace sup p = placeNPSuperl sup p ; @@ -240,13 +250,12 @@ lin isPre = bool ; } ; - desde_Prep = mkPrep "des de" ; - + desde_Prep = mkPrep "des de" ; fins_Prep = mkPrep "fins a" ; - far_IP = mkIP whatSg_IP (S.mkAdv (P.mkAdA "tan") (P.mkAdv "lluny")) ; + what_distance_IAdv = ss "a quina distŕncia"**{lock_IAdv=<>}; - placeCopula = mkV2 (mkV (estar_54 "estar")) ; + placeCopula = mkV (estar_54 "estar") ; mkNat : Str -> Str -> NPNationality = \nat,co -> mkNPNationality (mkNP (mkPN nat)) (mkNP (mkPN co)) (mkA nat) ; @@ -281,9 +290,9 @@ lin closed_A = mkA "tancat" ; - cheap_A = mkA "barat" ; + cheap_A = mkA "barat" "barata" ; - expensive_A = mkA "car" ; + expensive_A = mkA "car" ; } diff --git a/examples/phrasebook/WordsSpa.gf b/examples/phrasebook/WordsSpa.gf index 6c195669f..611a466ae 100644 --- a/examples/phrasebook/WordsSpa.gf +++ b/examples/phrasebook/WordsSpa.gf @@ -23,7 +23,7 @@ lin Cheese = mkCN (mkN "queso") ; Chicken = mkCN (mkN "pollo") ; Coffee = mkCN (mkN "cafĂ©" "cafĂ©s" masculine) ; - Fish = mkCN L.fish_N ; + Fish = mkCN (mkN "pescado") ; Meat = mkCN (mkN "carne" feminine) ; Milk = mkCN L.milk_N ; Pizza = mkCN (mkN "pizza") ; @@ -55,7 +55,7 @@ lin Center = mkPlace (mkN "centro") in_Prep; Church = mkPlace (mkN "iglesia") in_Prep ; Cinema = mkPlace (mkN "cine") in_Prep ; - Disco = mkPlace (mkN "disco") in_Prep; + Disco = mkPlace (mkN "discoteca") in_Prep; Hospital = mkPlace (mkN "hospital") in_Prep ; Hotel = mkPlace (mkN "hotel") in_Prep ; Museum = mkPlace (mkN "museo") in_Prep ; @@ -90,23 +90,23 @@ lin -- nationalities - Belgian = belgian_A ; + Belgian = mkA "belga" ; Belgium = mkNP (mkPN "BĂ©lgica") ; - Bulgarian = mkNat (mkA "bulgaro") "bulgaro" "Bulgaria" ; - Catalan = mkNat catalan_A "catalán" "Cataluña" ; - Danish = mkNat danish_A "danĂ©s" "Dinamarca" ; - Dutch = mkNat dutch_A "neerlandĂ©s" "Holanda" ; - English = mkNat english_A "inglĂ©s" "Inglaterra" ; - Finnish = mkNat finnish_A "finĂ©s" "Finlandia" ; + Bulgarian = mkNat (mkA "bĂşlgaro") "bĂşlgaro" "Bulgaria" ; --TODO: tarkista + Catalan = mkNat (mkA "catalán") "catalán" "Cataluña" ; + Danish = mkNat (mkA "danĂ©s") "danĂ©s" "Dinamarca" ; + Dutch = mkNat (mkA "neerlandĂ©s") "neerlandĂ©s" "Holanda" ; + English = mkNat (mkA "inglĂ©s") "inglĂ©s" "Inglaterra" ; + Finnish = mkNat (mkA "finlandĂ©s") "finĂ©s" "Finlandia" ; Flemish = mkNP (mkPN "flamenco") ; - French = mkNat french_A "francĂ©s" "Francia" ; - German = mkNat german_A "alemán" "Alemania" ; + French = mkNat (mkA "francĂ©s") "francĂ©s" "Francia" ; + German = mkNat (mkA "alemán") "alemán" "Alemania" ; Italian = mkNat (mkA "italiano") "italiano" "Italia" ; Norwegian = mkNat (mkA "noruego") "noruego" "Noruega" ; Polish = mkNat (mkA "polaco") "polaco" "Polonia" ; Romanian = mkNat (mkA "rumano") "rumano" "Rumania" ; Russian = mkNat (mkA "ruso") "ruso" "Rusia" ; - Spanish = mkNat spanish_A "español" "España" ; + Spanish = mkNat (mkA "español" "española") "español" "España" ; Swedish = mkNat (mkA "sueco") "sueco" "Suecia" ; -- means of transportation @@ -115,7 +115,7 @@ lin Bus = mkTransport (mkN "autobĂşs" "autobuses" masculine) ; Car = mkTransport L.car_N | mkTransport (mkN "coche") ; Ferry = mkTransport (mkN "ferry") | mkTransport (mkN "transbordador") ; - Plane = mkTransport (mkN "aviĂłn" "aviones" feminine) ; + Plane = mkTransport (mkN "aviĂłn" "aviones" masculine) ; Subway = mkTransport (mkN "metro") ; Taxi = mkTransport (mkN "taxi" masculine) ; Train = mkTransport (mkN "tren") ; @@ -198,29 +198,30 @@ lin -- transports - -- "quĂ© tan lejos está PLACE" - HowFar place = mkQS (mkQCl far_IP place.name placeCopula) ; + --a quĂ© distancia está PLACE + HowFar place = mkQS (mkQCl what_distance_IAdv (mkCl place.name placeCopula) ); + + --a quĂ© distancia está X de Y + HowFarFrom x y = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP (mkVP placeCopula) + (S.mkAdv from_Prep x.name)))); - -- "quĂ© tan lejos de X está Y" - HowFarFrom x y = mkQS (mkQCl (mkIP far_IP (S.mkAdv from_Prep x.name)) y.name placeCopula) ; - - -- "cuánto dura desde X hasta Y con T" + -- "a quĂ© distancia está X de Y con T" -- x,y: Place ; t: ByTransport - HowFarFromBy x y t = mkQS (mkQCl how8much_IAdv - (mkCl (mkVP (mkVP (mkVP (mkVP (mkV "durar")) (S.mkAdv desde_Prep x.name)) (S.mkAdv hasta_Prep y.name)) t ))) ; + HowFarFromBy x y t = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP + (mkVP (mkVP placeCopula) + (S.mkAdv from_Prep x.name)) + t))); - -- "cuánto dura hasta Y con T" + -- "a quĂ© distancia está Y con T" -- y: Place ; t: ByTransport - HowFarBy y t = mkQS (mkQCl how8much_IAdv - (mkCl (mkVP (mkVP (mkVP (mkV "durar")) (S.mkAdv hasta_Prep y.name)) t ))) ; - + HowFarBy y t = mkQS (mkQCl what_distance_IAdv + (mkCl y.name (mkVP (mkVP placeCopula) t))); oper - far_IP = mkIP whatSg_IP (S.mkAdv (P.mkAdA "tan") (P.mkAdv "lejos")) ; -- "quĂ© tan lejos" - how8much_IAdv = ss "cuánto" ; -- this wasn't implemented in the resource library - desde_Prep = mkPrep "desde" ; - hasta_Prep = mkPrep "hasta" ; - placeCopula = mkV2 (mkV (estar_2 "estar")) ; + what_distance_IAdv = ss "a quĂ© distancia"**{lock_IAdv=<>}; + placeCopula = mkV (estar_2 "estar") ; lin WhichTranspPlace trans place = @@ -251,7 +252,7 @@ lin TheCheapest = mkSuperl cheap_A False ; TheMostExpensive = mkSuperl expensive_A False ; TheMostPopular = - let popular = mkA "popular" "popular" "populares" "populares" "popularmente" + let popular = mkA "popular" --"popular" "populares" "populares" "popularmente" in mkSuperl popular False ; TheWorst = mkSuperl L.bad_A True ; @@ -297,17 +298,4 @@ lin open_A = mkA "abierto" ; closed_A = mkA "cerrado" ; - -- The nationalities - -- There is no constructor in resource grammar that handles the accent correctly in "francĂ©s - francesa - franceses" etc. - -- The fifth form (adverb) is of course not needed, but the constructor wants 5 forms - belgian_A = mkA "belga" "belga" "belgas" "belgas" "belgamente" ; - catalan_A = mkA "catalán" "catalana" "catalanes" "catalanas" "catalanamente" ; - danish_A = mkA "danĂ©s" "danesa" "daneses" "danesas" "danesamente" ; - dutch_A = mkA "neerlandĂ©s" "neerlandesa" "neerlandeses" "neerlandesas" "neerlandesamente" ; - english_A = mkA "inglĂ©s" "inglesa" "ingleses" "inglesas" "inglesamente" ; - finnish_A = mkA "finlandĂ©s" "finlandesa" "finlandeses" "finlandesas" "finlandesamente" ; - french_A = mkA "francĂ©s" "francesa" "franceses" "francesas" "francesamente" ; - german_A = mkA "alemán" "alemana" "alemanes" "alemanas" "alemanamente" ; - spanish_A = mkA "español" "española" "españoles" "españolas" "españolamente" ; - }