From 6fee9d712aa99fa1c1154417326b518ab2c02a31 Mon Sep 17 00:00:00 2001 From: aarneranta Date: Fri, 27 Nov 2020 10:02:31 +0100 Subject: [PATCH] Extend.ReflPossPron added and implemented for Swe, Cze, Slo --- src/abstract/Extend.gf | 3 +++ src/common/ExtendFunctor.gf | 1 + src/czech/AllCze.gf | 3 ++- src/czech/AllCzeAbs.gf | 3 ++- src/czech/CatCze.gf | 1 + src/czech/ExtendCze.gf | 38 +++++++++++++++++++++++++++++++++++++ src/czech/ResCze.gf | 3 +-- src/slovak/AllSlo.gf | 3 ++- src/slovak/AllSloAbs.gf | 3 ++- src/slovak/CatSlo.gf | 1 + src/slovak/ExtendSlo.gf | 38 +++++++++++++++++++++++++++++++++++++ src/slovak/ResSlo.gf | 9 +++++++++ src/swedish/ExtendSwe.gf | 8 ++++++-- 13 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 src/czech/ExtendCze.gf create mode 100644 src/slovak/ExtendSlo.gf diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 718ffdac..a3b49a63 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -193,6 +193,9 @@ abstract Extend = Cat ** { Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself ---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary +-- reflexive possessive on its own right, like in Swedish, Czech, Slovak + + ReflPossPron : Quant ; -- Swe sin,sitt,sina --- from Extensions diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index 73847677..a8018891 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -79,6 +79,7 @@ lin Base_rn_RNP = variants {} ; -- RNP -> NP -> RNPList ; -- myself, John Cons_rr_RNP = variants {} ; -- RNP -> RNPList -> RNPList ; -- my family, myself, John Cons_nr_RNP = variants {} ; -- NP -> RNPList -> RNPList ; -- John, my family, myself + ReflPossPron = PossPron he_Pron ; -- : Quant ; -- Swe sin,sitt,sina ComplGenVV = variants {} ; -- VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept ComplSlashPartLast = ComplSlash ; --SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept diff --git a/src/czech/AllCze.gf b/src/czech/AllCze.gf index a27d206b..6d25b824 100644 --- a/src/czech/AllCze.gf +++ b/src/czech/AllCze.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:../api concrete AllCze of AllCzeAbs = - LangCze + LangCze, + ExtendCze ; diff --git a/src/czech/AllCzeAbs.gf b/src/czech/AllCzeAbs.gf index 193edeb0..a18b6447 100644 --- a/src/czech/AllCzeAbs.gf +++ b/src/czech/AllCzeAbs.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:prelude abstract AllCzeAbs = - Lang + Lang, + Extend ; diff --git a/src/czech/CatCze.gf b/src/czech/CatCze.gf index 9d21cd1e..31f01a73 100644 --- a/src/czech/CatCze.gf +++ b/src/czech/CatCze.gf @@ -24,6 +24,7 @@ concrete CatCze of Cat = VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- V = ResCze.VerbForms ; V2 = ResCze.VerbForms ** {c : ComplementCase} ; + VS,VQ = ResCze.VerbForms ; A = ResCze.AdjForms ; AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} diff --git a/src/czech/ExtendCze.gf b/src/czech/ExtendCze.gf new file mode 100644 index 00000000..12659f69 --- /dev/null +++ b/src/czech/ExtendCze.gf @@ -0,0 +1,38 @@ +concrete ExtendCze of Extend = CatCze ** + ExtendFunctor - [ + ReflPossPron + ---- constant not found (yet) + ,youPolFem_Pron + ,UttVPShort + ,UttAccIP + ,UttDatIP + ,SubjRelNP + ,StrandRelSlash + ,StrandQuestSlash + ,SlashBareV2S + ,PredIAdvVP + ,PredAPVP + ,ExistsNP + ,ExistS + ,ExistPluralCN + ,ExistNPQS + ,ExistMassCN + ,ExistIPQS + ,ExistCN + ,EmptyRelSlash + ,DetNPMasc + ,DetNPFem + ,ComplBareVS + ,CompIQuant + ,CompBareCN + ] + with (Grammar = GrammarCze) + ** +open + ResCze +in { + +lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; + + +} \ No newline at end of file diff --git a/src/czech/ResCze.gf b/src/czech/ResCze.gf index 5f2d0e46..8e6558cc 100644 --- a/src/czech/ResCze.gf +++ b/src/czech/ResCze.gf @@ -632,8 +632,6 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { a : Agr } ; ----- TODO: possessives - personalPron : Agr -> PronForms = \a -> {a = a ; cnom = []} ** case a of { @@ -753,6 +751,7 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { } ; + reflPossessivePron : DemPronForms = mladyAdjForms "svy" ** {msnom = "svůj" ; pdat = "svým"} ; mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a -> personalPron a ** {poss = possessivePron a} ; diff --git a/src/slovak/AllSlo.gf b/src/slovak/AllSlo.gf index 021062da..19a21153 100644 --- a/src/slovak/AllSlo.gf +++ b/src/slovak/AllSlo.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:../api concrete AllSlo of AllSloAbs = - LangSlo + LangSlo, + ExtendSlo ; diff --git a/src/slovak/AllSloAbs.gf b/src/slovak/AllSloAbs.gf index f7eaf683..4c6ef0a6 100644 --- a/src/slovak/AllSloAbs.gf +++ b/src/slovak/AllSloAbs.gf @@ -1,6 +1,7 @@ --# -path=.:../abstract:../common:prelude abstract AllSloAbs = - Lang + Lang, + Extend ; diff --git a/src/slovak/CatSlo.gf b/src/slovak/CatSlo.gf index 7a5e31f4..bc5b6be9 100644 --- a/src/slovak/CatSlo.gf +++ b/src/slovak/CatSlo.gf @@ -24,6 +24,7 @@ concrete CatSlo of Cat = VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- V = ResSlo.VerbForms ; V2 = ResSlo.VerbForms ** {c : ComplementCase} ; + VS,VQ = ResSlo.VerbForms ; A = ResSlo.AdjForms ; AP = ResSlo.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} diff --git a/src/slovak/ExtendSlo.gf b/src/slovak/ExtendSlo.gf new file mode 100644 index 00000000..c5ff3c5f --- /dev/null +++ b/src/slovak/ExtendSlo.gf @@ -0,0 +1,38 @@ +concrete ExtendSlo of Extend = CatSlo ** + ExtendFunctor - [ + ReflPossPron + ---- constant not found (yet) + ,youPolFem_Pron + ,UttVPShort + ,UttAccIP + ,UttDatIP + ,SubjRelNP + ,StrandRelSlash + ,StrandQuestSlash + ,SlashBareV2S + ,PredIAdvVP + ,PredAPVP + ,ExistsNP + ,ExistS + ,ExistPluralCN + ,ExistNPQS + ,ExistMassCN + ,ExistIPQS + ,ExistCN + ,EmptyRelSlash + ,DetNPMasc + ,DetNPFem + ,ComplBareVS + ,CompIQuant + ,CompBareCN + ] + with (Grammar = GrammarSlo) + ** +open + ResSlo +in { + +lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; + + +} \ No newline at end of file diff --git a/src/slovak/ResSlo.gf b/src/slovak/ResSlo.gf index bfb16f97..ba5f59f1 100644 --- a/src/slovak/ResSlo.gf +++ b/src/slovak/ResSlo.gf @@ -869,6 +869,15 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> { } ; + reflPossessivePron : DemPronForms = otcovA "svoj" ** { + msnom = "svoj" ; msgen = "svojho" ; msdat = "svojmu" ; + msins = "svojím" ; + ampnom = "svoji" ; + nsnom, fpnom = "svoje" ; + pgen = "svojich" ; + pdat = "svojim" ; + pins = "svojimi" ; + } ; mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a -> personalPron a ** {poss = possessivePron a} ; diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index 214d6335..813468fb 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -12,14 +12,16 @@ concrete ExtendSwe of Extend = CatSwe ** ICompAP,ProDrop,EmbedSSlash, AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP, RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP, - Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, + Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron, CompoundN, CompoundAP, AdvIsNP, UttAccNP ] with (Grammar = GrammarSwe) ** open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe, - NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe, (P = ParadigmsSwe) in { + NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe, (P = ParadigmsSwe), + (M = MakeStructuralSwe) +in { flags coding=utf8 ; @@ -207,6 +209,8 @@ concrete ExtendSwe of Extend = CatSwe ** Cons_rr_RNP x xs = consrTable Agr comma x xs ; Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; + ReflPossPron = M.mkQuant "sin" "sitt" "sina" ; + lin ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;