forked from GitHub/gf-rgl
extensions by Codex
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
concrete AdjectiveKaz of Adjective = CatKaz ** open ResKaz in {
|
||||||
|
lin
|
||||||
|
PositA a = a ;
|
||||||
|
ComparA a np = {s=np.s ! Ablat ++ a.s} ;
|
||||||
|
UseComparA a = {s=a.s} ;
|
||||||
|
ComplA2 a np = {s=complNP a.c2 np ++ a.s} ;
|
||||||
|
ReflA2 a = {s=a.s} ;
|
||||||
|
UseA2 a = {s=a.s} ;
|
||||||
|
SentAP ap sc = {s=sc.s ++ ap.s} ;
|
||||||
|
AdAP ada ap = {s=ada.s ++ ap.s} ;
|
||||||
|
AdvAP ap adv = {s=adv.s ++ ap.s} ;
|
||||||
|
CAdvAP cadv ap np = {s=cadv.s ++ ap.s ++ cadv.p ++ np.s ! Ablat} ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
concrete AdverbKaz of Adverb = CatKaz ** open ResKaz in {
|
||||||
|
lin
|
||||||
|
ComparAdvAdj cadv a np = {s=cadv.s ++ a.s ++ cadv.p ++ np.s ! Ablat} ;
|
||||||
|
ComparAdvAdjS cadv a s = {s=cadv.s ++ a.s ++ cadv.p ++ s.s} ;
|
||||||
|
PositAdAAdj a = {s=a.s} ;
|
||||||
|
PositAdvAdj a = {s=a.s} ;
|
||||||
|
PrepNP prep np = {s=np.s ! prep.c ++ prep.s} ;
|
||||||
|
AdAdv a b = {s=a.s ++ b.s} ;
|
||||||
|
SubjS sub s = {s=s.s ++ sub.s} ;
|
||||||
|
AdnCAdv c = {s=c.s} ;
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
concrete AllKaz of AllKazAbs =
|
concrete AllKaz of AllKazAbs =
|
||||||
LangKaz
|
LangKaz,
|
||||||
|
ExtendKaz
|
||||||
**
|
**
|
||||||
{} ;
|
{} ;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:prelude
|
||||||
|
|
||||||
abstract AllKazAbs =
|
abstract AllKazAbs =
|
||||||
Lang
|
Lang,
|
||||||
|
Extend
|
||||||
** {} ;
|
** {} ;
|
||||||
|
|||||||
+15
-34
@@ -3,41 +3,37 @@ concrete CatKaz of Cat = CommonX ** open Prelude,ResKaz in {
|
|||||||
lincat A2 = A ** {c2 : Compl} ;
|
lincat A2 = A ** {c2 : Compl} ;
|
||||||
lincat ACard = {s : Str} ;
|
lincat ACard = {s : Str} ;
|
||||||
lincat AP = {s : Str} ;
|
lincat AP = {s : Str} ;
|
||||||
lincat CN = {s : Case => Str} ;
|
lincat CN = Noun ;
|
||||||
lincat Card = {s : Str} ;
|
lincat Card = {s : Str} ;
|
||||||
lincat Cl = {infinitive : Case => Str} ;
|
lincat Cl = Clause ;
|
||||||
lincat ClSlash = {s : Str} ;
|
lincat ClSlash = Clause ;
|
||||||
lincat Comp = {s : Str} ;
|
lincat Comp = {s : Str} ;
|
||||||
lincat Conj = {s : Str} ;
|
lincat Conj = {s : Str} ;
|
||||||
lincat DAP = {s : Str} ;
|
lincat DAP = {s : Str} ;
|
||||||
lincat Decimal = {s : Str} ;
|
lincat Decimal = {s : Str} ;
|
||||||
lincat Det = {s : Str; n : Number} ;
|
lincat Det = {s : Str; n : Number; poss : Possessor} ;
|
||||||
lincat Digits = {s : Str} ;
|
lincat Digits = {s : Str} ;
|
||||||
lincat GN = {s : Str} ;
|
lincat GN = {s : Str} ;
|
||||||
lincat IComp = {s : Str} ;
|
lincat IComp = {s : Str} ;
|
||||||
lincat IDet = {s : Str} ;
|
lincat IDet = {s : Str; n : Number} ;
|
||||||
lincat IP = {s : Str} ;
|
lincat IP = {s : Str} ;
|
||||||
lincat IQuant = {s : Str} ;
|
lincat IQuant = {s : Str} ;
|
||||||
lincat Imp = {s : Str} ;
|
lincat Imp = {s : Polarity => Formality => Number => Str} ;
|
||||||
lincat LN = {s : Str} ;
|
lincat LN = {s : Str} ;
|
||||||
lincat N = {s : Case => Number => Str;
|
lincat N = Noun ;
|
||||||
poss : Number => Person => Number => Str} ;
|
lincat N2 = Noun ** {c2 : Compl} ;
|
||||||
lincat N2 = {s : Case => Number => Str;
|
lincat N3 = Noun ** {c2,c3 : Compl} ;
|
||||||
poss : Number => Person => Number => Str; c2 : {s : Str}} ;
|
lincat NP = {s : Case => Str; a : Agr} ;
|
||||||
lincat N3 = {s : Case => Number => Str;
|
|
||||||
poss : Number => Person => Number => Str; c2 : {s : Str};
|
|
||||||
c3 : {s : Str}} ;
|
|
||||||
lincat NP = {s : Case => Str} ;
|
|
||||||
lincat Num = {s : Str; n : Number} ;
|
lincat Num = {s : Str; n : Number} ;
|
||||||
lincat Numeral = {s : Str} ;
|
lincat Numeral = {s : Str} ;
|
||||||
lincat Ord = {s : Str} ;
|
lincat Ord = {s : Str} ;
|
||||||
lincat PN = {s : Str} ;
|
lincat PN = {s : Str} ;
|
||||||
lincat Predet = {s : Str} ;
|
lincat Predet = {s : Str} ;
|
||||||
lincat Prep = Compl ;
|
lincat Prep = Compl ;
|
||||||
lincat Pron = {s : Str} ;
|
lincat Pron = {s : Case => Str; a : Agr} ;
|
||||||
lincat QCl = {s : Str} ;
|
lincat QCl = Clause ;
|
||||||
lincat QS = {s : Str} ;
|
lincat QS = {s : Str} ;
|
||||||
lincat Quant = {s : Str} ;
|
lincat Quant = {s : Str; poss : Possessor} ;
|
||||||
lincat RCl = {s : Str} ;
|
lincat RCl = {s : Str} ;
|
||||||
lincat RP = {s : Str} ;
|
lincat RP = {s : Str} ;
|
||||||
lincat RS = {s : Str} ;
|
lincat RS = {s : Str} ;
|
||||||
@@ -49,21 +45,6 @@ concrete CatKaz of Cat = CommonX ** open Prelude,ResKaz in {
|
|||||||
lincat VV,VS,VQ,VA = Verb ;
|
lincat VV,VS,VQ,VA = Verb ;
|
||||||
lincat V2 = Verb ** {c2 : Compl} ;
|
lincat V2 = Verb ** {c2 : Compl} ;
|
||||||
lincat V3,V2A,V2S,V2Q,V2V = Verb ** {c2,c3 : Compl} ;
|
lincat V3,V2A,V2S,V2Q,V2V = Verb ** {c2,c3 : Compl} ;
|
||||||
lincat VP = {infinitive : Case => Str;
|
lincat VP = Verb ;
|
||||||
indicative : {fut : Case => Str;
|
lincat VPSlash = Verb ** {c2 : Compl} ;
|
||||||
pres : {progressive : Polarity => Case => Str;
|
|
||||||
noAspect : Polarity => Case => Str};
|
|
||||||
past : {perfect : Polarity => Case => Str;
|
|
||||||
progressive : Polarity => Case => Str;
|
|
||||||
noAspect : Polarity => Case => Str}};
|
|
||||||
subjunctive : Person => Case => Str} ;
|
|
||||||
lincat VPSlash = {infinitive : Str;
|
|
||||||
indicative : {fut : Str;
|
|
||||||
pres : {progressive : Polarity => Person => Number => Str;
|
|
||||||
noAspect : Polarity => Person => Number => Str};
|
|
||||||
past : {perfect : Polarity => Person => Number => Str;
|
|
||||||
progressive : Polarity => Person => Number => Str;
|
|
||||||
noAspect : Polarity => Person => Number => Str}};
|
|
||||||
imperative : Polarity => Formality => Number => Str;
|
|
||||||
subjunctive : Person => Number => Str} ;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
concrete ConjunctionKaz of Conjunction = CatKaz ** open ResKaz in {
|
||||||
|
lincat
|
||||||
|
[S], [Adv], [AdV], [IAdv], [AP], [RS] = {s1,s2 : Str} ;
|
||||||
|
[NP] = {s1,s2 : Case => Str; a : Agr} ;
|
||||||
|
[CN] = {s1,s2 : Noun} ;
|
||||||
|
[DAP] = {s1,s2 : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseNP x y = {s1=\\c => x.s ! c;s2=\\c => y.s ! c;a={p=P3;n=Pl}} ;
|
||||||
|
ConsNP x xs = {s1=\\c => x.s ! c ++ "," ++ xs.s1 ! c;s2=xs.s2;a={p=P3;n=Pl}} ;
|
||||||
|
ConjNP c xs = {s=\\k => coord c.s (xs.s1 ! k) (xs.s2 ! k);a=xs.a} ;
|
||||||
|
BaseAP x y = {s1=x.s;s2=y.s} ; ConsAP x xs = {s1=x.s ++ "," ++ xs.s1;s2=xs.s2} ;
|
||||||
|
ConjAP c xs = {s=coord c.s xs.s1 xs.s2} ;
|
||||||
|
BaseAdv x y = {s1=x.s;s2=y.s} ; ConsAdv x xs = {s1=x.s ++ "," ++ xs.s1;s2=xs.s2} ;
|
||||||
|
ConjAdv c xs = {s=coord c.s xs.s1 xs.s2} ;
|
||||||
|
BaseS x y = {s1=x.s;s2=y.s} ; ConsS x xs = {s1=x.s ++ "," ++ xs.s1;s2=xs.s2} ;
|
||||||
|
ConjS c xs = {s=coord c.s xs.s1 xs.s2} ;
|
||||||
|
BaseCN x y = {s1=x;s2=y} ; ConsCN x xs = {s1=x;s2=xs.s2} ;
|
||||||
|
ConjCN c xs = {s=\\k,n => coord c.s (xs.s1.s ! k ! n) (xs.s2.s ! k ! n);
|
||||||
|
poss=\\o,p,n => coord c.s (xs.s1.poss ! o ! p ! n) (xs.s2.poss ! o ! p ! n)} ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
concrete ConstructionKaz of Construction = CatKaz **
|
||||||
|
open Prelude, ResKaz, ParadigmsKaz in {
|
||||||
|
|
||||||
|
lincat Timeunit, Hour, Weekday, Month, Monthday, Year = {s : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
ready_VP=prefixVerb "дайын" (mkV "болу");
|
||||||
|
has_age_VP card=prefixVerb (card.s++"жаста") (mkV "болу");
|
||||||
|
n_units_AP card cn a={s=card.s++cn.s!Nom!Sg++a.s};
|
||||||
|
n_units_of_NP card cn np={s=\\c=>card.s++cn.s!Nom!Sg++np.s!c;a=np.a};
|
||||||
|
cup_of_CN np={s=\\_,_=>"бір кесе"++np.s!Nom;poss=\\_,_,_=>"бір кесе"++np.s!Nom};
|
||||||
|
monday_Weekday={s="дүйсенбі"}; tuesday_Weekday={s="сейсенбі"};
|
||||||
|
wednesday_Weekday={s="сәрсенбі"}; thursday_Weekday={s="бейсенбі"};
|
||||||
|
friday_Weekday={s="жұма"}; saturday_Weekday={s="сенбі"}; sunday_Weekday={s="жексенбі"};
|
||||||
|
january_Month={s="қаңтар"}; february_Month={s="ақпан"}; march_Month={s="наурыз"};
|
||||||
|
april_Month={s="сәуір"}; may_Month={s="мамыр"}; june_Month={s="маусым"};
|
||||||
|
july_Month={s="шілде"}; august_Month={s="тамыз"}; september_Month={s="қыркүйек"};
|
||||||
|
october_Month={s="қазан"}; november_Month={s="қараша"}; december_Month={s="желтоқсан"};
|
||||||
|
weekdayPunctualAdv w={s=w.s++"күні"}; weekdayHabitualAdv w={s="әр"++w.s};
|
||||||
|
weekdayN w={s=\\_,_=>w.s;poss=\\_,_,_=>w.s};
|
||||||
|
monthN m={s=\\_,_=>m.s;poss=\\_,_,_=>m.s};
|
||||||
|
intYear i={s=i.s}; yearAdv y={s=y.s++"жылы"};
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
concrete ExtendKaz of Extend = CatKaz **
|
||||||
|
open Prelude, ResKaz, ParadigmsKaz, GrammarKaz, (P = ParamX) in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
RNP = {s : Case => Str} ;
|
||||||
|
RNPList = {s1,s2 : Case => Str} ;
|
||||||
|
VPS, VPI = {s : Str} ;
|
||||||
|
[VPS], [VPI], [Comp], [Imp] = {s1,s2 : Str} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
extendNP : Str -> NP = \s -> lin NP {s=\\_ => s; a={p=P3;n=Sg}} ;
|
||||||
|
simpleRNP : Str -> RNP = \s -> lin RNP {s=\\_ => s} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
TPastSimple = {s=[]; t=P.Past} ;
|
||||||
|
CompoundN a b = lin N {
|
||||||
|
s=\\c,n => a.s ! Nom ! Sg ++ b.s ! c ! n;
|
||||||
|
poss=\\o,p,n => a.s ! Nom ! Sg ++ b.poss ! o ! p ! n
|
||||||
|
} ;
|
||||||
|
GenModNP num np cn = {s=\\c => np.s ! Gen ++ possForm cn np.a.n (nounPerson np.a.p) num.n; a={p=P3;n=num.n}} ;
|
||||||
|
ApposNP a b = {s=\\c => a.s ! c ++ "," ++ b.s ! c; a=a.a} ;
|
||||||
|
ReflPron = simpleRNP "өзін" ;
|
||||||
|
ReflPoss num cn = {s=\\c => cn.s ! c ! num.n} ;
|
||||||
|
AdvRNP np prep r = {s=\\c => np.s ! c ++ r.s ! prep.c ++ prep.s} ;
|
||||||
|
AdvRVP vp prep r = prefixVerb (r.s ! prep.c ++ prep.s) vp ;
|
||||||
|
AdvRAP ap prep r = {s=r.s ! prep.c ++ prep.s ++ ap.s} ;
|
||||||
|
PossPronRNP pron num cn r = {s=\\c => pron.s ! Gen ++ possForm cn pron.a.n (nounPerson pron.a.p) num.n ++ r.s ! c; a={p=P3;n=num.n}} ;
|
||||||
|
ComplBareVS vs s = prefixVerb s.s vs ;
|
||||||
|
PresPartAP vp={s=vp.infinitive}; PastPartAP vp={s=vp.infinitive};
|
||||||
|
PastPartAgentAP vp np={s=np.s ! Instr ++ vp.infinitive};
|
||||||
|
PassVPSlash vp=prefixVerb "" vp; PassAgentVPSlash vp np=prefixVerb (np.s ! Instr) vp;
|
||||||
|
ProgrVPSlash vp=vp;
|
||||||
|
GerundCN vp={s=\\_,_ => vp.infinitive; poss=\\_,_,_ => vp.infinitive};
|
||||||
|
GerundNP vp=extendNP vp.infinitive; GerundAdv vp={s=vp.infinitive}; ByVP vp={s=vp.infinitive};
|
||||||
|
ComplSlashPartLast vp np=prefixVerb (np.s ! vp.c2.c ++ vp.c2.s) vp;
|
||||||
|
UttVPShort vp={s=vp.infinitive}; PositAdVAdj a={s=a.s}; CompoundAP n a={s=n.s!Nom!Sg++a.s};
|
||||||
|
MkVPS temp pol vp={s=(mkClause (extendNP "") vp).past ! pol.p};
|
||||||
|
BaseVPS a b={s1=a.s;s2=b.s}; ConsVPS a b={s1=a.s++","++b.s1;s2=b.s2};
|
||||||
|
ConjVPS c xs={s=xs.s1++c.s++xs.s2}; PredVPS np vps={s=np.s!Nom++vps.s};
|
||||||
|
MkVPI vp={s=vp.infinitive}; BaseVPI a b={s1=a.s;s2=b.s};
|
||||||
|
ConsVPI a b={s1=a.s++","++b.s1;s2=b.s2}; ConjVPI c xs={s=xs.s1++c.s++xs.s2};
|
||||||
|
ComplVPIVV vv vpi=prefixVerb vpi.s vv;
|
||||||
|
UseDAP d=extendNP d.s; UseDAPMasc d=extendNP d.s; UseDAPFem d=extendNP d.s;
|
||||||
|
EmptyRelSlash cl={s=cl.pres!P.Pos};
|
||||||
|
BaseImp a b={s1=a.s!Pos!Informal!Sg;s2=b.s!Pos!Informal!Sg};
|
||||||
|
ConjImp c xs={s=\\_,_,_ => xs.s1++c.s++xs.s2};
|
||||||
|
BaseComp a b={s1=a.s;s2=b.s}; ConjComp c xs={s=xs.s1++c.s++xs.s2};
|
||||||
|
}
|
||||||
@@ -1,6 +1,17 @@
|
|||||||
concrete GrammarKaz of Grammar =
|
concrete GrammarKaz of Grammar =
|
||||||
|
NounKaz,
|
||||||
|
VerbKaz,
|
||||||
|
AdjectiveKaz,
|
||||||
|
AdverbKaz,
|
||||||
|
NumeralKaz,
|
||||||
|
SentenceKaz,
|
||||||
|
QuestionKaz,
|
||||||
|
RelativeKaz,
|
||||||
|
ConjunctionKaz,
|
||||||
PhraseKaz,
|
PhraseKaz,
|
||||||
TextX,
|
TextX,
|
||||||
TenseX ** {
|
IdiomKaz,
|
||||||
|
TenseX,
|
||||||
} ;
|
NamesKaz
|
||||||
|
** {
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
concrete IdiomKaz of Idiom = CatKaz ** open ResKaz, ParadigmsKaz in {
|
||||||
|
lin
|
||||||
|
ProgrVP vp = vp ;
|
||||||
|
ExistNP np = mkClause np (mkV "болу") ;
|
||||||
|
ExistNPAdv np adv = mkClause np (prefixVerb adv.s (mkV "болу")) ;
|
||||||
|
ExistIP ip = {pres=\\_ => ip.s ++ "бар";past=\\_ => ip.s ++ "болды";
|
||||||
|
fut=\\_ => ip.s ++ "болады";cond=\\_ => ip.s ++ "болар еді";anter=\\_ => ip.s ++ "болған"} ;
|
||||||
|
ImpersCl vp = mkClause {s=\\_ => [];a=defaultAgr} vp ;
|
||||||
|
GenericCl vp = mkClause {s=\\_ => "адам";a=defaultAgr} vp ;
|
||||||
|
CleftNP np rs = stringClause (np.s ! Nom ++ rs.s) ;
|
||||||
|
CleftAdv adv s = stringClause (adv.s ++ s.s) ;
|
||||||
|
ImpPl1 vp = {s=vp.imperative!Pos!Informal!Pl} ;
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
concrete LangKaz of Lang =
|
concrete LangKaz of Lang =
|
||||||
GrammarKaz,
|
GrammarKaz,
|
||||||
LexiconKaz
|
LexiconKaz,
|
||||||
|
ConstructionKaz
|
||||||
,DocumentationKaz --# notpresent
|
,DocumentationKaz --# notpresent
|
||||||
** {
|
** {
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
+4851
-5216
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
concrete NamesKaz of Names = CatKaz ** open Prelude, ResKaz in {
|
||||||
|
oper nameNP : Str -> NP = \s -> lin NP {s=\\_ => s; a={p=P3;n=Sg}} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
UseLN ln=nameNP ln.s;
|
||||||
|
InLN ln={s=ln.s++"да"};
|
||||||
|
AdjLN ap ln={s=ap.s++ln.s};
|
||||||
|
GivenName gn=nameNP gn.s;
|
||||||
|
MaleSurname sn=nameNP sn.s;
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
concrete NounKaz of Noun = CatKaz ** open Prelude, ResKaz in {
|
||||||
|
lin
|
||||||
|
UseN n = n ;
|
||||||
|
AdjCN ap cn = cn ** {
|
||||||
|
s=\\c,n => ap.s ++ cn.s ! c ! n;
|
||||||
|
poss=\\o,p,n => ap.s ++ cn.poss ! o ! p ! n
|
||||||
|
} ;
|
||||||
|
AdvCN cn adv = cn ** {
|
||||||
|
s=\\c,n => adv.s ++ cn.s ! c ! n;
|
||||||
|
poss=\\o,p,n => adv.s ++ cn.poss ! o ! p ! n
|
||||||
|
} ;
|
||||||
|
RelCN cn rs = cn ** {
|
||||||
|
s=\\c,n => rs.s ++ cn.s ! c ! n;
|
||||||
|
poss=\\o,p,n => rs.s ++ cn.poss ! o ! p ! n
|
||||||
|
} ;
|
||||||
|
SentCN cn sc = cn ** {
|
||||||
|
s=\\c,n => sc.s ++ cn.s ! c ! n;
|
||||||
|
poss=\\o,p,n => sc.s ++ cn.poss ! o ! p ! n
|
||||||
|
} ;
|
||||||
|
ApposCN cn np = cn ** {
|
||||||
|
s=\\c,n => cn.s ! c ! n ++ np.s ! c;
|
||||||
|
poss=\\o,p,n => cn.poss ! o ! p ! n ++ np.s ! Nom
|
||||||
|
} ;
|
||||||
|
ComplN2 n np = n ** {
|
||||||
|
s=\\c,k => complNP n.c2 np ++ n.s ! c ! k;
|
||||||
|
poss=\\o,p,k => complNP n.c2 np ++ n.poss ! o ! p ! k
|
||||||
|
} ;
|
||||||
|
ComplN3 n np = n ** {
|
||||||
|
s=\\c,k => complNP n.c2 np ++ n.s ! c ! k;
|
||||||
|
poss=\\o,p,k => complNP n.c2 np ++ n.poss ! o ! p ! k; c2=n.c3
|
||||||
|
} ;
|
||||||
|
Use2N3 n = {
|
||||||
|
s=n.s;
|
||||||
|
poss=n.poss;
|
||||||
|
c2=n.c2
|
||||||
|
} ;
|
||||||
|
Use3N3 n = {
|
||||||
|
s=n.s;
|
||||||
|
poss=n.poss;
|
||||||
|
c2=n.c3
|
||||||
|
} ;
|
||||||
|
UseN2 n = {
|
||||||
|
s=n.s;
|
||||||
|
poss=n.poss
|
||||||
|
} ;
|
||||||
|
UsePN pn = {s=\\_ => pn.s;a=defaultAgr} ;
|
||||||
|
UsePron p = p ;
|
||||||
|
DetCN det cn = {s=\\c => det.s ++ case det.poss of {
|
||||||
|
NoPoss => cn.s ! c ! det.n; Poss p n => possForm cn n (nounPerson p) det.n};
|
||||||
|
a={p=P3;n=det.n}} ;
|
||||||
|
MassNP cn = {s=\\c => cn.s ! c ! Sg;a=defaultAgr} ;
|
||||||
|
DetQuant q num = {s=q.s ++ num.s;n=num.n;poss=q.poss} ;
|
||||||
|
DetQuantOrd q num ord = {s=q.s ++ num.s ++ ord.s;n=num.n;poss=q.poss} ;
|
||||||
|
DefArt = {s=[];poss=NoPoss} ; IndefArt = {s=[];poss=NoPoss} ;
|
||||||
|
PossPron p = {s=[];poss=Poss p.a.p p.a.n} ;
|
||||||
|
NumSg = {s=[];n=Sg} ; NumPl = {s=[];n=Pl} ;
|
||||||
|
NumCard c = {s=c.s;n=Sg} ; NumNumeral n = {s=n.s;n=Sg} ; NumDecimal n = {s=n.s;n=Sg} ;
|
||||||
|
AdNum a n = {s=a.s ++ n.s} ; OrdNumeral n = {s=n.s} ; OrdDigits n = {s=n.s} ;
|
||||||
|
OrdSuperl a = {s="ең" ++ a.s} ; OrdNumeralSuperl n a = {s=n.s ++ "ең" ++ a.s} ;
|
||||||
|
AdvNP np adv = {s=\\c => np.s ! c ++ adv.s;a=np.a} ;
|
||||||
|
ExtAdvNP np adv = {s=\\c => np.s ! c ++ "," ++ adv.s;a=np.a} ;
|
||||||
|
PredetNP p np = {s=\\c => p.s ++ np.s ! c;a=np.a} ;
|
||||||
|
PossNP cn np = cn ** {s=\\c,n => np.s ! Gen ++ possForm cn np.a.n (nounPerson np.a.p) n;
|
||||||
|
poss=\\o,p,n => np.s ! Gen ++ cn.poss ! o ! p ! n} ;
|
||||||
|
PartNP cn np = cn ** {s=\\c,n => np.s ! Ablat ++ cn.s ! c ! n;
|
||||||
|
poss=\\o,p,n => np.s ! Ablat ++ cn.poss ! o ! p ! n} ;
|
||||||
|
CountNP det np = {s=\\c => det.s ++ np.s ! c;a={p=P3;n=det.n}} ;
|
||||||
|
DetDAP det = {s=det.s} ; AdjDAP dap ap = {s=dap.s ++ ap.s} ;
|
||||||
|
QuantityNP dec mu = {s=\\_ => dec.s ++ mu.s;a={p=P3;n=Pl}} ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
concrete NumeralKaz of Numeral = CatKaz [Numeral,Digits,Decimal] **
|
||||||
|
open Prelude in {
|
||||||
|
|
||||||
|
param DValue = D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Dig, Digit = {s : Str; v : DValue} ;
|
||||||
|
Sub10, Sub100, Sub1000, Sub1000000,
|
||||||
|
Sub1000000000, Sub1000000000000 = {s : Str} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
tens : DValue => Str = table {
|
||||||
|
D0 => ""; D1 => "он"; D2 => "жиырма"; D3 => "отыз"; D4 => "қырық";
|
||||||
|
D5 => "елу"; D6 => "алпыс"; D7 => "жетпіс"; D8 => "сексен"; D9 => "тоқсан"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
num n = {s=n.s} ;
|
||||||
|
n2={s="екі";v=D2}; n3={s="үш";v=D3}; n4={s="төрт";v=D4}; n5={s="бес";v=D5};
|
||||||
|
n6={s="алты";v=D6}; n7={s="жеті";v=D7}; n8={s="сегіз";v=D8}; n9={s="тоғыз";v=D9};
|
||||||
|
pot01={s="бір"}; pot0 d={s=d.s}; pot0as1 n=n;
|
||||||
|
pot110={s="он"}; pot111={s="он бір"}; pot1to19 d={s="он"++d.s};
|
||||||
|
pot1 d={s=tens!d.v};
|
||||||
|
pot1plus d n={s=(pot1 d).s++n.s}; pot1as2 n=n;
|
||||||
|
pot21={s="жүз"}; pot2 n={s=n.s++"жүз"}; pot2plus n m={s=n.s++"жүз"++m.s}; pot2as3 n=n;
|
||||||
|
pot31={s="мың"}; pot3 n={s=n.s++"мың"}; pot3plus n m={s=n.s++"мың"++m.s}; pot3as4 n=n;
|
||||||
|
pot3decimal d={s=d.s++"мың"}; pot41={s="миллион"}; pot4 n={s=n.s++"миллион"};
|
||||||
|
pot4plus n m={s=n.s++"миллион"++m.s}; pot4as5 n=n; pot4decimal d={s=d.s++"миллион"};
|
||||||
|
pot51={s="миллиард"}; pot5 n={s=n.s++"миллиард"};
|
||||||
|
pot5plus n m={s=n.s++"миллиард"++m.s}; pot5decimal d={s=d.s++"миллиард"};
|
||||||
|
D_0={s="0";v=D0};D_1={s="1";v=D1};D_2={s="2";v=D2};D_3={s="3";v=D3};D_4={s="4";v=D4};
|
||||||
|
D_5={s="5";v=D5};D_6={s="6";v=D6};D_7={s="7";v=D7};D_8={s="8";v=D8};D_9={s="9";v=D9};
|
||||||
|
IDig d={s=d.s}; IIDig d ds={s=d.s ++ BIND ++ ds.s}; PosDecimal ds=ds;
|
||||||
|
NegDecimal ds={s="-" ++ BIND ++ ds.s};
|
||||||
|
IFrac d x={s=d.s ++ BIND ++ "." ++ BIND ++ x.s};
|
||||||
|
}
|
||||||
+78
-55
@@ -2,29 +2,29 @@ resource ParadigmsKaz = MorphoKaz ** open Predef, Prelude, CatKaz, ResKaz in {
|
|||||||
oper
|
oper
|
||||||
regN : Str -> N -- s;Nom;Sg
|
regN : Str -> N -- s;Nom;Sg
|
||||||
= \form -> case form of {
|
= \form -> case form of {
|
||||||
_ + "дас" => mkN004 form;
|
_ + "дас" => mkN001 form;
|
||||||
_ + "нас" => mkN004 form;
|
_ + "нас" => mkN001 form;
|
||||||
_ + "йыс" => mkN004 form;
|
_ + "йыс" => mkN001 form;
|
||||||
_ + "дыс" => mkN020 form;
|
_ + "дыс" => mkN020 form;
|
||||||
_ + "ніс" => mkN009 form;
|
_ + "ніс" => mkN009 form;
|
||||||
_ + "гіс" => mkN009 form;
|
_ + "гіс" => mkN009 form;
|
||||||
_ + "тіс" => mkN022 form;
|
_ + "тіс" => mkN022 form;
|
||||||
_ + "мес" => mkN009 form;
|
_ + "мес" => mkN009 form;
|
||||||
_ + "ғат" => mkN020 form;
|
_ + "ғат" => mkN020 form;
|
||||||
_ + "нат" => mkN004 form;
|
_ + "нат" => mkN001 form;
|
||||||
_ + "пат" => mkN004 form;
|
_ + "пат" => mkN001 form;
|
||||||
_ + "жат" => mkN004 form;
|
_ + "жат" => mkN001 form;
|
||||||
_ + "зат" => mkN020 form;
|
_ + "зат" => mkN020 form;
|
||||||
_ + "ұлт" => mkN004 form;
|
_ + "ұлт" => mkN001 form;
|
||||||
_ + "ілт" => mkN021 form;
|
_ + "ілт" => mkN021 form;
|
||||||
_ + "уыт" => mkN004 form;
|
_ + "уыт" => mkN001 form;
|
||||||
_ + "ірт" => mkN009 form;
|
_ + "ірт" => mkN009 form;
|
||||||
_ + "орт" => mkN020 form;
|
_ + "орт" => mkN020 form;
|
||||||
_ + "ырт" => mkN020 form;
|
_ + "ырт" => mkN020 form;
|
||||||
_ + "шот" => mkN004 form;
|
_ + "шот" => mkN001 form;
|
||||||
_ + "ант" => mkN004 form;
|
_ + "ант" => mkN001 form;
|
||||||
_ + "ент" => mkN021 form;
|
_ + "ент" => mkN021 form;
|
||||||
_ + "хит" => mkN004 form;
|
_ + "хит" => mkN001 form;
|
||||||
_ + "нөт" => mkN009 form;
|
_ + "нөт" => mkN009 form;
|
||||||
_ + "тет" => mkN009 form;
|
_ + "тет" => mkN009 form;
|
||||||
_ + "лет" => mkN022 form;
|
_ + "лет" => mkN022 form;
|
||||||
@@ -39,12 +39,12 @@ oper
|
|||||||
_ + "ліш" => mkN021 form;
|
_ + "ліш" => mkN021 form;
|
||||||
_ + "ріш" => mkN022 form;
|
_ + "ріш" => mkN022 form;
|
||||||
_ + "шам" => mkN003 form;
|
_ + "шам" => mkN003 form;
|
||||||
_ + "нам" => mkN064 form;
|
_ + "нам" => mkN002 form;
|
||||||
_ + "йым" => mkN026 form;
|
_ + "йым" => mkN026 form;
|
||||||
_ + "рым" => mkN026 form;
|
_ + "рым" => mkN026 form;
|
||||||
_ + "жым" => mkN026 form;
|
_ + "жым" => mkN026 form;
|
||||||
_ + "ным" => mkN066 form;
|
_ + "ным" => mkN002 form;
|
||||||
_ + "тым" => mkN066 form;
|
_ + "тым" => mkN002 form;
|
||||||
_ + "нім" => mkN016 form;
|
_ + "нім" => mkN016 form;
|
||||||
_ + "рім" => mkN035 form;
|
_ + "рім" => mkN035 form;
|
||||||
_ + "дем" => mkN035 form;
|
_ + "дем" => mkN035 form;
|
||||||
@@ -53,22 +53,22 @@ oper
|
|||||||
_ + "ран" => mkN003 form;
|
_ + "ран" => mkN003 form;
|
||||||
_ + "жан" => mkN003 form;
|
_ + "жан" => mkN003 form;
|
||||||
_ + "оян" => mkN003 form;
|
_ + "оян" => mkN003 form;
|
||||||
_ + "мән" => mkN028 form;
|
_ + "мән" => mkN016 form;
|
||||||
_ + "сін" => mkN028 form;
|
_ + "сін" => mkN016 form;
|
||||||
_ + "кін" => mkN028 form;
|
_ + "кін" => mkN016 form;
|
||||||
_ + "гін" => mkN035 form;
|
_ + "гін" => mkN035 form;
|
||||||
_ + "лен" => mkN028 form;
|
_ + "лен" => mkN016 form;
|
||||||
_ + "рен" => mkN028 form;
|
_ + "рен" => mkN016 form;
|
||||||
_ + "йың" => mkN003 form;
|
_ + "йың" => mkN003 form;
|
||||||
_ + "заң" => mkN019 form;
|
_ + "заң" => mkN019 form;
|
||||||
_ + "пап" => mkN004 form;
|
_ + "пап" => mkN043 form;
|
||||||
_ + "лып" => mkN004 form;
|
_ + "лып" => mkN043 form;
|
||||||
_ + "қып" => mkN020 form;
|
_ + "қып" => mkN020 form;
|
||||||
_ + "сық" => mkN004 form;
|
_ + "сық" => mkN015 form;
|
||||||
_ + "шық" => mkN004 form;
|
_ + "шық" => mkN015 form;
|
||||||
_ + "зақ" => mkN004 form;
|
_ + "зақ" => mkN015 form;
|
||||||
_ + "уақ" => mkN004 form;
|
_ + "уақ" => mkN015 form;
|
||||||
_ + "қақ" => mkN004 form;
|
_ + "қақ" => mkN015 form;
|
||||||
_ + "ыла" => mkN030 form;
|
_ + "ыла" => mkN030 form;
|
||||||
_ + "ола" => mkN030 form;
|
_ + "ола" => mkN030 form;
|
||||||
_ + "рда" => mkN030 form;
|
_ + "рда" => mkN030 form;
|
||||||
@@ -127,7 +127,7 @@ oper
|
|||||||
_ + "зік" => mkN033 form;
|
_ + "зік" => mkN033 form;
|
||||||
_ + "біз" => mkN010 form;
|
_ + "біз" => mkN010 form;
|
||||||
_ + "көз" => mkN010 form;
|
_ + "көз" => mkN010 form;
|
||||||
_ + "сөз" => mkN067 form;
|
_ + "сөз" => mkN029 form;
|
||||||
_ + "быз" => mkN039 form;
|
_ + "быз" => mkN039 form;
|
||||||
_ + "кше" => mkN042 form;
|
_ + "кше" => mkN042 form;
|
||||||
_ + "рпе" => mkN042 form;
|
_ + "рпе" => mkN042 form;
|
||||||
@@ -227,14 +227,14 @@ oper
|
|||||||
_ + "сі" => mkN042 form;
|
_ + "сі" => mkN042 form;
|
||||||
_ + "с" => mkN001 form;
|
_ + "с" => mkN001 form;
|
||||||
_ + "т" => mkN001 form;
|
_ + "т" => mkN001 form;
|
||||||
_ + "ш" => mkN004 form;
|
_ + "ш" => mkN001 form;
|
||||||
_ + "м" => mkN028 form;
|
_ + "м" => mkN016 form;
|
||||||
_ + "н" => mkN026 form;
|
_ + "н" => mkN026 form;
|
||||||
_ + "ң" => mkN016 form;
|
_ + "ң" => mkN016 form;
|
||||||
_ + "п" => mkN043 form;
|
_ + "п" => mkN043 form;
|
||||||
_ + "д" => mkN004 form;
|
_ + "д" => mkN002 form;
|
||||||
_ + "қ" => mkN015 form;
|
_ + "қ" => mkN015 form;
|
||||||
_ + "х" => mkN004 form;
|
_ + "х" => mkN001 form;
|
||||||
_ + "а" => mkN005 form;
|
_ + "а" => mkN005 form;
|
||||||
_ + "ы" => mkN030 form;
|
_ + "ы" => mkN030 form;
|
||||||
_ + "я" => mkN024 form;
|
_ + "я" => mkN024 form;
|
||||||
@@ -302,25 +302,37 @@ oper
|
|||||||
|
|
||||||
regV : Str -> V -- Infinitive
|
regV : Str -> V -- Infinitive
|
||||||
= \form -> case form of {
|
= \form -> case form of {
|
||||||
|
_ + "ану" => mkV003 form;
|
||||||
|
_ + "ыну" => mkV003 form;
|
||||||
|
_ + "ону" => mkV003 form;
|
||||||
|
_ + "ұну" => mkV003 form;
|
||||||
|
_ + "азу" => mkV003 form;
|
||||||
|
_ + "ызу" => mkV003 form;
|
||||||
|
_ + "озу" => mkV003 form;
|
||||||
|
_ + "ұзу" => mkV003 form;
|
||||||
|
_ + "арту" => mkV001 form;
|
||||||
|
_ + "ырту" => mkV001 form;
|
||||||
|
_ + "орту" => mkV001 form;
|
||||||
|
_ + "ұрту" => mkV001 form;
|
||||||
_ + "лту" => mkV005 form;
|
_ + "лту" => mkV005 form;
|
||||||
_ + "pту" => mkV007 form;
|
_ + "рту" => mkV007 form;
|
||||||
_ + "eту" => mkV007 form;
|
_ + "ету" => mkV007 form;
|
||||||
_ + "iту" => mkV007 form;
|
_ + "іту" => mkV007 form;
|
||||||
_ + "үту" => mkV010 form;
|
_ + "үту" => mkV010 form;
|
||||||
_ + "тaу" => mkV006 form;
|
_ + "тау" => mkV006 form;
|
||||||
_ + "сaу" => mkV006 form;
|
_ + "сау" => mkV006 form;
|
||||||
_ + "нaу" => mkV011 form;
|
_ + "нау" => mkV011 form;
|
||||||
_ + "қaу" => mkV011 form;
|
_ + "қау" => mkV011 form;
|
||||||
_ + "paу" => mkV026 form;
|
_ + "рау" => mkV026 form;
|
||||||
_ + "apу" => mkV003 form;
|
_ + "ару" => mkV003 form;
|
||||||
_ + "ыpу" => mkV003 form;
|
_ + "ыру" => mkV003 form;
|
||||||
_ + "ipу" => mkV023 form;
|
_ + "іру" => mkV023 form;
|
||||||
_ + "ту" => mkV001 form;
|
_ + "ту" => mkV001 form;
|
||||||
_ + "aу" => mkV002 form;
|
_ + "ау" => mkV002 form;
|
||||||
_ + "лу" => mkV033 form;
|
_ + "лу" => mkV033 form;
|
||||||
_ + "шу" => mkV010 form;
|
_ + "шу" => mkV010 form;
|
||||||
_ + "уу" => mkV006 form;
|
_ + "уу" => mkV006 form;
|
||||||
_ + "eу" => mkV009 form;
|
_ + "еу" => mkV009 form;
|
||||||
_ + "су" => mkV010 form;
|
_ + "су" => mkV010 form;
|
||||||
_ + "бу" => mkV020 form;
|
_ + "бу" => mkV020 form;
|
||||||
_ + "ңу" => mkV023 form;
|
_ + "ңу" => mkV023 form;
|
||||||
@@ -330,7 +342,7 @@ oper
|
|||||||
|
|
||||||
reg2V : Str -> Str -> V -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg
|
reg2V : Str -> Str -> V -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg
|
||||||
= \form1, form2 -> case <form1, form2> of {
|
= \form1, form2 -> case <form1, form2> of {
|
||||||
<_ + "aу", _ + "iн"> => mkV011 form1;
|
<_ + "ау", _ + "ін"> => mkV011 form1;
|
||||||
_ => regV form1
|
_ => regV form1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -345,7 +357,7 @@ mkN = overload {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkN2 = overload {
|
mkN2 = overload {
|
||||||
mkN2 : N -> N2 = \n -> lin N2 n ** {c2=noPrep};
|
mkN2 : N -> N2 = \n -> lin N2 n ** {c2=genPrep};
|
||||||
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {c2=p};
|
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {c2=p};
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -353,6 +365,11 @@ mkPN : Str -> PN = \s -> lin PN {s=s} ;
|
|||||||
mkLN : Str -> LN = \s -> lin LN {s=s} ;
|
mkLN : Str -> LN = \s -> lin LN {s=s} ;
|
||||||
mkGN : Str -> GN = \s -> lin GN {s=s} ;
|
mkGN : Str -> GN = \s -> lin GN {s=s} ;
|
||||||
mkSN : Str -> SN = \s -> lin SN {s=s} ;
|
mkSN : Str -> SN = \s -> lin SN {s=s} ;
|
||||||
|
mkPron : (nom,acc,dat,loc,gen,instr,ablat : Str) -> Person -> Number -> Pron =
|
||||||
|
\nom,acc,dat,loc,gen,instr,ablat,p,n -> lin Pron {
|
||||||
|
s = table {Nom=>nom; Acc=>acc; Dat=>dat; Loc=>loc; Gen=>gen; Instr=>instr; Ablat=>ablat};
|
||||||
|
a = {p=p; n=n}
|
||||||
|
} ;
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : Str -> V = regV; -- Infinitive
|
mkV : Str -> V = regV; -- Infinitive
|
||||||
@@ -361,7 +378,7 @@ mkV = overload {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2 = overload {
|
mkV2 = overload {
|
||||||
mkV2 : V -> V2 = \v -> lin V2 v ** {c2=noPrep} ;
|
mkV2 : V -> V2 = \v -> lin V2 v ** {c2=accPrep} ;
|
||||||
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 v ** {c2=p} ;
|
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 v ** {c2=p} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -371,32 +388,32 @@ mkVQ : V -> VQ = \v -> lin VQ v ;
|
|||||||
mkVA : V -> VA = \v -> lin VA v ;
|
mkVA : V -> VA = \v -> lin VA v ;
|
||||||
|
|
||||||
mkV2V = overload {
|
mkV2V = overload {
|
||||||
mkV2V : V -> V2V = \v -> lin V2V v ** {c2,c3=noPrep} ;
|
mkV2V : V -> V2V = \v -> lin V2V v ** {c2=accPrep; c3=noPrep} ;
|
||||||
mkV2V : V -> Prep -> Prep -> V2V = \v,p2,p3 -> lin V2V v ** {c2=p2; c3=p3} ;
|
mkV2V : V -> Prep -> Prep -> V2V = \v,p2,p3 -> lin V2V v ** {c2=p2; c3=p3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2S = overload {
|
mkV2S = overload {
|
||||||
mkV2S : V -> V2S = \v -> lin V2S v ** {c2,c3=noPrep} ;
|
mkV2S : V -> V2S = \v -> lin V2S v ** {c2=accPrep; c3=noPrep} ;
|
||||||
mkV2S : V -> Prep -> Prep -> V2S = \v,p2,p3 -> lin V2S v ** {c2=p2; c3=p3} ;
|
mkV2S : V -> Prep -> Prep -> V2S = \v,p2,p3 -> lin V2S v ** {c2=p2; c3=p3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2Q = overload {
|
mkV2Q = overload {
|
||||||
mkV2Q : V -> V2Q = \v -> lin V2Q v ** {c2,c3=noPrep} ;
|
mkV2Q : V -> V2Q = \v -> lin V2Q v ** {c2=accPrep; c3=noPrep} ;
|
||||||
mkV2Q : V -> Prep -> Prep -> V2Q = \v,p2,p3 -> lin V2Q v ** {c2=p2; c3=p3} ;
|
mkV2Q : V -> Prep -> Prep -> V2Q = \v,p2,p3 -> lin V2Q v ** {c2=p2; c3=p3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV2A = overload {
|
mkV2A = overload {
|
||||||
mkV2A : V -> V2A = \v -> lin V2A v ** {c2,c3=noPrep} ;
|
mkV2A : V -> V2A = \v -> lin V2A v ** {c2=accPrep; c3=noPrep} ;
|
||||||
mkV2A : V -> Prep -> Prep -> V2A = \v,p2,p3 -> lin V2A v ** {c2=p2; c3=p3} ;
|
mkV2A : V -> Prep -> Prep -> V2A = \v,p2,p3 -> lin V2A v ** {c2=p2; c3=p3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkV3 = overload {
|
mkV3 = overload {
|
||||||
mkV3 : V -> V3 = \v -> lin V3 v ** {c2,c3=noPrep} ;
|
mkV3 : V -> V3 = \v -> lin V3 v ** {c2=datPrep; c3=accPrep} ;
|
||||||
mkV3 : V -> Prep -> Prep -> V3 = \v,p2,p3 -> lin V3 v ** {c2=p2; c3=p3} ;
|
mkV3 : V -> Prep -> Prep -> V3 = \v,p2,p3 -> lin V3 v ** {c2=p2; c3=p3} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkA : Str -> A = \s -> lin A {s=s} ;
|
mkA : Str -> A = \s -> lin A {s=s} ;
|
||||||
mkA2 : A -> A2 = \a -> lin A2 a ** {c2=noPrep} ;
|
mkA2 : A -> A2 = \a -> lin A2 a ** {c2=datPrep} ;
|
||||||
|
|
||||||
mkAdv : Str -> Adv = \s -> lin Adv {s=s} ;
|
mkAdv : Str -> Adv = \s -> lin Adv {s=s} ;
|
||||||
mkAdV : Str -> AdV = \s -> lin AdV {s=s} ;
|
mkAdV : Str -> AdV = \s -> lin AdV {s=s} ;
|
||||||
@@ -407,7 +424,13 @@ mkInterj : Str -> Interj = \s -> lin Interj {s=s} ;
|
|||||||
|
|
||||||
mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
|
mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
|
||||||
|
|
||||||
mkPrep : Str -> Prep = \s -> lin Prep {s=s} ;
|
mkPrep = overload {
|
||||||
noPrep : Prep = lin Prep {s=""} ;
|
mkPrep : Str -> Prep = \s -> lin Prep {s=s; c=Nom} ;
|
||||||
|
mkPrep : Str -> Case -> Prep = \s,c -> lin Prep {s=s; c=c}
|
||||||
|
} ;
|
||||||
|
noPrep : Prep = lin Prep {s=""; c=Nom} ;
|
||||||
|
accPrep : Prep = lin Prep {s=""; c=Acc} ;
|
||||||
|
datPrep : Prep = lin Prep {s=""; c=Dat} ;
|
||||||
|
genPrep : Prep = lin Prep {s=""; c=Gen} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
concrete PhraseKaz of Phrase = CatKaz ** open Prelude, ResKaz in {
|
concrete PhraseKaz of Phrase = CatKaz ** open Prelude, ResKaz in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pc u voc = {s=pc.s ++ u.s ++ voc.s} ;
|
||||||
|
UttS s = s ; UttQS s = s ; UttNP np = {s=np.s ! Nom} ; UttCN cn = {s=cn.s ! Nom ! Sg} ;
|
||||||
UttS s = s ;
|
UttAP ap = ap ; UttAdv adv = adv ; UttIP ip = ip ; UttInterj i = i ;
|
||||||
UttInterj i = i ;
|
UttImpSg pol imp = {s=imp.s ! rglPolarity pol.p ! Informal ! Sg} ;
|
||||||
|
UttImpPl pol imp = {s=imp.s ! rglPolarity pol.p ! Informal ! Pl} ;
|
||||||
NoPConj = {s = []} ;
|
UttImpPol pol imp = {s=imp.s ! rglPolarity pol.p ! Formal ! Sg} ;
|
||||||
|
UttVP vp = {s=vp.infinitive} ;
|
||||||
NoVoc = {s = []} ;
|
VocNP np = {s=np.s ! Nom} ; NoVoc = {s=[]} ; NoPConj = {s=[]} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
concrete QuestionKaz of Question = CatKaz ** open ResKaz, ParadigmsKaz in {
|
||||||
|
lin
|
||||||
|
QuestCl cl = cl ;
|
||||||
|
QuestVP ip vp = mkClause {s=\\_ => ip.s;a=defaultAgr} vp ;
|
||||||
|
QuestSlash ip cl = cl ;
|
||||||
|
QuestIAdv i cl = {
|
||||||
|
pres=\\p => i.s ++ cl.pres ! p;
|
||||||
|
past=\\p => i.s ++ cl.past ! p;
|
||||||
|
fut=\\p => i.s ++ cl.fut ! p;
|
||||||
|
cond=\\p => i.s ++ cl.cond ! p;
|
||||||
|
anter=\\p => i.s ++ cl.anter ! p
|
||||||
|
} ;
|
||||||
|
QuestIComp i np = mkClause np (prefixVerb i.s (mkV "болу")) ;
|
||||||
|
IdetCN det cn = {s=det.s ++ cn.s ! Nom ! det.n} ;
|
||||||
|
IdetIP det = {s=det.s} ;
|
||||||
|
IdetQuant q num = {s=q.s ++ num.s;n=num.n} ;
|
||||||
|
AdvIP ip adv = {s=adv.s ++ ip.s} ;
|
||||||
|
PrepIP prep ip = {s=ip.s ++ prep.s} ;
|
||||||
|
AdvIAdv i adv = {s=adv.s ++ i.s} ;
|
||||||
|
CompIP ip = ip ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
concrete RelativeKaz of Relative = CatKaz ** open ResKaz, (P = ParamX) in {
|
||||||
|
lin
|
||||||
|
IdRP = {s=""} ;
|
||||||
|
RelVP rp vp = {s=rp.s ++ vp.infinitive} ;
|
||||||
|
RelSlash rp cl = {s=rp.s ++ cl.pres ! P.Pos} ;
|
||||||
|
}
|
||||||
+79
-3
@@ -1,11 +1,35 @@
|
|||||||
resource ResKaz = {
|
resource ResKaz = open (P = ParamX) in {
|
||||||
|
|
||||||
oper Compl = {s : Str} ;
|
|
||||||
|
|
||||||
param Case = Nom | Acc | Dat | Loc | Gen | Instr | Ablat ;
|
param Case = Nom | Acc | Dat | Loc | Gen | Instr | Ablat ;
|
||||||
|
oper Compl = {s : Str; c : Case} ;
|
||||||
param Number = Sg | Pl ;
|
param Number = Sg | Pl ;
|
||||||
param Person = P1 | P2 Formality | P3 ;
|
param Person = P1 | P2 Formality | P3 ;
|
||||||
param Formality = Informal | Formal ;
|
param Formality = Informal | Formal ;
|
||||||
|
oper Agr = {p : Person; n : Number} ;
|
||||||
|
-- MorphoKaz's generated possessive tables use the two P2 labels in the
|
||||||
|
-- opposite order from verbal agreement. Normalize them at noun lookup.
|
||||||
|
oper nounPerson : Person -> Person = \p -> case p of {
|
||||||
|
P2 Informal => P2 Formal;
|
||||||
|
P2 Formal => P2 Informal;
|
||||||
|
_ => p
|
||||||
|
} ;
|
||||||
|
-- The source morphology has no separate second/third-person forms for a
|
||||||
|
-- plural possessor. Kazakh uses the same possessive ending in these cells;
|
||||||
|
-- plurality is already expressed by the possessor NP/pronoun.
|
||||||
|
oper possForm : Noun -> Number -> Person -> Number -> Str = \noun,owner,p,n ->
|
||||||
|
noun.poss ! case <owner,p> of {
|
||||||
|
<Pl,P2 _> => Sg ;
|
||||||
|
<Pl,P3> => Sg ;
|
||||||
|
_ => owner
|
||||||
|
} ! p ! n ;
|
||||||
|
param Possessor = NoPoss | Poss Person Number ;
|
||||||
|
oper Clause = {
|
||||||
|
pres : P.Polarity => Str;
|
||||||
|
past : P.Polarity => Str;
|
||||||
|
fut : P.Polarity => Str;
|
||||||
|
cond : P.Polarity => Str;
|
||||||
|
anter : P.Polarity => Str
|
||||||
|
} ;
|
||||||
oper Noun = {s: Case => Number => Str; poss: Number => Person => Number => Str} ; -- 1651
|
oper Noun = {s: Case => Number => Str; poss: Number => Person => Number => Str} ; -- 1651
|
||||||
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Noun =
|
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Noun =
|
||||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30 ->
|
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30 ->
|
||||||
@@ -321,6 +345,58 @@ oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper mapVerb : (Str -> Str) -> Verb -> Verb = \f,v -> {
|
||||||
|
infinitive = f v.infinitive ;
|
||||||
|
indicative = {
|
||||||
|
fut = f v.indicative.fut ;
|
||||||
|
pres = {
|
||||||
|
progressive = \\pol,p,n => f (v.indicative.pres.progressive ! pol ! p ! n) ;
|
||||||
|
noAspect = \\pol,p,n => f (v.indicative.pres.noAspect ! pol ! p ! n)
|
||||||
|
} ;
|
||||||
|
past = {
|
||||||
|
perfect = \\pol,p,n => f (v.indicative.past.perfect ! pol ! p ! n) ;
|
||||||
|
progressive = \\pol,p,n => f (v.indicative.past.progressive ! pol ! p ! n) ;
|
||||||
|
noAspect = \\pol,p,n => f (v.indicative.past.noAspect ! pol ! p ! n)
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
imperative = \\pol,form,n => f (v.imperative ! pol ! form ! n) ;
|
||||||
|
subjunctive = \\p,n => f (v.subjunctive ! p ! n)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper prefixVerb : Str -> Verb -> Verb = \x,v -> mapVerb (\s -> x ++ s) v ;
|
||||||
|
|
||||||
|
oper NPForm = {s : Case => Str; a : Agr} ;
|
||||||
|
oper defaultAgr : Agr = {p=P3; n=Sg} ;
|
||||||
|
oper complNP : Compl -> NPForm -> Str = \c,np -> np.s ! c.c ++ c.s ;
|
||||||
|
|
||||||
|
oper rglPolarity : P.Polarity -> Polarity = \pol -> case pol of {
|
||||||
|
P.Pos => Pos;
|
||||||
|
P.Neg => Neg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper selectVerb : Verb -> P.Tense -> P.Anteriority -> P.Polarity -> Agr -> Str =
|
||||||
|
\v,t,a,pol,agr -> case <t,a> of {
|
||||||
|
<P.Pres,P.Simul> => v.indicative.pres.noAspect ! rglPolarity pol ! agr.p ! agr.n ;
|
||||||
|
<P.Pres,P.Anter> => v.indicative.past.perfect ! rglPolarity pol ! agr.p ! agr.n ;
|
||||||
|
<P.Past,P.Simul> => v.indicative.past.noAspect ! rglPolarity pol ! agr.p ! agr.n ;
|
||||||
|
<P.Past,P.Anter> => v.indicative.past.perfect ! rglPolarity pol ! agr.p ! agr.n ;
|
||||||
|
-- The habitual/non-past form is also the ordinary future form.
|
||||||
|
<P.Fut,_> => v.indicative.pres.noAspect ! rglPolarity pol ! agr.p ! agr.n ;
|
||||||
|
<P.Cond,_> => v.subjunctive ! agr.p ! agr.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper mkClause : NPForm -> Verb -> Clause = \np,vp -> {
|
||||||
|
pres = \\pol => np.s ! Nom ++ selectVerb vp P.Pres P.Simul pol np.a ;
|
||||||
|
past = \\pol => np.s ! Nom ++ selectVerb vp P.Past P.Simul pol np.a ;
|
||||||
|
fut = \\pol => np.s ! Nom ++ selectVerb vp P.Fut P.Simul pol np.a ;
|
||||||
|
cond = \\pol => np.s ! Nom ++ selectVerb vp P.Cond P.Simul pol np.a ;
|
||||||
|
anter = \\pol => np.s ! Nom ++ selectVerb vp P.Past P.Anter pol np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper stringClause : Str -> Clause = \s -> {
|
||||||
|
pres=\\_ => s; past=\\_ => s; fut=\\_ => s; cond=\\_ => s; anter=\\_ => s
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper coord : Str -> Str -> Str -> Str = \c,x,y -> x ++ c ++ y ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
concrete SentenceKaz of Sentence = CatKaz ** open ResKaz, (P = ParamX) in {
|
||||||
|
lin
|
||||||
|
PredVP np vp = mkClause np vp ;
|
||||||
|
PredSCVP sc vp = mkClause {s=\\_ => sc.s;a=defaultAgr} vp ;
|
||||||
|
UseCl temp pol cl = {
|
||||||
|
s=case <temp.t,temp.a> of {
|
||||||
|
<P.Pres,P.Simul> => cl.pres ! pol.p;
|
||||||
|
<P.Pres,P.Anter> => cl.anter ! pol.p;
|
||||||
|
<P.Past,P.Simul> => cl.past ! pol.p;
|
||||||
|
<P.Past,P.Anter> => cl.anter ! pol.p;
|
||||||
|
<P.Fut,_> => cl.fut ! pol.p;
|
||||||
|
<P.Cond,_> => cl.cond ! pol.p
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
UseQCl temp pol cl = {
|
||||||
|
s=case <temp.t,temp.a> of {
|
||||||
|
<P.Pres,P.Simul> => cl.pres ! pol.p;
|
||||||
|
<P.Pres,P.Anter> => cl.anter ! pol.p;
|
||||||
|
<P.Past,P.Simul> => cl.past ! pol.p;
|
||||||
|
<P.Past,P.Anter> => cl.anter ! pol.p;
|
||||||
|
<P.Fut,_> => cl.fut ! pol.p;
|
||||||
|
<P.Cond,_> => cl.cond ! pol.p
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
UseRCl temp pol rcl = rcl ;
|
||||||
|
UseSlash temp pol cl = {
|
||||||
|
s=cl.pres ! pol.p
|
||||||
|
} ;
|
||||||
|
AdvS adv s = {
|
||||||
|
s=adv.s ++ s.s
|
||||||
|
} ;
|
||||||
|
ExtAdvS adv s = {s=adv.s ++ "," ++ s.s} ;
|
||||||
|
SSubjS a sub b = {
|
||||||
|
s=a.s ++ b.s ++ sub.s
|
||||||
|
} ;
|
||||||
|
RelS s rs = {
|
||||||
|
s=s.s ++ "," ++ rs.s
|
||||||
|
} ;
|
||||||
|
ImpVP vp = {s=vp.imperative} ;
|
||||||
|
AdvImp adv imp = {
|
||||||
|
s=\\pol,form,n => adv.s ++ imp.s ! pol ! form ! n
|
||||||
|
} ;
|
||||||
|
EmbedS s = s ;
|
||||||
|
EmbedQS s = s ;
|
||||||
|
SlashVP np vp = mkClause np vp ;
|
||||||
|
AdvSlash cl adv = {
|
||||||
|
pres=\\p => adv.s ++ cl.pres ! p;
|
||||||
|
past=\\p => adv.s ++ cl.past ! p;
|
||||||
|
fut=\\p => adv.s ++ cl.fut ! p;
|
||||||
|
cond=\\p => adv.s ++ cl.cond ! p;
|
||||||
|
anter=\\p => adv.s ++ cl.anter ! p
|
||||||
|
} ;
|
||||||
|
SlashPrep cl prep = cl ;
|
||||||
|
SlashVS np vs cl = mkClause np (prefixVerb cl.s vs) ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
concrete VerbKaz of Verb = CatKaz ** open ResKaz, ParadigmsKaz in {
|
||||||
|
lin
|
||||||
|
UseV v = v ; SlashV2a v = v ; ComplSlash v np = prefixVerb (complNP v.c2 np) v ;
|
||||||
|
AdvVP vp adv = prefixVerb adv.s vp ; ExtAdvVP vp adv = prefixVerb (adv.s ++ ",") vp ;
|
||||||
|
AdVVP adv vp = prefixVerb adv.s vp ;
|
||||||
|
AdvVPSlash vp adv = lin VPSlash (prefixVerb adv.s vp ** {c2=vp.c2}) ;
|
||||||
|
AdVVPSlash adv vp = lin VPSlash (prefixVerb adv.s vp ** {c2=vp.c2}) ;
|
||||||
|
Slash2V3 v np = lin VPSlash (prefixVerb (complNP v.c2 np) v ** {c2=v.c3}) ;
|
||||||
|
Slash3V3 v np = lin VPSlash (prefixVerb (complNP v.c3 np) v ** {c2=v.c2}) ;
|
||||||
|
SlashV2S v s = lin VPSlash (prefixVerb s.s v ** {c2=v.c2}) ;
|
||||||
|
SlashV2Q v s = lin VPSlash (prefixVerb s.s v ** {c2=v.c2}) ;
|
||||||
|
SlashV2A v ap = lin VPSlash (prefixVerb ap.s v ** {c2=v.c2}) ;
|
||||||
|
ComplVS v s = prefixVerb s.s v ; ComplVQ v s = prefixVerb s.s v ;
|
||||||
|
ComplVA v ap = prefixVerb ap.s v ; ComplVV vv vp = prefixVerb vp.infinitive vv ;
|
||||||
|
SlashVV vv vp = lin VPSlash (prefixVerb vp.infinitive vv ** {c2=vp.c2}) ;
|
||||||
|
SlashV2V v vp = lin VPSlash (prefixVerb vp.infinitive v ** {c2=v.c2}) ;
|
||||||
|
SlashV2VNP v np vp = lin VPSlash (prefixVerb (complNP v.c2 np ++ vp.infinitive) v ** {c2=v.c3}) ;
|
||||||
|
UseComp comp = prefixVerb comp.s (mkV "болу") ; UseCopula = mkV "болу" ;
|
||||||
|
CompAP ap = ap ; CompNP np = {s=np.s ! Nom} ; CompAdv adv = adv ; CompCN cn = {s=cn.s ! Nom ! Sg} ;
|
||||||
|
VPSlashPrep vp prep = lin VPSlash (vp ** {c2=prep}) ;
|
||||||
|
PassV2 vp = prefixVerb "" vp ; ReflVP vp = vp ;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user