forked from GitHub/gf-rgl
implement ProgrVP
This commit is contained in:
@@ -13,9 +13,9 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
||||
CN = {s : Number => Case => Str; gen : Number => Agr => Str; h : Harmony} ;
|
||||
NP = {s : Case => Str ; h : Harmony; a : Agr} ;
|
||||
|
||||
VP = {s : VForm => Str; compl : Str} ;
|
||||
VP = {s : Aspect => VForm => Str; compl : Str} ;
|
||||
VPSlash = Verb ** {compl : Str; c : Prep} ;
|
||||
Comp = {s : VForm => Str; compl : Str} ;
|
||||
Comp = {s : Aspect => VForm => Str; compl : Str} ;
|
||||
|
||||
Pron = ResTur.Pron ;
|
||||
Det = {s : Str; n : Number; useGen : UseGen} ;
|
||||
@@ -59,6 +59,6 @@ concrete CatTur of Cat = CommonX - [CAdv,AdN] ** open ResTur, HarmonyTur, Prelud
|
||||
|
||||
linref
|
||||
V2 = \v -> v.s ++ v.c.s ;
|
||||
VP = \vp -> vp.compl ++ vp.s ! VInf Pos ;
|
||||
VP = \vp -> vp.compl ++ vp.s ! Perf ! VInf Pos ;
|
||||
|
||||
}
|
||||
|
||||
@@ -97,37 +97,39 @@ lin
|
||||
oper
|
||||
inflVerb : Verb -> Str = \v ->
|
||||
(heading2 ("Şimdiki zaman") ++
|
||||
finite Pres ++
|
||||
finite Perf Pres ++
|
||||
finite Imperf Pres ++
|
||||
heading2 ("Geçmiş zaman") ++ --# notpresent
|
||||
finite Past ++ --# notpresent
|
||||
finite Perf Past ++ --# notpresent
|
||||
finite Imperf Past ++ --# notpresent
|
||||
heading2 ("Gelecek zaman") ++ --# notpresent
|
||||
finite Fut ++ --# notpresent
|
||||
finite Perf Fut ++ --# notpresent
|
||||
heading2 ("Emir kipi") ++
|
||||
frameTable (
|
||||
tr (th "tekil" ++
|
||||
th "çoğul") ++
|
||||
tr (td (tbl ! VImp Pos Sg) ++
|
||||
td (tbl ! VImp Pos Pl))
|
||||
tr (td (tbl ! Perf ! VImp Pos Sg) ++
|
||||
td (tbl ! Perf ! VImp Pos Pl))
|
||||
) ++
|
||||
heading2 ("Eylemlik") ++
|
||||
paragraph (tbl ! VInf Pos))
|
||||
paragraph (tbl ! Perf ! VInf Pos))
|
||||
where {
|
||||
tbl : VForm => Str = mkVerbForms v ;
|
||||
tbl : Aspect => VForm => Str = mkVerbForms v ;
|
||||
|
||||
finite : Tense -> Str = \t ->
|
||||
finite : Aspect -> Tense -> Str = \asp,t ->
|
||||
frameTable (
|
||||
tr (th "" ++
|
||||
th "tekil" ++
|
||||
th "çoğul") ++
|
||||
tr (th "1." ++
|
||||
td (tbl ! VFin t Pos {n=Sg; p=P1}) ++
|
||||
td (tbl ! VFin t Pos {n=Pl; p=P1})) ++
|
||||
td (tbl ! asp ! VFin t Pos {n=Sg; p=P1}) ++
|
||||
td (tbl ! asp ! VFin t Pos {n=Pl; p=P1})) ++
|
||||
tr (th "2." ++
|
||||
td (tbl ! VFin t Pos {n=Sg; p=P2}) ++
|
||||
td (tbl ! VFin t Pos {n=Pl; p=P2})) ++
|
||||
td (tbl ! asp ! VFin t Pos {n=Sg; p=P2}) ++
|
||||
td (tbl ! asp ! VFin t Pos {n=Pl; p=P2})) ++
|
||||
tr (th "3." ++
|
||||
td (tbl ! VFin t Pos {n=Sg; p=P3}) ++
|
||||
td (tbl ! VFin t Pos {n=Pl; p=P3}))
|
||||
td (tbl ! asp ! VFin t Pos {n=Sg; p=P3}) ++
|
||||
td (tbl ! asp ! VFin t Pos {n=Pl; p=P3}))
|
||||
) ;
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ concrete ExtendTur of Extend = CatTur ** open ResTur, SuffixTur, Predef in {
|
||||
a = {n=num.n; p=P3} ;
|
||||
} ;
|
||||
|
||||
UttVPShort vp = {s = vp.s ! VInf Pos} ;
|
||||
UttVPShort vp = {s = vp.s ! Perf ! VInf Pos} ;
|
||||
|
||||
TPastSimple = {s = []} ** {t = Past} ; --# notpresent
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete IdiomTur of Idiom = CatTur ** open Prelude, ResTur in {
|
||||
concrete IdiomTur of Idiom = CatTur ** open Prelude, ResTur, SuffixTur in {
|
||||
|
||||
lin
|
||||
ImpersCl _ = variants {} ;
|
||||
@@ -8,7 +8,10 @@ lin
|
||||
CleftNP _ _ = variants {} ;
|
||||
CleftAdv _ _ = variants {} ;
|
||||
ImpPl1 _ = variants {} ;
|
||||
ProgrVP _ = variants {} ;
|
||||
|
||||
ProgrVP vp = vp ** {
|
||||
s = \\asp,vform => vp.s ! Imperf ! vform
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ concrete NounTur of Noun = CatTur ** open ResTur, SuffixTur, HarmonyTur, ParamX,
|
||||
|
||||
PPartNP np v2 = {
|
||||
s = \\c => np.s ! c
|
||||
++ mkVerbForms v2 ! VFin Past Pos np.a --# notpresent
|
||||
++ mkVerbForms v2 ! Perf ! VFin Past Pos np.a --# notpresent
|
||||
;
|
||||
h = np.h ;
|
||||
a = np.a
|
||||
|
||||
@@ -252,10 +252,10 @@ resource ParadigmsTur = open
|
||||
VBase Soft => softBase ;
|
||||
VProg => progBase ;
|
||||
VFuture => futBase ;
|
||||
VPass => case last base of {
|
||||
#vowel => base + "n" ;
|
||||
"l" => base + suffixStr h passiveInSuffix ;
|
||||
_ => base + suffixStr h passiveIlSuffix
|
||||
VPass => case last softBase of {
|
||||
#vowel => softBase + "n" ;
|
||||
"l" => softBase + suffixStr h passiveInSuffix ;
|
||||
_ => softBase + suffixStr h passiveIlSuffix
|
||||
}
|
||||
} ;
|
||||
aoristType = aoristType ;
|
||||
|
||||
@@ -16,7 +16,7 @@ concrete PhraseTur of Phrase = CatTur ** open Prelude, ResTur in {
|
||||
-- The following have been somewhat tested and seem to be working fine
|
||||
-- to some extent.
|
||||
UttNP np = {s = np.s ! Nom} ;
|
||||
UttVP vp = {s = vp.s ! VInf Pos} ;
|
||||
UttVP vp = {s = vp.s ! Perf ! VInf Pos} ;
|
||||
UttAP ap = {s = ap.s ! Sg ! Nom} ;
|
||||
UttCN n = {s = n.s ! Sg ! Nom} ;
|
||||
UttS s = {s = s.s} ;
|
||||
|
||||
@@ -36,6 +36,9 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
-- For $Verb$.
|
||||
|
||||
param
|
||||
Aspect =
|
||||
Perf | Imperf ;
|
||||
|
||||
VForm =
|
||||
VInf Polarity
|
||||
| VImp Polarity Number
|
||||
@@ -107,26 +110,45 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
a = {n = n; p = p}
|
||||
} ;
|
||||
|
||||
mkVerbForms : Verb -> VForm => Str =
|
||||
\v -> table {
|
||||
VInf Pos => v.s ;
|
||||
mkVerbForms : Verb -> Aspect => VForm => Str =
|
||||
\v -> \\asp =>
|
||||
table {
|
||||
VInf Pos => case asp of {
|
||||
Perf => v.s ;
|
||||
Imperf => v.stems ! VBase Soft ++ BIND ++
|
||||
suffixStr v.h progrSuffix +
|
||||
suffixStr progrHar infinitiveSuffix
|
||||
} ;
|
||||
VInf Neg => v.stems ! VBase Soft ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr v.h infinitiveSuffix ;
|
||||
VImp p n => v.stems ! VBase Soft ++
|
||||
case <p,n> of {
|
||||
<Pos,Sg> => [] ;
|
||||
<Neg,Sg> => BIND ++
|
||||
suffixStr v.h negativeSuffix ;
|
||||
<Pos,Pl> => BIND ++
|
||||
suffixStr v.h p2PlImperSuffix ;
|
||||
<Neg,Pl> => BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
(let negHar = mkHar (case v.h.vow of {
|
||||
I_Har | U_Har => I_Har ;
|
||||
Ih_Har | Uh_Har => Ih_Har
|
||||
}) SVow
|
||||
in suffixStr negHar p2PlImperSuffix)
|
||||
case asp of {
|
||||
Perf => suffixStr v.h infinitiveSuffix ;
|
||||
Imperf => suffixStr negHar progrSuffix +
|
||||
suffixStr progrHar infinitiveSuffix
|
||||
} ;
|
||||
VImp p n => case asp of {
|
||||
Perf => v.stems ! VBase Soft ++
|
||||
case <p,n> of {
|
||||
<Pos,Sg> => [] ;
|
||||
<Neg,Sg> => BIND ++
|
||||
suffixStr v.h negativeSuffix ;
|
||||
<Pos,Pl> => BIND ++
|
||||
suffixStr v.h p2PlImperSuffix ;
|
||||
<Neg,Pl> => BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar p2PlImperSuffix
|
||||
} ;
|
||||
Imperf => v.stems ! VBase Soft ++ BIND ++
|
||||
case <p,n> of {
|
||||
<Pos,Sg> => suffixStr v.h progrSuffix ;
|
||||
<Neg,Sg> => suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar progrSuffix ;
|
||||
<Pos,Pl> => suffixStr v.h progrSuffix +
|
||||
suffixStr progrHar p2PlImperSuffix ;
|
||||
<Neg,Pl> => suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar progrSuffix +
|
||||
suffixStr progrHar p2PlImperSuffix
|
||||
}
|
||||
} ;
|
||||
VFin t p agr =>
|
||||
let presHar = mkHar (case v.h.con of {
|
||||
@@ -137,28 +159,40 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
SVow => v.h.vow
|
||||
}) (SCon Soft) ;
|
||||
pastHar = mkHar v.h.vow SVow ;
|
||||
pastIHar= mkHar U_Har SVow ;
|
||||
futSoft = (verbSuffixes ! agr).stemT ;
|
||||
futHar = mkHar (case v.h.vow of {
|
||||
I_Har | U_Har => I_Har ;
|
||||
Ih_Har | Uh_Har => Ih_Har
|
||||
}) (SCon futSoft) ;
|
||||
negHar = mkHar (case v.h.vow of {
|
||||
I_Har | U_Har => I_Har ;
|
||||
Ih_Har | Uh_Har => Ih_Har
|
||||
}) SVow ;
|
||||
presNegHar =
|
||||
mkHar negHar.vow (SCon Soft)
|
||||
in case p of {
|
||||
Pos => case t of {
|
||||
Pres => v.stems ! VBase Soft ++ BIND ++
|
||||
suffixStr v.h (case v.aoristType of {
|
||||
SgSylConReg => aoristErSuffix ;
|
||||
_ => aoristIrSuffix
|
||||
}) +
|
||||
suffixStr presHar (verbSuffixes ! agr) ;
|
||||
Past => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h pastSuffix +
|
||||
suffixStr pastHar (verbSuffixes ! agr) ;
|
||||
Pres => case asp of {
|
||||
Perf => v.stems ! VBase Soft ++ BIND ++
|
||||
suffixStr v.h (case v.aoristType of {
|
||||
SgSylConReg => aoristErSuffix ;
|
||||
_ => aoristIrSuffix
|
||||
}) +
|
||||
suffixStr presHar (verbSuffixes ! agr) ;
|
||||
Imperf => v.stems ! VProg ++ BIND ++
|
||||
suffixStr v.h progrSuffix +
|
||||
suffixStr progrHar (verbSuffixes ! agr)
|
||||
} ;
|
||||
Past => case asp of {
|
||||
Perf => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h pastSuffix +
|
||||
suffixStr pastHar (verbSuffixes ! agr) ;
|
||||
Imperf => v.stems ! VProg ++ BIND ++
|
||||
suffixStr v.h progrSuffix +
|
||||
case agr of {
|
||||
{n=Pl; p=P3} => suffixStr progrHar (verbSuffixes ! agr) +
|
||||
suffixStr (mkHar Ih_Har (SCon Soft)) pastSuffix ;
|
||||
_ => suffixStr progrHar pastSuffix +
|
||||
suffixStr pastIHar (verbSuffixes ! agr)
|
||||
}
|
||||
} ;
|
||||
Fut => v.stems ! VFuture ++ BIND ++
|
||||
suffixStr v.h (case futSoft of {
|
||||
Soft => softFutureSuffix ;
|
||||
@@ -169,17 +203,30 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
suffixStr v.h (condCopulaSuffixes ! agr)
|
||||
} ;
|
||||
Neg => case t of {
|
||||
Pres => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr 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)
|
||||
Pres => case asp of {
|
||||
Perf => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr 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 +
|
||||
suffixStr progrHar (verbSuffixes ! agr)
|
||||
} ;
|
||||
Past => case asp of {
|
||||
Perf => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr 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 +
|
||||
suffixStr progrHar pastSuffix +
|
||||
suffixStr pastIHar (verbSuffixes ! agr)
|
||||
} ;
|
||||
Past => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar pastSuffix +
|
||||
suffixStr negHar (verbSuffixes ! agr) ;
|
||||
Fut => v.stems ! VBase Hard ++ BIND ++
|
||||
suffixStr v.h negativeSuffix +
|
||||
suffixStr negHar (case (verbSuffixes ! agr).stemT of {
|
||||
@@ -192,7 +239,14 @@ resource ResTur = ParamX ** open Prelude, Predef, HarmonyTur, SuffixTur in {
|
||||
suffixStr negHar (condCopulaSuffixes ! agr)
|
||||
}
|
||||
}
|
||||
} ;
|
||||
}
|
||||
where {
|
||||
negHar = mkHar (case v.h.vow of {
|
||||
I_Har | U_Har => I_Har ;
|
||||
Ih_Har | Uh_Har => Ih_Har
|
||||
}) SVow ;
|
||||
progrHar = mkHar U_Har (SCon Soft)
|
||||
} ;
|
||||
|
||||
mkDet : Str -> Number -> UseGen -> {s : Str; n : Number; useGen : UseGen} =
|
||||
\s, n, ug -> {s = s; n = n; useGen = ug} ;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
|
||||
|
||||
lin
|
||||
PredVP np vp = {s = \\t,p => np.s ! Nom ++ vp.compl ++ vp.s ! VFin t p np.a} ;
|
||||
PredVP np vp = {s = \\t,p => np.s ! Nom ++ vp.compl ++ vp.s ! Perf ! VFin t p np.a} ;
|
||||
|
||||
PredSCVP sc vp = variants {} ;
|
||||
|
||||
@@ -22,7 +22,7 @@ concrete SentenceTur of Sentence = CatTur ** open Prelude, ResTur in {
|
||||
EmbedQS _ = variants {} ;
|
||||
EmbedS _ = variants {} ;
|
||||
|
||||
ImpVP vp = {s = \\p,n => vp.compl ++ vp.s ! VImp p n
|
||||
ImpVP vp = {s = \\p,n => vp.compl ++ vp.s ! Perf ! VImp p n
|
||||
} ;
|
||||
|
||||
AdvS _ _ = variants {} ;
|
||||
|
||||
@@ -85,7 +85,7 @@ resource SuffixTur = open Prelude, Predef, HarmonyTur in {
|
||||
pastSuffix : Suffix = regSuffix "di" "di" ;
|
||||
inferentSuffix : Suffix = regSuffix "miş" "miş" ;
|
||||
-- Vowel "o" does not obey harmony rules so assume that "iyor" is a one syllable word (see oper oneSylParser)
|
||||
presentSuffix : Suffix = regSuffix "iyor" "iyor" ;
|
||||
progrSuffix : Suffix = regSuffix "iyor" "iyor" ;
|
||||
aoristIrSuffix : Suffix = regSuffix "ir" "r" ;
|
||||
aoristErSuffix : Suffix = regSuffix "er" "r" ;
|
||||
aoristIzSuffix : Suffix = regSuffix "iz" "z" ;
|
||||
|
||||
@@ -31,8 +31,10 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
CompCN _ = variants {} ;
|
||||
|
||||
CompNP np = {
|
||||
s = table {
|
||||
VFin Pres p agr => np.s ! Nom ++
|
||||
s = \\asp,vform =>
|
||||
case <asp,vform> of {
|
||||
<Perf,VFin Pres p agr>
|
||||
=> np.s ! Nom ++
|
||||
case <agr,p> of {
|
||||
<{n=Sg; p=P3},Pos> => [] ;
|
||||
<{n=Sg; p=P3},Neg> => BIND ++ suffixStr np.h negativeSuffix ;
|
||||
@@ -44,25 +46,28 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
}) SVow
|
||||
in suffixStr negHar (verbSuffixes ! agr))
|
||||
} ;
|
||||
VFin Past p agr => np.s ! Nom ++ BIND ++
|
||||
<Perf,VFin Past p agr>
|
||||
=> np.s ! Nom ++ BIND ++
|
||||
case p of {
|
||||
Pos => [] ;
|
||||
Neg => suffixStr np.h negativeSuffix
|
||||
} +
|
||||
suffixStr np.h (alethicCopulaSuffixes ! agr) ;
|
||||
vform => np.s ! Nom ++
|
||||
mkVerbForms olmak_V ! vform
|
||||
_ => np.s ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! vform
|
||||
} ;
|
||||
compl = []
|
||||
} ;
|
||||
|
||||
CompAP ap = {
|
||||
s = table {
|
||||
VInf p => ap.s ! Sg ! Nom ++
|
||||
mkVerbForms olmak_V ! (VInf p) ;
|
||||
VImp p n => ap.s ! n ! Nom ++
|
||||
mkVerbForms olmak_V ! (VImp p n) ;
|
||||
VFin Pres p agr => ap.s ! agr.n ! Nom ++
|
||||
s = \\asp,vform =>
|
||||
case <asp,vform> of {
|
||||
<_,VInf p> => ap.s ! Sg ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VInf p) ;
|
||||
<_,VImp p n> => ap.s ! n ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VImp p n) ;
|
||||
<Perf,VFin Pres p agr> =>
|
||||
ap.s ! agr.n ! Nom ++
|
||||
case <agr,p> of {
|
||||
<{n=Sg; p=P3},Pos> => [] ;
|
||||
<{n=Sg; p=P3},Neg> => BIND ++ suffixStr ap.h negativeSuffix ;
|
||||
@@ -76,14 +81,16 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
}
|
||||
in suffixStr negHar (verbSuffixes ! agr))
|
||||
} ;
|
||||
VFin Past p agr => ap.s ! agr.n ! Nom ++ BIND ++
|
||||
<Perf,VFin Past p 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 => ap.s ! agr.n ! Nom ++
|
||||
mkVerbForms olmak_V ! (VFin t p agr)
|
||||
<_,VFin t p agr> =>
|
||||
ap.s ! agr.n ! Nom ++
|
||||
mkVerbForms olmak_V ! asp ! (VFin t p agr)
|
||||
} ;
|
||||
compl = []
|
||||
} ;
|
||||
@@ -101,7 +108,7 @@ concrete VerbTur of Verb = CatTur ** open Prelude, ResTur, SuffixTur, HarmonyTur
|
||||
} ;
|
||||
|
||||
AdVVP adv vp = vp ** {
|
||||
s = \\vf => adv.s ++ vp.s ! vf ;
|
||||
s = \\asp,vf => adv.s ++ vp.s ! asp ! vf ;
|
||||
} ;
|
||||
|
||||
AdvVPSlash vp adv = vp ** {
|
||||
|
||||
Reference in New Issue
Block a user