From afe544bb29bcd834821fb51cc788096ec63b7d03 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Thu, 25 Jul 2024 21:13:37 +0200 Subject: [PATCH] added anteriority --- src/turkish/CatTur.gf | 4 +- src/turkish/DocumentationTur.gf | 12 ++--- src/turkish/NounTur.gf | 2 +- src/turkish/RelativeTur.gf | 8 ++- src/turkish/ResTur.gf | 96 ++++++++++++++++++++------------- src/turkish/SentenceTur.gf | 12 +++-- src/turkish/VerbTur.gf | 20 +++---- 7 files changed, 86 insertions(+), 68 deletions(-) diff --git a/src/turkish/CatTur.gf b/src/turkish/CatTur.gf index d6491af12..b57615b4b 100644 --- a/src/turkish/CatTur.gf +++ b/src/turkish/CatTur.gf @@ -9,7 +9,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud RS = {s : Agr => Str} ; -- Sentence - Cl = {s : Tense => Polarity => Str} ; + Cl = {s : Tense => Anteriority => Polarity => Str} ; Imp = {s : Polarity => Number => Str} ; -- Noun @@ -17,7 +17,7 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud NP = {s : Case => Str ; h : Harmony; a : Agr} ; -- Relative - RCl = {s : Tense => Polarity => Agr => Str} ; + RCl = {s : Tense => Anteriority => Polarity => Agr => Str} ; RP = {s : Agr => Str} ; -- Verb diff --git a/src/turkish/DocumentationTur.gf b/src/turkish/DocumentationTur.gf index 0c74b8063..4c66b88fe 100644 --- a/src/turkish/DocumentationTur.gf +++ b/src/turkish/DocumentationTur.gf @@ -122,14 +122,14 @@ oper th "tekil" ++ th "çoğul") ++ tr (th "1." ++ - td (tbl ! asp ! VFin t Pos {n=Sg; p=P1}) ++ - td (tbl ! asp ! VFin t Pos {n=Pl; p=P1})) ++ + td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P1}) ++ + td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P1})) ++ tr (th "2." ++ - td (tbl ! asp ! VFin t Pos {n=Sg; p=P2}) ++ - td (tbl ! asp ! VFin t Pos {n=Pl; p=P2})) ++ + td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P2}) ++ + td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P2})) ++ tr (th "3." ++ - td (tbl ! asp ! VFin t Pos {n=Sg; p=P3}) ++ - td (tbl ! asp ! VFin t Pos {n=Pl; p=P3})) + td (tbl ! asp ! VFin t Simul Pos {n=Sg; p=P3}) ++ + td (tbl ! asp ! VFin t Simul Pos {n=Pl; p=P3})) ) ; } ; } diff --git a/src/turkish/NounTur.gf b/src/turkish/NounTur.gf index 416fca5d7..286f7d1c8 100644 --- a/src/turkish/NounTur.gf +++ b/src/turkish/NounTur.gf @@ -195,7 +195,7 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, ParamX, PPartNP np v2 = { 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 ; a = np.a diff --git a/src/turkish/RelativeTur.gf b/src/turkish/RelativeTur.gf index 1f18621cf..fd852bea2 100644 --- a/src/turkish/RelativeTur.gf +++ b/src/turkish/RelativeTur.gf @@ -4,11 +4,15 @@ lin RelCl = variants {} ; 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 { Fut => vp.s ! Perf ! VProspPart p ; _ => vp.s ! Perf ! VImperfPart p - } + } ; + Anter => vp.s ! Perf ! VFin t a p agr ++ "olan" + } ; } ; RelSlash = variants {} ; diff --git a/src/turkish/ResTur.gf b/src/turkish/ResTur.gf index 230a9c87c..b938f3640 100644 --- a/src/turkish/ResTur.gf +++ b/src/turkish/ResTur.gf @@ -45,7 +45,7 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in { | VPerfPart Polarity | VProspPart Polarity | VImp Polarity Number - | VFin Tense Polarity Agr + | VFin Tense Anteriority Polarity Agr ; param @@ -168,42 +168,56 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in { suffixStr progrHar p2PlImperSuffix } } ; - VFin t p agr => - let presHar = mkHar (case v.h.con of { - SCon _ => case v.aoristType of { + VFin t a p agr => + let x = case a 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 ; - _ => v.h.vow + _ => x.v.h.vow } ; - SVow => v.h.vow + SVow => x.v.h.vow }) (SCon Soft) ; - pastHar = mkHar v.h.vow SVow ; + pastHar = mkHar x.v.h.vow SVow ; pastIHar= mkHar U_Har SVow ; 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 ; Ih_Har | Uh_Har => Ih_Har }) (SCon futSoft) ; presNegHar = mkHar negHar.vow (SCon Soft) - in case p of { + in case x.p of { Pos => case t of { Pres => case asp of { - Perf => v.stems ! VBase Soft ++ BIND ++ - suffixStr v.h (case v.aoristType of { - SgSylConReg => aoristErSuffix ; - _ => aoristIrSuffix - }) + + Perf => x.v.stems ! VBase Soft ++ BIND ++ + suffixStr x.v.h (case x.v.aoristType of { + SgSylConReg => aoristErSuffix ; + _ => aoristIrSuffix + }) + suffixStr presHar (verbSuffixes ! agr) ; - Imperf => v.stems ! VProg ++ BIND ++ - suffixStr v.h progrSuffix + + Imperf => x.v.stems ! VProg ++ BIND ++ + suffixStr x.v.h progrSuffix + suffixStr progrHar (verbSuffixes ! agr) } ; Past => case asp of { - Perf => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h pastSuffix + + Perf => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h pastSuffix + suffixStr pastHar (verbSuffixes ! agr) ; - Imperf => v.stems ! VProg ++ BIND ++ - suffixStr v.h progrSuffix + + Imperf => x.v.stems ! VProg ++ BIND ++ + suffixStr x.v.h progrSuffix + case agr of { {n=Pl; p=P3} => suffixStr progrHar (verbSuffixes ! agr) + suffixStr (mkHar Ih_Har (SCon Soft)) pastSuffix ; @@ -211,49 +225,49 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in { suffixStr pastIHar (verbSuffixes ! agr) } } ; - Fut => v.stems ! VFuture ++ BIND ++ - suffixStr v.h (case futSoft of { + Fut => x.v.stems ! VFuture ++ BIND ++ + suffixStr x.v.h (case futSoft of { Soft => softFutureSuffix ; Hard => futureSuffix }) + suffixStr futHar (verbSuffixes ! agr) ; - Cond => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h (condCopulaSuffixes ! agr) + Cond => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h (condCopulaSuffixes ! agr) } ; Neg => case t of { Pres => case asp of { - Perf => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h negativeSuffix + + Perf => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h negativeSuffix + case agr of { {n=Sg; p=P1} => suffixStr negHar (verbSuffixes ! agr) ; {n=Pl; p=P1} => suffixStr negHar p1PlAoristSuffix ; _ => suffixStr negHar aoristIzSuffix + suffixStr presNegHar (verbSuffixes ! agr) } ; - Imperf => v.stems ! VBase Soft ++ BIND ++ - tk 1 (suffixStr v.h negativeSuffix) + - suffixStr v.h progrSuffix + + Imperf => x.v.stems ! VBase Soft ++ BIND ++ + tk 1 (suffixStr x.v.h negativeSuffix) + + suffixStr x.v.h progrSuffix + suffixStr progrHar (verbSuffixes ! agr) } ; Past => case asp of { - Perf => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h negativeSuffix + + Perf => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h negativeSuffix + suffixStr negHar pastSuffix + suffixStr negHar (verbSuffixes ! agr) ; - Imperf => v.stems ! VBase Soft ++ BIND ++ - tk 1 (suffixStr v.h negativeSuffix) + - suffixStr v.h progrSuffix + + Imperf => x.v.stems ! VBase Soft ++ BIND ++ + tk 1 (suffixStr x.v.h negativeSuffix) + + suffixStr x.v.h progrSuffix + suffixStr progrHar pastSuffix + suffixStr pastIHar (verbSuffixes ! agr) } ; - Fut => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h negativeSuffix + + Fut => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h negativeSuffix + suffixStr negHar (case (verbSuffixes ! agr).stemT of { Soft => softFutureSuffix ; Hard => futureSuffix }) + suffixStr futHar (verbSuffixes ! agr) ; - Cond => v.stems ! VBase Hard ++ BIND ++ - suffixStr v.h negativeSuffix + + Cond => x.v.stems ! VBase Hard ++ BIND ++ + suffixStr x.v.h negativeSuffix + suffixStr negHar (condCopulaSuffixes ! agr) } } @@ -325,4 +339,10 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in { {n=Pl; p=P3} => p3PlCondCopulaSuffix } ; + olmak_V : Verb = { + s = "olmak" ; + stems = \\_ => "ol" ; + aoristType = SgSylConIrreg ; + h = mkHar U_Har (SCon Soft) + } ; } diff --git a/src/turkish/SentenceTur.gf b/src/turkish/SentenceTur.gf index bd5261ea3..4f7c73bf0 100644 --- a/src/turkish/SentenceTur.gf +++ b/src/turkish/SentenceTur.gf @@ -1,18 +1,18 @@ concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in { 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 {} ; -- TODO: Check how correct this is. 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 {} ; - 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 {} ; 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 } ; - AdvS _ _ = variants {} ; - + AdvS adv s = { + s = adv.s ++ s.s + } ; + UseSlash _ = variants {} ; } diff --git a/src/turkish/VerbTur.gf b/src/turkish/VerbTur.gf index 20886c3f5..9c43f97d1 100644 --- a/src/turkish/VerbTur.gf +++ b/src/turkish/VerbTur.gf @@ -33,7 +33,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur CompNP np = { s = \\asp,vform => case of { - + => np.s ! Nom ++ case of { <{n=Sg; p=P3},Pos> => [] ; @@ -46,7 +46,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur }) SVow in suffixStr negHar (verbSuffixes ! agr)) } ; - + => np.s ! Nom ++ BIND ++ case p of { Pos => [] ; @@ -64,7 +64,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur case of { <_,VImp p n> => ap.s ! n ! Nom ++ mkVerbForms olmak_V ! asp ! (VImp p n) ; - => + => ap.s ! agr.n ! Nom ++ case of { <{n=Sg; p=P3},Pos> => [] ; @@ -79,16 +79,16 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur } in suffixStr negHar (verbSuffixes ! agr)) } ; - => + => ap.s ! agr.n ! Nom ++ BIND ++ case p of { Pos => [] ; Neg => suffixStr ap.h negativeSuffix } + suffixStr ap.h (alethicCopulaSuffixes ! agr) ; - <_,VFin t p agr> => + <_,VFin t a p agr> => ap.s ! agr.n ! Nom ++ - mkVerbForms olmak_V ! asp ! (VFin t p agr) ; + mkVerbForms olmak_V ! asp ! vform ; _ => ap.s ! Sg ! Nom ++ mkVerbForms olmak_V ! asp ! vform } ; @@ -129,12 +129,4 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur compl = [] } ; -oper - olmak_V : V = lin V { - s = "olmak" ; - stems = \\_ => "ol" ; - aoristType = SgSylConIrreg ; - h = mkHar U_Har (SCon Soft) - } ; - }