1
0
forked from GitHub/gf-rgl

added anteriority

This commit is contained in:
Krasimir Angelov
2024-07-25 21:13:37 +02:00
parent ca385925b6
commit afe544bb29
7 changed files with 86 additions and 68 deletions

View File

@@ -9,7 +9,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
RS = {s : Agr => Str} ; RS = {s : Agr => Str} ;
-- Sentence -- Sentence
Cl = {s : Tense => Polarity => Str} ; Cl = {s : Tense => Anteriority => Polarity => Str} ;
Imp = {s : Polarity => Number => Str} ; Imp = {s : Polarity => Number => Str} ;
-- Noun -- Noun
@@ -17,7 +17,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
NP = {s : Case => Str ; h : Harmony; a : Agr} ; NP = {s : Case => Str ; h : Harmony; a : Agr} ;
-- Relative -- Relative
RCl = {s : Tense => Polarity => Agr => Str} ; RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ;
RP = {s : Agr => Str} ; RP = {s : Agr => Str} ;
-- Verb -- Verb

View File

@@ -122,14 +122,14 @@ oper
th "tekil" ++ th "tekil" ++
th "çoğul") ++ th "çoğul") ++
tr (th "1." ++ tr (th "1." ++
td (tbl ! asp ! VFin t Pos {n=Sg; p=P1}) ++ td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P1}) ++
td (tbl ! asp ! VFin t Pos {n=Pl; p=P1})) ++ td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P1})) ++
tr (th "2." ++ tr (th "2." ++
td (tbl ! asp ! VFin t Pos {n=Sg; p=P2}) ++ td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P2}) ++
td (tbl ! asp ! VFin t Pos {n=Pl; p=P2})) ++ td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P2})) ++
tr (th "3." ++ tr (th "3." ++
td (tbl ! asp ! VFin t Pos {n=Sg; p=P3}) ++ td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P3}) ++
td (tbl ! asp ! VFin t Pos {n=Pl; p=P3})) td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P3}))
) ; ) ;
} ; } ;
} }

View File

@@ -195,7 +195,7 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, ParamX,
PPartNP np v2 = { PPartNP np v2 = {
s = \\c => np.s ! c s = \\c => np.s ! c
++ mkVerbForms v2 ! Perf ! VFin Past Pos np.a --# notpresent ++ mkVerbForms v2 ! Perf ! VFin Past Simul Pos np.a --# notpresent
; ;
h = np.h ; h = np.h ;
a = np.a a = np.a

View File

@@ -4,11 +4,15 @@ lin
RelCl = variants {} ; RelCl = variants {} ;
RelVP rp vp = { RelVP rp vp = {
s = \\t,p,agr => rp.s ! agr ++ vp.compl ++ s = \\t,a,p,agr =>
case a of {
Simul => rp.s ! agr ++ vp.compl ++
case t of { case t of {
Fut => vp.s ! Perf ! VProspPart p ; Fut => vp.s ! Perf ! VProspPart p ;
_ => vp.s ! Perf ! VImperfPart p _ => vp.s ! Perf ! VImperfPart p
} } ;
Anter => vp.s ! Perf ! VFin t a p agr ++ "olan"
} ;
} ; } ;
RelSlash = variants {} ; RelSlash = variants {} ;

View File

@@ -45,7 +45,7 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
| VPerfPart Polarity | VPerfPart Polarity
| VProspPart Polarity | VProspPart Polarity
| VImp Polarity Number | VImp Polarity Number
| VFin Tense Polarity Agr | VFin Tense Anteriority Polarity Agr
; ;
param param
@@ -168,42 +168,56 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
suffixStr progrHar p2PlImperSuffix suffixStr progrHar p2PlImperSuffix
} }
} ; } ;
VFin t p agr => VFin t a p agr =>
let presHar = mkHar (case v.h.con of { let x = case a of {
SCon _ => case v.aoristType of { Simul => {p=p; v=v} ;
Anter => let part =
v.stems ! VBase Hard ++ BIND ++
case p of {
Pos => suffixStr v.h perfParticipleSuffix ;
Neg => suffixStr v.h negativeSuffix +
suffixStr negHar perfParticipleSuffix
}
in {p=p; v=olmak_V ** {
s = part ++ olmak_V.s ;
stems = \\vf => part ++ olmak_V.stems ! vf
}}
} ;
presHar = mkHar (case x.v.h.con of {
SCon _ => case x.v.aoristType of {
SgSylConReg => Ih_Har ; SgSylConReg => Ih_Har ;
_ => v.h.vow _ => x.v.h.vow
} ; } ;
SVow => v.h.vow SVow => x.v.h.vow
}) (SCon Soft) ; }) (SCon Soft) ;
pastHar = mkHar v.h.vow SVow ; pastHar = mkHar x.v.h.vow SVow ;
pastIHar= mkHar U_Har SVow ; pastIHar= mkHar U_Har SVow ;
futSoft = (verbSuffixes ! agr).stemT ; futSoft = (verbSuffixes ! agr).stemT ;
futHar = mkHar (case v.h.vow of { futHar = mkHar (case x.v.h.vow of {
I_Har | U_Har => I_Har ; I_Har | U_Har => I_Har ;
Ih_Har | Uh_Har => Ih_Har Ih_Har | Uh_Har => Ih_Har
}) (SCon futSoft) ; }) (SCon futSoft) ;
presNegHar = presNegHar =
mkHar negHar.vow (SCon Soft) mkHar negHar.vow (SCon Soft)
in case p of { in case x.p of {
Pos => case t of { Pos => case t of {
Pres => case asp of { Pres => case asp of {
Perf => v.stems ! VBase Soft ++ BIND ++ Perf => x.v.stems ! VBase Soft ++ BIND ++
suffixStr v.h (case v.aoristType of { suffixStr x.v.h (case x.v.aoristType of {
SgSylConReg => aoristErSuffix ; SgSylConReg => aoristErSuffix ;
_ => aoristIrSuffix _ => aoristIrSuffix
}) + }) +
suffixStr presHar (verbSuffixes ! agr) ; suffixStr presHar (verbSuffixes ! agr) ;
Imperf => v.stems ! VProg ++ BIND ++ Imperf => x.v.stems ! VProg ++ BIND ++
suffixStr v.h progrSuffix + suffixStr x.v.h progrSuffix +
suffixStr progrHar (verbSuffixes ! agr) suffixStr progrHar (verbSuffixes ! agr)
} ; } ;
Past => case asp of { Past => case asp of {
Perf => v.stems ! VBase Hard ++ BIND ++ Perf => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h pastSuffix + suffixStr x.v.h pastSuffix +
suffixStr pastHar (verbSuffixes ! agr) ; suffixStr pastHar (verbSuffixes ! agr) ;
Imperf => v.stems ! VProg ++ BIND ++ Imperf => x.v.stems ! VProg ++ BIND ++
suffixStr v.h progrSuffix + suffixStr x.v.h progrSuffix +
case agr of { case agr of {
{n=Pl; p=P3} => suffixStr progrHar (verbSuffixes ! agr) + {n=Pl; p=P3} => suffixStr progrHar (verbSuffixes ! agr) +
suffixStr (mkHar Ih_Har (SCon Soft)) pastSuffix ; suffixStr (mkHar Ih_Har (SCon Soft)) pastSuffix ;
@@ -211,49 +225,49 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
suffixStr pastIHar (verbSuffixes ! agr) suffixStr pastIHar (verbSuffixes ! agr)
} }
} ; } ;
Fut => v.stems ! VFuture ++ BIND ++ Fut => x.v.stems ! VFuture ++ BIND ++
suffixStr v.h (case futSoft of { suffixStr x.v.h (case futSoft of {
Soft => softFutureSuffix ; Soft => softFutureSuffix ;
Hard => futureSuffix Hard => futureSuffix
}) + }) +
suffixStr futHar (verbSuffixes ! agr) ; suffixStr futHar (verbSuffixes ! agr) ;
Cond => v.stems ! VBase Hard ++ BIND ++ Cond => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h (condCopulaSuffixes ! agr) suffixStr x.v.h (condCopulaSuffixes ! agr)
} ; } ;
Neg => case t of { Neg => case t of {
Pres => case asp of { Pres => case asp of {
Perf => v.stems ! VBase Hard ++ BIND ++ Perf => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h negativeSuffix + suffixStr x.v.h negativeSuffix +
case agr of { case agr of {
{n=Sg; p=P1} => suffixStr negHar (verbSuffixes ! agr) ; {n=Sg; p=P1} => suffixStr negHar (verbSuffixes ! agr) ;
{n=Pl; p=P1} => suffixStr negHar p1PlAoristSuffix ; {n=Pl; p=P1} => suffixStr negHar p1PlAoristSuffix ;
_ => suffixStr negHar aoristIzSuffix + suffixStr presNegHar (verbSuffixes ! agr) _ => suffixStr negHar aoristIzSuffix + suffixStr presNegHar (verbSuffixes ! agr)
} ; } ;
Imperf => v.stems ! VBase Soft ++ BIND ++ Imperf => x.v.stems ! VBase Soft ++ BIND ++
tk 1 (suffixStr v.h negativeSuffix) + tk 1 (suffixStr x.v.h negativeSuffix) +
suffixStr v.h progrSuffix + suffixStr x.v.h progrSuffix +
suffixStr progrHar (verbSuffixes ! agr) suffixStr progrHar (verbSuffixes ! agr)
} ; } ;
Past => case asp of { Past => case asp of {
Perf => v.stems ! VBase Hard ++ BIND ++ Perf => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h negativeSuffix + suffixStr x.v.h negativeSuffix +
suffixStr negHar pastSuffix + suffixStr negHar pastSuffix +
suffixStr negHar (verbSuffixes ! agr) ; suffixStr negHar (verbSuffixes ! agr) ;
Imperf => v.stems ! VBase Soft ++ BIND ++ Imperf => x.v.stems ! VBase Soft ++ BIND ++
tk 1 (suffixStr v.h negativeSuffix) + tk 1 (suffixStr x.v.h negativeSuffix) +
suffixStr v.h progrSuffix + suffixStr x.v.h progrSuffix +
suffixStr progrHar pastSuffix + suffixStr progrHar pastSuffix +
suffixStr pastIHar (verbSuffixes ! agr) suffixStr pastIHar (verbSuffixes ! agr)
} ; } ;
Fut => v.stems ! VBase Hard ++ BIND ++ Fut => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h negativeSuffix + suffixStr x.v.h negativeSuffix +
suffixStr negHar (case (verbSuffixes ! agr).stemT of { suffixStr negHar (case (verbSuffixes ! agr).stemT of {
Soft => softFutureSuffix ; Soft => softFutureSuffix ;
Hard => futureSuffix Hard => futureSuffix
}) + }) +
suffixStr futHar (verbSuffixes ! agr) ; suffixStr futHar (verbSuffixes ! agr) ;
Cond => v.stems ! VBase Hard ++ BIND ++ Cond => x.v.stems ! VBase Hard ++ BIND ++
suffixStr v.h negativeSuffix + suffixStr x.v.h negativeSuffix +
suffixStr negHar (condCopulaSuffixes ! agr) suffixStr negHar (condCopulaSuffixes ! agr)
} }
} }
@@ -325,4 +339,10 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
{n=Pl; p=P3} => p3PlCondCopulaSuffix {n=Pl; p=P3} => p3PlCondCopulaSuffix
} ; } ;
olmak_V : Verb = {
s = "olmak" ;
stems = \\_ => "ol" ;
aoristType = SgSylConIrreg ;
h = mkHar U_Har (SCon Soft)
} ;
} }

View File

@@ -1,18 +1,18 @@
concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in { concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
lin lin
PredVP np vp = {s = \\t,p => np.s ! Nom ++ vp.compl ++ vp.s ! Perf ! VFin t p np.a} ; PredVP np vp = {s = \\t,a,p => np.s ! Nom ++ vp.compl ++ vp.s ! Perf ! VFin t a p np.a} ;
PredSCVP sc vp = variants {} ; PredSCVP sc vp = variants {} ;
-- TODO: Check how correct this is. -- TODO: Check how correct this is.
EmbedVP vp = variants {} ; -- {s = (vp.s ! Gerund Sg Acc)} ; EmbedVP vp = variants {} ; -- {s = (vp.s ! Gerund Sg Acc)} ;
UseCl temp pol cl = {s = temp.s ++ pol.s ++ cl.s ! temp.t ! pol.p} ; UseCl temp pol cl = {s = temp.s ++ pol.s ++ cl.s ! temp.t ! temp.a ! pol.p} ;
UseQCl _ _ = variants {} ; UseQCl _ _ = variants {} ;
UseRCl temp pol cl = {s = \\agr => temp.s ++ pol.s ++ cl.s ! temp.t ! pol.p ! agr} ; UseRCl temp pol cl = {s = \\agr => temp.s ++ pol.s ++ cl.s ! temp.t ! temp.a ! pol.p ! agr} ;
SlashVP _ _ = variants {} ; SlashVP _ _ = variants {} ;
AdvSlash _ _ = variants {} ; AdvSlash _ _ = variants {} ;
@@ -25,8 +25,10 @@ concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
ImpVP vp = {s = \\p,n => vp.compl ++ vp.s ! Perf ! VImp p n ImpVP vp = {s = \\p,n => vp.compl ++ vp.s ! Perf ! VImp p n
} ; } ;
AdvS _ _ = variants {} ; AdvS adv s = {
s = adv.s ++ s.s
} ;
UseSlash _ = variants {} ; UseSlash _ = variants {} ;
} }

View File

@@ -33,7 +33,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
CompNP np = { CompNP np = {
s = \\asp,vform => s = \\asp,vform =>
case <asp,vform> of { case <asp,vform> of {
<Perf,VFin Pres p agr> <Perf,VFin Pres Simul p agr>
=> np.s ! Nom ++ => np.s ! Nom ++
case <agr,p> of { case <agr,p> of {
<{n=Sg; p=P3},Pos> => [] ; <{n=Sg; p=P3},Pos> => [] ;
@@ -46,7 +46,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
}) SVow }) SVow
in suffixStr negHar (verbSuffixes ! agr)) in suffixStr negHar (verbSuffixes ! agr))
} ; } ;
<Perf,VFin Past p agr> <Perf,VFin Past Simul p agr>
=> np.s ! Nom ++ BIND ++ => np.s ! Nom ++ BIND ++
case p of { case p of {
Pos => [] ; Pos => [] ;
@@ -64,7 +64,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
case <asp,vform> of { case <asp,vform> of {
<_,VImp p n> => ap.s ! n ! Nom ++ <_,VImp p n> => ap.s ! n ! Nom ++
mkVerbForms olmak_V ! asp ! (VImp p n) ; mkVerbForms olmak_V ! asp ! (VImp p n) ;
<Perf,VFin Pres p agr> => <Perf,VFin Pres Simul p agr> =>
ap.s ! agr.n ! Nom ++ ap.s ! agr.n ! Nom ++
case <agr,p> of { case <agr,p> of {
<{n=Sg; p=P3},Pos> => [] ; <{n=Sg; p=P3},Pos> => [] ;
@@ -79,16 +79,16 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
} }
in suffixStr negHar (verbSuffixes ! agr)) in suffixStr negHar (verbSuffixes ! agr))
} ; } ;
<Perf,VFin Past p agr> => <Perf,VFin Past Simul p agr> =>
ap.s ! agr.n ! Nom ++ BIND ++ ap.s ! agr.n ! Nom ++ BIND ++
case p of { case p of {
Pos => [] ; Pos => [] ;
Neg => suffixStr ap.h negativeSuffix Neg => suffixStr ap.h negativeSuffix
} + } +
suffixStr ap.h (alethicCopulaSuffixes ! agr) ; suffixStr ap.h (alethicCopulaSuffixes ! agr) ;
<_,VFin t p agr> => <_,VFin t a p agr> =>
ap.s ! agr.n ! Nom ++ ap.s ! agr.n ! Nom ++
mkVerbForms olmak_V ! asp ! (VFin t p agr) ; mkVerbForms olmak_V ! asp ! vform ;
_ => ap.s ! Sg ! Nom ++ _ => ap.s ! Sg ! Nom ++
mkVerbForms olmak_V ! asp ! vform mkVerbForms olmak_V ! asp ! vform
} ; } ;
@@ -129,12 +129,4 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
compl = [] compl = []
} ; } ;
oper
olmak_V : V = lin V {
s = "olmak" ;
stems = \\_ => "ol" ;
aoristType = SgSylConIrreg ;
h = mkHar U_Har (SCon Soft)
} ;
} }