diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index a96b384a7..b48daa442 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -137,7 +137,8 @@ abstract Extend = Cat ** { -- proper structure of "it is AP to VP" - PredAPVP : AP -> VP -> Cl ; -- it is good to walk + PredAPVP : AP -> VP -> Cl ; -- it is good to walk + PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk? -- to use an AP as CN or NP without CN diff --git a/src/arabic/ConjunctionAra.gf b/src/arabic/ConjunctionAra.gf index dc330d1a5..0487e1b3c 100644 --- a/src/arabic/ConjunctionAra.gf +++ b/src/arabic/ConjunctionAra.gf @@ -6,6 +6,7 @@ lincat [S] = {s1,s2 : Order => Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : Case => Str ; a : Agr ; empty : Str; isHeavy : Bool} ; + [CN] = {s1,s2 : NTable ; g : Gender ; h : Species ; isDual : Bool ; np : Case => Str ; isHeavy : Bool} ; [AP] = {s1,s2 : Species => Gender => Number => State => Case => Str} ; lin @@ -34,8 +35,17 @@ lin ConsAP = consrTable5 Species Gender Number State Case comma ; ConjAP = conjunctDistrTable5 Species Gender Number State Case ; + BaseCN cn1 cn2 = leanCN cn1 ** twoTable3 Number State Case (leanCN cn1) (leanCN cn2) ; + ConsCN cn cns = leanCN cn ** consrTable3 Number State Case comma (leanCN cn) cns ; + ConjCN conj cns = cns ** conjunctDistrTable3 Number State Case conj cns ; + oper + leanCN : CN -> CN = \cn -> cn ** { + np = \\_ => [] ; + s = \\n,s,c => cn2str cn n s c + } ; + conjAgr : Agr -> Agr -> Agr = \a,b -> { isPron = False ; pgn = let gnA = pgn2gn a.pgn ; gnB = pgn2gn b.pgn in diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index b16e3c603..8c7867d7e 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -63,6 +63,7 @@ lin FrontComplDirectVS = variants {} ; -- NP -> VS -> Utt -> Cl ; -- "I am here", she said FrontComplDirectVQ = variants {} ; -- NP -> VQ -> Utt -> Cl ; -- "where", she asked PredAPVP ap vp = ImpersCl (UseComp (CompAP (SentAP ap (EmbedVP vp)))) ; -- DEFAULT it is (good to walk) + PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk AdjAsCN = variants {} ; -- AP -> CN ; -- a green one ; en grön (Swe) AdjAsNP = variants {} ; -- AP -> NP ; -- green (is good) ReflRNP = variants {} ; -- VPSlash -> RNP -> VP ; -- love my family and myself diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index baef208ac..935b737bb 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -15,7 +15,7 @@ concrete ExtendEng of Extend = FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP, GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP, PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN, - PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, + PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2 ] with @@ -191,6 +191,7 @@ concrete ExtendEng of Extend = ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ; + PredIAdvVP iadv vp = {s = \\t,a,p,q => iadv.s ++ infVP VVInf vp False Simul CPos (agrP3 Sg)} ; NominalizeVPSlashNP vpslash np = let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ; diff --git a/src/persian/ConjunctionPes.gf b/src/persian/ConjunctionPes.gf index a970570f4..1aa4a2e35 100644 --- a/src/persian/ConjunctionPes.gf +++ b/src/persian/ConjunctionPes.gf @@ -35,11 +35,25 @@ concrete ConjunctionPes of Conjunction = BaseAP x y = y ** twoTable Mod x y ; ConsAP xs x = xs ** consrTable Mod comma xs x ; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ; + BaseCN cn1 cn2 = leanCN cn1 ** twoTable2 Number Mod (leanCN cn1) (leanCN cn2) ; + ConsCN cn cns = leanCN cn ** consrTable2 Number Mod comma (leanCN cn) cns ; + ConjCN conj cns = cns ** conjunctDistrTable2 Number Mod conj cns ; + lincat [S] = {s1,s2 : VVForm => Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : Mod => Str} ** BaseNP ; + [CN] = {s1,s2 : Number => Mod => Str ; + animacy : Animacy ; + isCmpd : CmpdStatus; + hasAdj : Bool ; + compl : Number => Str} ; [AP] = {s1,s2 : Mod => Str ; adv : Str ; isPre : Bool} ; [RS] = {s1,s2 : Agr => Str ; rp : RelPron => Str} ; +oper + leanCN : CN -> CN = \cn -> cn ** { + compl = \\n => [] ; + s = \\n,m => cn.s ! n ! m ++ cn.compl ! n ; + } ; } diff --git a/src/romance/ExtendRomanceFunctor.gf b/src/romance/ExtendRomanceFunctor.gf index 85731c31c..ef2b2f6eb 100644 --- a/src/romance/ExtendRomanceFunctor.gf +++ b/src/romance/ExtendRomanceFunctor.gf @@ -190,6 +190,8 @@ incomplete concrete ExtendRomanceFunctor of Extend = InOrderToVP = variants {} ; -- VP -> Adv ; -- (in order) to publish the document + PredIAdvVP iadv vp = {s = \\_,_,_,_ => iadv.s ++ infStr vp} ; + ApposNP np1 np2 = np1 ** { s = \\c => { c1 = (np1.s ! c).c1 ++ (np2.s ! c).c1 ; diff --git a/src/spanish/DictSpa.gf b/src/spanish/DictSpa.gf index 129f1388d..03a177658 100644 --- a/src/spanish/DictSpa.gf +++ b/src/spanish/DictSpa.gf @@ -2726,7 +2726,7 @@ lin afuera_Adv = mkAdv "afuera" ; lin afueras_N = mkN "afueras" ; lin afán_N = mkN "afán" ; lin aféresis_N = mkN "aféresis" ; -lin afín_A = mkA "afín" ; +lin afín_A = mkA "afín" "afín" "afines" "afines" "afínmente" ; lin afín_N = mkN "afín" ; lin afónico_A = mkA "afónico" ; lin aga_N = mkN "aga" ; @@ -10182,6 +10182,7 @@ lin colmillo_N = mkN "colmillo" ; lin colmo_N = mkN "colmo" ; lin colocación_N = mkN "colocación" ; lin colocación_de_minas_N = mkN colocación_N "de minas" ; +lin colocado_A = mkA "colocado" ; lin colocar_V = mkV "colocar" ; lin colocar_burlete_V = mkV colocar_V "burlete" ; lin colocar_en_barracas_V = mkV colocar_V "en barracas" ; @@ -10567,7 +10568,7 @@ lin comunista_N = mkN "comunista" ; lin comunitario_A = mkA "comunitario" ; lin comunización_N = mkN "comunización" ; lin comunión_N = mkN "comunión" ; -lin común_A = mkA "común" ; +lin común_A = mkA "común" "común" "comunes" "comunes" "comúnmente" ; lin común_y_corriente_A = mkA "común y corriente" "común y corriente" ; lin con_admiracion_Adv = mkAdv "con admiracion" ; lin con_admiración_Adv = mkAdv "con admiración" ; @@ -13259,7 +13260,7 @@ lin dentición_primaria_N = mkAN dentición_N "primaria" ; lin dentición_secundaria_N = mkAN dentición_N "secundaria" ; lin dentista_N = mkN "dentista" ; lin dentro_Adv = mkAdv "dentro" ; -lin dentro_de_Prep = mkPrep "dentro de" ; +lin dentro_de_Prep = mkPrep "dentro" genitive ; lin dentro_del_útero_Adv = mkAdv "dentro del útero" ; lin denturista_N = mkN "denturista" ; lin dentífrico_N = mkN "dentífrico" ; @@ -14305,7 +14306,7 @@ lin digitigrado_N = mkN "digitigrado" ; lin dignidad_N = mkN "dignidad" ; lin dignificar_V = mkV "dignificar" ; lin digno_A = mkA "digno" ; -lin digno_de_Prep = mkPrep "digno de" ; +lin digno_de_Prep = mkPrep "digno" genitive ; lin digoxina_N = mkN "digoxina" ; lin digresión_N = mkN "digresión" ; lin digénesis_N = mkN "digénesis" ; @@ -26028,7 +26029,7 @@ lin marrasquino_N = mkN "marrasquino" ; lin marroquí_N = mkN "marroquí" ; lin marrubio_N = mkN "marrubio" ; lin marrubium_N = mkN "marrubium" ; -lin marrón_A = mkA "marrón" ; +lin marrón_A = mkA "marrón" "marrón" "marrones" "marrones" "marrónmente" ; lin marrón_N = mkN "marrón" ; lin marrón_amarillento_N = mkAN marrón_N "amarillento" ; -- to-check segmentation lin marrón_oliváceo_N = mkAN marrón_N "oliváceo" ; -- to-check segmentation @@ -42686,7 +42687,7 @@ lin emergencia_A = mkA "emergencia" ; lin acrocianosis_N = mkN "acrocianosis" "acrocianosis" feminine ; lin cribado_N = mkN "cribado" ; lin bastoncillo_N = mkN "bastoncillo" ; -lin de_verdad_Adv = mkAdv "de_verdad" ; +lin de_verdad_Adv = mkAdv "de verdad" ; lin monitoreo_N = mkN "monitoreo" ; lin monitorear_V = mkV "monitorear" ; lin levemente_Adv = mkAdv "levemente" ; diff --git a/src/spanish/DictSpaAbs.gf b/src/spanish/DictSpaAbs.gf index ca568d775..f2be624c1 100644 --- a/src/spanish/DictSpaAbs.gf +++ b/src/spanish/DictSpaAbs.gf @@ -10311,6 +10311,7 @@ fun colmillo_N : N ; fun colmo_N : N ; fun colocación_N : N ; fun colocación_de_minas_N : N ; +fun colocado_A : A ; fun colocar_V : V ; fun colocar_burlete_V : V ; fun colocar_en_barracas_V : V ; diff --git a/src/spanish/ExtendSpa.gf b/src/spanish/ExtendSpa.gf index 1514964d9..933446faa 100644 --- a/src/spanish/ExtendSpa.gf +++ b/src/spanish/ExtendSpa.gf @@ -33,33 +33,16 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor - -- put your own definitions here lin - iFem_Pron = mkPronoun - "yo" "me" "me" "mí" - "mi" "mi" "mis" "mis" - Fem Sg P1 ; - theyFem_Pron = mkPronoun - "ellas" "las" "les" "ellas" - "su" "su" "sus" "sus" - Fem Pl P3 ; + iFem_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P1} ; + youFem_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P2} ; + weFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P1} ; + youPlFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P2} ; + theyFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P3} ; - weFem_Pron = mkPronoun - "nosotras" "nos" "nos" "nosotras" - "nuestro" "nuestra" "nuestros" "nuestras" - Fem Pl P1 ; - - youFem_Pron = mkPronoun - "tú" "te" "te" "ti" - "tu" "tu" "tus" "tus" - Fem Sg P2 ; - youPlFem_Pron = mkPronoun - "vosotras" "os" "os" "vosotras" - "vuestro" "vuestra" "vuestros" "vuestras" - Fem Pl P2 ; youPolFem_Pron = mkPronoun "usted" "la" "le" "usted" "su" "su" "sus" "sus" Fem Sg P3 ; - youPolPl_Pron = mkPronoun "ustedes" "los" "les" "ustedes" "su" "su" "sus" "sus" diff --git a/src/spanish/MorphoSpa.gf b/src/spanish/MorphoSpa.gf index 835902765..fbf8fb7dd 100644 --- a/src/spanish/MorphoSpa.gf +++ b/src/spanish/MorphoSpa.gf @@ -164,6 +164,71 @@ oper hasClit = True ; isPol = False } ; +oper + -- To retrieve a matching pronoun for an NP argument. + -- Used in application grammars, please don't remove. /IL + agr2pron : Agr => Pron = table { + {g=Masc ; n=Sg ; p=P1} + => mkPronoun + "yo" "me" "me" "mí" + "mi" "mi" "mis" "mis" + Masc Sg P1 ; + {g=Masc ; n=Sg ; p=P2} + => mkPronoun + "tú" "te" "te" "ti" + "tu" "tu" "tus" "tus" + Masc Sg P2 ; + {g=Masc ; n=Sg ; p=P3} + => mkPronoun + "él" "lo" "le" "él" + "su" "su" "sus" "sus" + Masc Sg P3 ; + {g=Masc ; n=Pl ; p=P1} + => mkPronoun + "nosotros" "nos" "nos" "nosotros" + "nuestro" "nuestra" "nuestros" "nuestras" + Masc Pl P1 ; + {g=Masc ; n=Pl ; p=P2} + => mkPronoun + "vosotros" "os" "os" "vosotros" + "vuestro" "vuestra" "vuestros" "vuestras" + Masc Pl P2 ; + {g=Masc ; n=Pl ; p=P3} + => mkPronoun + "ellos" "los" "les" "ellos" + "su" "su" "sus" "sus" + Masc Pl P3 ; + {g=Fem ; n=Sg ; p=P1} + => mkPronoun + "yo" "me" "me" "mí" + "mi" "mi" "mis" "mis" + Fem Sg P1 ; + {g=Fem ; n=Sg ; p=P2} + => mkPronoun + "tú" "te" "te" "ti" + "tu" "tu" "tus" "tus" + Fem Sg P2 ; + {g=Fem ; n=Sg ; p=P3} + => mkPronoun + "ella" "la" "le" "ella" + "su" "su" "sus" "sus" + Fem Sg P3 ; + {g=Fem ; n=Pl ; p=P1} + => mkPronoun + "nosotras" "nos" "nos" "nosotras" + "nuestro" "nuestra" "nuestros" "nuestras" + Fem Pl P1 ; + {g=Fem ; n=Pl ; p=P2} + => mkPronoun + "vosotras" "os" "os" "vosotras" + "vuestro" "vuestra" "vuestros" "vuestras" + Fem Pl P2 ; + {g=Fem ; n=Pl ; p=P3} + => mkPronoun + "ellas" "las" "les" "ellas" + "su" "su" "sus" "sus" + Fem Pl P3 + } ; --2 Determiners -- diff --git a/src/spanish/StructuralSpa.gf b/src/spanish/StructuralSpa.gf index 050647a24..8efabbabd 100644 --- a/src/spanish/StructuralSpa.gf +++ b/src/spanish/StructuralSpa.gf @@ -43,25 +43,17 @@ lin --- first_Ord = {s = \\ag => (regA "primero").s ! Posit ! AF ag.g ag.n} ; for_Prep = mkPrep "para" ; from_Prep = complGen ; --- - he_Pron = - mkPronoun - "él" "lo" "le" "él" - "su" "su" "sus" "sus" - Masc Sg P3 ; + he_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P3} ; here_Adv = mkAdv "aquí" ; here7to_Adv = mkAdv ["para aquí"] ; here7from_Adv = mkAdv ["de aquí"] ; - how_IAdv = ss "como" ; + how_IAdv = ss "cómo" ; how8many_IDet = mkIDet "cuántos" "cuántas" Pl ; how8much_IAdv = ss "cuánto" ; if_Subj = ss "si" ** {m = Indic} ; if_then_Conj = {s1 = "si" ; s2 = "entonces" ; n = Sg ; lock_Conj = <>} ; in8front_Prep = {s = "delante" ; c = MorphoSpa.genitive ; isDir = False} ; - i_Pron = - mkPronoun - "yo" "me" "me" "mí" - "mi" "mi" "mis" "mis" - Masc Sg P1 ; + i_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P1} ; in_Prep = mkPrep "en" ; it_Pron = mkPronoun @@ -101,11 +93,7 @@ lin please_Voc = ss ["por favor"] ; possess_Prep = complGen ; quite_Adv = ss "bastante" ; - she_Pron = - mkPronoun - "ella" "la" "le" "ella" - "su" "su" "sus" "sus" - Fem Sg P3 ; + she_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P3} ; so_AdA = ss "tanto" ; somebody_NP = pn2np (mkPN "alguien" Masc) ; somePl_Det = mkDeterminer "algunos" "algunas" Pl False ; @@ -117,10 +105,7 @@ lin there7to_Adv = mkAdv ["para allí"] ; there7from_Adv = mkAdv ["de allí"] ; therefore_PConj = ss ["por eso"] ; - they_Pron = mkPronoun - "ellos" "los" "les" "ellos" - "su" "su" "sus" "sus" - Masc Pl P3 ; + they_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P3} ; this_Quant = mkQuantifier "este" "esta" "estos" "estas" ; through_Prep = mkPrep "por" ; too_AdA = ss "demasiado" ; @@ -128,19 +113,15 @@ lin under_Prep = mkPrep "bajo" ; very_AdA = ss "muy" ; want_VV = mkVV (verboV (querer_64 "querer")) ; - we_Pron = - mkPronoun - "nosotros" "nos" "nos" "nosotros" - "nuestro" "nuestra" "nuestros" "nuestras" - Masc Pl P1 ; + we_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P1} ; whatSg_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Sg} ; whatPl_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Pl} ; --- when_IAdv = ss "cuándo" ; when_Subj = ss "cuando" ** {m = Indic} ; where_IAdv = ss "dónde" ; which_IQuant = {s = table { - Sg => \\g,c => prepCase c ++ "cual" ; - Pl => \\g,c => prepCase c ++ "cuales" + Sg => \\g,c => prepCase c ++ "cuál" ; + Pl => \\g,c => prepCase c ++ "cuáles" } } ; whoPl_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Masc Pl} ; @@ -149,15 +130,8 @@ lin without_Prep = mkPrep "sin" ; with_Prep = mkPrep "con" ; yes_Utt = ss "sí" ; - youSg_Pron = mkPronoun - "tú" "te" "te" "ti" - "tu" "tu" "tus" "tus" - Masc Sg P2 ; - youPl_Pron = - mkPronoun - "vosotros" "os" "os" "vosotros" - "vuestro" "vuestra" "vuestros" "vuestras" - Masc Pl P2 ; + youSg_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P2} ; + youPl_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P2} ; youPol_Pron = mkPronoun "usted" "lo" "le" "usted"