mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
improved several functions
This commit is contained in:
@@ -3,19 +3,21 @@ concrete AdjectiveMkd of Adjective = CatMkd ** open Prelude,ResMkd in {
|
||||
lin AdAP a ap = {s = \\s,g => a.s ++ ap.s ! s ! g;
|
||||
isPre = ap.isPre} ;
|
||||
lin AdjOrd o = {s = \\s,g => o.s; isPre = False} ;
|
||||
lin AdvAP ap a = {s = \\s,g => ap.s ! s ! g ++ a.s;
|
||||
isPre = ap.isPre} ;
|
||||
lin AdvAP ap adv = {
|
||||
s = \\s,g => ap.s ! s ! g ++ adv.s;
|
||||
isPre = False
|
||||
} ;
|
||||
lin CAdvAP c ap np = {s = \\s,g => c.s
|
||||
++ ap.s ! s ! g ++ np.s ! RSubj;
|
||||
isPre = ap.isPre} ;
|
||||
lin ComparA a np = {s = \\s,g => a.s ! s ! g ++ np.s ! RSubj;
|
||||
lin ComparA a np = {s = \\s,g => "по" ++ BIND ++ a.s ! s ! g ++ "од" ++ np.s ! RPrep;
|
||||
isPre = False} ;
|
||||
lin ComplA2 a2 np = {s = \\s,g => a2.s ! s ! g ++ np.s ! RSubj;
|
||||
lin ComplA2 a2 np = {s = \\s,g => a2.s ! s ! g ++ a2.c2.s ++ np.s ! RObj a2.c2.c;
|
||||
isPre = False} ;
|
||||
lin PositA a = a ** {isPre = True} ;
|
||||
lin ReflA2 a2 = {s = \\s,g => a2.s ! s ! g; isPre = False} ;
|
||||
lin SentAP ap sc = {s = \\s,g => ap.s ! s ! g ++ sc.s;
|
||||
isPre = ap.isPre} ;
|
||||
lin UseA2 a2 = {s = \\s,g => a2.s ! s ! g; isPre = False} ;
|
||||
lin UseComparA a = {s = \\s,g => a.s ! s ! g; isPre = False} ;
|
||||
lin UseA2 a2 = {s = a2.s; isPre = True} ;
|
||||
lin UseComparA a = {s = \\s,g => "по" ++ BIND ++ a.s ! s ! g; isPre = True} ;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ lincat VP = Verb ** {compl : Agr => Str} ;
|
||||
lincat VPSlash = Verb ** {compl : Agr => Str; c2 : Compl} ;
|
||||
lincat S,QS = {s : Str} ;
|
||||
lincat RS = {s : GenNum => Str} ;
|
||||
lincat Cl = {s : ResMkd.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
lincat Cl = {s : Order => ResMkd.Tense => Anteriority => Polarity => Str} ;
|
||||
lincat QCl = {s : ResMkd.Tense => Anteriority => Polarity => Str} ;
|
||||
lincat RCl = {s : GenNum => ResMkd.Tense => Anteriority => Polarity => Str} ;
|
||||
lincat RP = {s : GenNum => Str} ;
|
||||
|
||||
@@ -95,8 +95,8 @@ concrete NounMkd of Noun = CatMkd ** open Prelude,ResMkd in {
|
||||
} ;
|
||||
lin OrdDigits d = {s = d.s} ;
|
||||
lin OrdNumeral n = {s = n.s} ;
|
||||
lin OrdNumeralSuperl n a = {s = n.s ++ a.s ! Indef ! GSg Masc} ;
|
||||
lin OrdSuperl a = {s = a.s ! Indef ! GSg Masc} ;
|
||||
lin OrdNumeralSuperl n a = {s = n.s ++ "нај" ++ BIND ++ a.s ! Indef ! GSg Masc} ;
|
||||
lin OrdSuperl a = {s = "нај" ++ BIND ++ a.s ! Indef ! GSg Masc} ;
|
||||
lin PPartNP np v2 = {s = \\r => np.s ! r
|
||||
++ v2.present ! Imperfective ! Sg ! np.a.p;
|
||||
vocative = np.vocative ++ v2.present ! Imperfective ! Sg ! np.a.p;
|
||||
|
||||
@@ -3,17 +3,20 @@ concrete QuestionMkd of Question = CatMkd ** open Prelude,ResMkd in {
|
||||
lin AdvIP ip a = {s = ip.s ++ a.s; g = ip.g} ;
|
||||
lin CompIAdv i = {s = i.s} ;
|
||||
lin CompIP ip = {s = ip.s} ;
|
||||
lin IdetCN i cn = {s = i.s ! cn.g ++ cn.s ! Indef ! i.n;
|
||||
g = GSg Masc} ;
|
||||
lin IdetIP i = {s = i.s ! Masc; g = GSg Masc} ;
|
||||
lin IdetQuant i n = {s = \\g => i.s ! GSg Masc ++ n.s; n = Sg} ;
|
||||
lin PrepIP p ip = {s = p.s ++ ip.s} ;
|
||||
lin IdetCN idet cn = {
|
||||
s = idet.s ! cn.g ++ cn.s ! Indef ! idet.n;
|
||||
g = genNum cn.g idet.n
|
||||
} ;
|
||||
lin IdetIP idet = {s = idet.s ! Masc; g = genNum Masc idet.n} ;
|
||||
lin IdetQuant i n = {
|
||||
s = \\g => i.s ! GSg Masc ++ n.s;
|
||||
n = Sg
|
||||
} ;
|
||||
lin PrepIP p ip = {s : Str = p.s ++ ip.s} ;
|
||||
lincat QVP = {s : Str} ;
|
||||
lin QuestCl cl = {s = \\t,a,p => cl.s ! t ! a ! p ! Quest} ;
|
||||
lin QuestIAdv i cl = {s = \\t,a,p => i.s
|
||||
++ cl.s ! t ! a ! p ! Main} ;
|
||||
lin QuestCl cl = {s = cl.s ! Quest} ;
|
||||
lin QuestIAdv i cl = {s = \\t,a,p => i.s ++ cl.s ! Main ! t ! a ! p} ;
|
||||
lin QuestIComp i np = {s = \\t,a,p => i.s ++ np.s ! RSubj} ;
|
||||
lin QuestSlash ip c = {s = \\t,a,p => ip.s ++ c.s} ;
|
||||
lin QuestVP ip vp = {s = \\t,a,p => ip.s
|
||||
++ vp.present ! Imperfective ! Sg ! P1} ;
|
||||
lin QuestVP ip vp = {s = mkClause ip.s {g=ip.g; p=P3} vp ! Main} ;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ concrete RelativeMkd of Relative = CatMkd ** open Prelude,ResMkd in {
|
||||
GPl => "кои"
|
||||
}
|
||||
} ;
|
||||
lin RelCl cl = {s = \\g,t,a,p => cl.s ! t ! a ! p ! Main} ;
|
||||
lin RelCl cl = {s = \\g => cl.s ! Main} ;
|
||||
lin RelSlash rp c = {s = \\g,t,a,p => rp.s ! g ++ c.s} ;
|
||||
lin RelVP rp vp = {
|
||||
s = \\gn,t,a,p => mkClause (rp.s ! gn) {g=gn; p=P3} vp ! t ! a ! p ! Main
|
||||
s = \\gn => mkClause (rp.s ! gn) {g=gn; p=P3} vp ! Main
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -286,13 +286,13 @@ auxHave = {
|
||||
}
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> Verb ** {compl : Agr => Str} -> Tense => Anteriority => Polarity => Order => Str
|
||||
mkClause : Str -> Agr -> Verb ** {compl : Agr => Str} -> Order => Tense => Anteriority => Polarity => Str
|
||||
= \subj,agr,vp ->
|
||||
let n = case agr.g of {
|
||||
GSg _ => Sg ;
|
||||
GPl => Pl
|
||||
}
|
||||
in \\t,a,p,o =>
|
||||
in \\o,t,a,p =>
|
||||
case <t,a> of {
|
||||
<VPresent,Simul> => subj ++ neg ++ vp.present ! Imperfective ! n ! agr.p ++ li ++ vp.compl ! agr ;
|
||||
<VPresent,Anter> => case o of {
|
||||
|
||||
@@ -18,13 +18,13 @@ concrete SentenceMkd of Sentence = CatMkd ** open Prelude,ResMkd in {
|
||||
lin PredVP np vp = {s = mkClause (np.s ! RSubj) np.a vp} ;
|
||||
lin RelS s rs = {s = s.s ++ rs.s ! GSg Masc} ;
|
||||
lin SSubjS s s2 s3 = {s = s.s ++ s2.s ++ s3.s} ;
|
||||
lin SlashPrep cl p = {s = cl.s ! VPresent ! Simul ! Pos ! Main
|
||||
lin SlashPrep cl p = {s = cl.s ! Main ! VPresent ! Simul ! Pos
|
||||
++ p.s} ;
|
||||
lin SlashVP np v = {s = np.s ! RSubj
|
||||
++ v.present ! Imperfective ! Sg ! np.a.p} ;
|
||||
lin SlashVS np vs s = {s = np.s ! RSubj
|
||||
++ vs.present ! Imperfective ! Sg ! np.a.p ++ s.s} ;
|
||||
lin UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Main} ;
|
||||
lin UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! Main ! t.t ! t.a ! p.p} ;
|
||||
lin UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ;
|
||||
lin UseRCl t p cl = {s = \\gn => t.s ++ p.s ++ cl.s ! gn ! t.t ! t.a ! p.p} ;
|
||||
lin UseSlash t p c = {s = t.s ++ p.s ++ c.s} ;
|
||||
|
||||
Reference in New Issue
Block a user