1
0
forked from GitHub/gf-rgl

Extend.ReflPossPron added and implemented for Swe, Cze, Slo

This commit is contained in:
aarneranta
2020-11-27 10:02:31 +01:00
parent 9594ee9cf2
commit 6fee9d712a
13 changed files with 106 additions and 8 deletions

View File

@@ -193,6 +193,9 @@ abstract Extend = Cat ** {
Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself Cons_nr_RNP : NP -> RNPList -> RNPList ; -- John, my family, myself
---- Cons_rn_RNP : RNP -> ListNP -> RNPList ; -- myself, John, Mary ---- 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 --- from Extensions

View File

@@ -79,6 +79,7 @@ lin
Base_rn_RNP = variants {} ; -- RNP -> NP -> RNPList ; -- myself, John Base_rn_RNP = variants {} ; -- RNP -> NP -> RNPList ; -- myself, John
Cons_rr_RNP = variants {} ; -- RNP -> RNPList -> RNPList ; -- my family, myself, John Cons_rr_RNP = variants {} ; -- RNP -> RNPList -> RNPList ; -- my family, myself, John
Cons_nr_RNP = variants {} ; -- NP -> RNPList -> RNPList ; -- John, my family, myself 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 ComplGenVV = variants {} ; -- VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
ComplSlashPartLast = ComplSlash ; ComplSlashPartLast = ComplSlash ;
--SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept --SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept

View File

@@ -1,6 +1,7 @@
--# -path=.:../abstract:../common:../api --# -path=.:../abstract:../common:../api
concrete AllCze of AllCzeAbs = concrete AllCze of AllCzeAbs =
LangCze LangCze,
ExtendCze
; ;

View File

@@ -1,6 +1,7 @@
--# -path=.:../abstract:../common:prelude --# -path=.:../abstract:../common:prelude
abstract AllCzeAbs = abstract AllCzeAbs =
Lang Lang,
Extend
; ;

View File

@@ -24,6 +24,7 @@ concrete CatCze of Cat =
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
V = ResCze.VerbForms ; V = ResCze.VerbForms ;
V2 = ResCze.VerbForms ** {c : ComplementCase} ; V2 = ResCze.VerbForms ** {c : ComplementCase} ;
VS,VQ = ResCze.VerbForms ;
A = ResCze.AdjForms ; A = ResCze.AdjForms ;
AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}

38
src/czech/ExtendCze.gf Normal file
View File

@@ -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 ;
}

View File

@@ -632,8 +632,6 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
a : Agr a : Agr
} ; } ;
---- TODO: possessives
personalPron : Agr -> PronForms = \a -> personalPron : Agr -> PronForms = \a ->
{a = a ; cnom = []} ** {a = a ; cnom = []} **
case a of { 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 -> mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a ->
personalPron a ** {poss = possessivePron a} ; personalPron a ** {poss = possessivePron a} ;

View File

@@ -1,6 +1,7 @@
--# -path=.:../abstract:../common:../api --# -path=.:../abstract:../common:../api
concrete AllSlo of AllSloAbs = concrete AllSlo of AllSloAbs =
LangSlo LangSlo,
ExtendSlo
; ;

View File

@@ -1,6 +1,7 @@
--# -path=.:../abstract:../common:prelude --# -path=.:../abstract:../common:prelude
abstract AllSloAbs = abstract AllSloAbs =
Lang Lang,
Extend
; ;

View File

@@ -24,6 +24,7 @@ concrete CatSlo of Cat =
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
V = ResSlo.VerbForms ; V = ResSlo.VerbForms ;
V2 = ResSlo.VerbForms ** {c : ComplementCase} ; V2 = ResSlo.VerbForms ** {c : ComplementCase} ;
VS,VQ = ResSlo.VerbForms ;
A = ResSlo.AdjForms ; A = ResSlo.AdjForms ;
AP = ResSlo.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str} AP = ResSlo.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}

38
src/slovak/ExtendSlo.gf Normal file
View File

@@ -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 ;
}

View File

@@ -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 -> mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a ->
personalPron a ** {poss = possessivePron a} ; personalPron a ** {poss = possessivePron a} ;

View File

@@ -12,14 +12,16 @@ concrete ExtendSwe of Extend = CatSwe **
ICompAP,ProDrop,EmbedSSlash, ICompAP,ProDrop,EmbedSSlash,
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP, AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP, 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, CompoundN, CompoundAP, AdvIsNP,
UttAccNP UttAccNP
] ]
with (Grammar = GrammarSwe) with (Grammar = GrammarSwe)
** **
open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe, 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 ; flags coding=utf8 ;
@@ -207,6 +209,8 @@ concrete ExtendSwe of Extend = CatSwe **
Cons_rr_RNP x xs = consrTable Agr comma x xs ; Cons_rr_RNP x xs = consrTable Agr comma x xs ;
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
ReflPossPron = M.mkQuant "sin" "sitt" "sina" ;
lin lin
ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ; ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;