diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 134a6a8b..21e7b8f9 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -267,6 +267,7 @@ abstract Extend = Cat ** { weFem_Pron : Pron ; -- we (Fem) youPlFem_Pron : Pron ; -- you plural (Fem) theyFem_Pron : Pron ; -- they (Fem) + theyNeutr_Pron : Pron ; -- they (Neutr) youPolFem_Pron : Pron ; -- you polite (Fem) youPolPl_Pron : Pron ; -- you polite plural (Masc) youPolPlFem_Pron : Pron ; -- you polite plural (Fem) @@ -298,4 +299,7 @@ fun PlSurname : SN -> PN ; FullName : GN -> SN -> PN ; +fun + AnaphPron : NP -> Pron ; + } diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index f9a30e7c..47c845d5 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -321,5 +321,17 @@ lin FullName gn sn = { gn = GSg (sex2gender gn.g) } ; +lin AnaphPron np = + case of { + => i_Pron ; + => youSg_Pron ; + => he_Pron ; + => she_Pron ; + => it_Pron ; + => we_Pron ; + => youPl_Pron ; + => they_Pron + } ; + } diff --git a/src/chinese/CatChi.gf b/src/chinese/CatChi.gf index 2470cf82..15398e15 100644 --- a/src/chinese/CatChi.gf +++ b/src/chinese/CatChi.gf @@ -89,4 +89,5 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu linref S = linS ; + Prep = linPrep ; } diff --git a/src/chinese/ExtendChi.gf b/src/chinese/ExtendChi.gf index d0d117ff..36255bff 100644 --- a/src/chinese/ExtendChi.gf +++ b/src/chinese/ExtendChi.gf @@ -1,10 +1,69 @@ --# -path=alltenses:../common:../abstract concrete ExtendChi of Extend = CatChi ** - ExtendFunctor - [ProDrop,ComplDirectVS, ComplDirectVQ] - with (Grammar=GrammarChi) ** open Prelude, ResChi in { + ExtendFunctor - [ + VPS, ListVPS, VPI, ListVPI + , MkVPS, BaseVPS, ConsVPS, ConjVPS + , PredVPS, SQuestVPS, RelVPS --, QuestVPS -- TODO + , MkVPI, BaseVPI, ConsVPI, ConjVPI --, ComplVPIVV -- TODO + , VPS2, ListVPS2, VPI2, ListVPI2 + , MkVPS2, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, ReflVPS2 + , MkVPI2, BaseVPI2, ConsVPI2, ConjVPI2, ComplVPI2 + , ProDrop, ComplDirectVS, ComplDirectVQ + , PassVPSlash, PassAgentVPSlash ] + with (Grammar=GrammarChi) ** open + Prelude + , Coordination + , ResChi + , (S=StructuralChi) + in { + + lincat + VPS, VPI = SS ; + [VPS], [VPI] = ListX ; + VPS2, VPI2 = SS ** {c2 : Preposition ; isPre : Bool} ; -- whether the missing arg is before verb + [VPS2], [VPI2] = ListX ** {c2 : Preposition ; isPre : Bool} ; lin + PassVPSlash vps = insertAdv (mkNP passive_s) vps ; + PassAgentVPSlash vps np = insertAdv (ss (appPrep S.by8agent_Prep np.s)) (insertAdv (mkNP passive_s) vps) ; + + MkVPS t p vp = {s = t.s ++ p.s ++ (mkClause [] vp).s ! p.p ! t.t} ; + ConjVPS c = conjunctDistrSS (c.s ! CSent) ; + BaseVPS = twoSS ; + ConsVPS = consrSS duncomma ; + + -- : NP -> VPS -> S ; -- she [has walked and won't sleep] + PredVPS np vps = {preJiu = np.s ; postJiu = vps.s} ; + + -- : NP -> VPS -> QS ; -- has she walked + SQuestVPS np vps = {s = \\_ => np.s ++ vps.s ++ question_s} ; + + -- : IP -> VPS -> QS ; -- who has walked + -- QuestVPS ip vps = -- TODO: probably need to change structure of VPS + + -- : RP -> VPS -> RS ; -- which won't sleep + RelVPS rp vps = {s = rp.s ! True ++ vps.s} ; + + MkVPI vp = {s = (mkClause [] vp).s ! Pos ! APlain} ; + ConjVPI c = conjunctDistrSS (c.s ! CSent) ; + BaseVPI = twoSS ; + ConsVPI = consrSS duncomma ; + + MkVPS2 t p vps = {s = t.s ++ p.s ++ (mkClause [] ).s ! p.p ! t.t} ** vps ; + ConjVPS2 c vs = conjunctDistrSS (c.s ! CSent) vs ** vs ; + BaseVPS2 v w = twoSS v w ** w ; + ConsVPS2 v vs = consrSS duncomma v vs ** vs ; + + MkVPI2 vps = {s = (mkClause [] ).s ! Pos ! APlain} ** vps ; + ConjVPI2 c vs = conjunctDistrSS (c.s ! CSent) vs ** vs ; + BaseVPI2 v w = twoSS v w ** w ; + ConsVPI2 v vs = consrSS duncomma v vs ** vs ; + + + GenNP np = {s,pl = np.s ++ possessive_s ; detType = DTPoss} ; + GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ; + ProDrop pron = pron ** {s = []} ; ComplDirectVS vs utt = AdvVP (UseV ) @@ -14,12 +73,12 @@ concrete ExtendChi of Extend = CatChi ** (mkAdv (":" ++ quoted utt.s)) ; -- DEFAULT complement added as Adv in quotes oper - mkAdv : Str -> Adv ; + mkAdv : Str -> CatChi.Adv ; mkAdv str = lin Adv {s = str ; advType = ATManner ; hasDe = False} ; - + lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ; lin FullName gn sn = { s = gn.s ++ sn.s } ; - + }; diff --git a/src/chinese/ResChi.gf b/src/chinese/ResChi.gf index 9ed6c7a5..ff904063 100644 --- a/src/chinese/ResChi.gf +++ b/src/chinese/ResChi.gf @@ -290,6 +290,8 @@ oper hasDe = advTypeHasDe at ; } ; + linPrep : Preposition -> Str = \p -> p.prepPre ++ p.prepPost ; + advTypeHasDe : AdvType -> Bool = \at -> case at of { ATPoss => True ; _ => False diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index 98c7dba5..667b6791 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -114,6 +114,7 @@ lin weFem_Pron = we_Pron ; -- DEFAULT we (masc) youPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc) theyFem_Pron = they_Pron ; -- DEFAULT they (masc) + theyNeutr_Pron = they_Pron ; -- DEFAULT they (masc) youPolFem_Pron = youPol_Pron ; -- DEFAULT you polite (masc) youPolPl_Pron = youPl_Pron ; -- DEFAULT you plural (masc) youPolPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc) diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index 48b0732b..94e87a49 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -18,7 +18,7 @@ concrete ExtendEng of Extend = PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPSVV, PredetRNP, PrepCN, EmbedSSlash, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, A2VPSlash, N2VPSlash, - CardCNCard, ProDrop + CardCNCard, ProDrop, theyFem_Pron, theyNeutr_Pron ] with (Grammar = GrammarEng) ** @@ -471,6 +471,9 @@ lin UseDAPFem dap = { lin CardCNCard card cn = {s,sp = \\d,c => card.s ! d ! Nom ++ cn.s ! card.n ! c ; n = Pl} ; +lin theyFem_Pron = mkPron "they" "them" "their" "theirs" plural P3 feminine ; +lin theyNeutr_Pron = mkPron "they" "them" "their" "theirs" plural P3 nonhuman ; + lin GivenName gn = gn ; lin MaleSurname, FemaleSurname = \sn -> sn ; lin FullName gn sn = { @@ -478,4 +481,18 @@ lin FullName gn sn = { g = gn.g } ; +lin AnaphPron np = + case np.a of { + AgP1 Sg => i_Pron ; + AgP1 Pl => we_Pron ; + AgP2 Sg => youSg_Pron ; + AgP2 Pl => youPl_Pron ; + AgP3Sg Masc => he_Pron ; + AgP3Sg Fem => she_Pron ; + AgP3Sg Neutr => it_Pron ; + AgP3Pl Masc => they_Pron ; + AgP3Pl Fem => theyFem_Pron ; + AgP3Pl Neutr => theyNeutr_Pron + } ; + }