mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Proper reflexive and medial verbs support together with completelly reworked case system.
This commit is contained in:
@@ -6,14 +6,14 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
ComparA a np = {
|
||||
s = \\aform => "ïî" ++ "-" ++ a.s ! aform ++ "îò" ++ np.s ! Nom ;
|
||||
s = \\aform => "ïî" ++ "-" ++ a.s ! aform ++ "îò" ++ np.s ! RSubj ;
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\aform => a.s ! aform ++ a.c2 ++ np.s ! Acc ;
|
||||
s = \\aform => a.s ! aform ++ a.c2 ++ np.s ! RObj Acc ;
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
||||
lin
|
||||
PositAdvAdj a = {s = a.s ! ASg Neut Indef} ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ "ïî" ++ "-" ++ a.s ! ASg Neut Indef ++ "îò" ++ np.s ! Acc
|
||||
s = cadv.s ++ "ïî" ++ "-" ++ a.s ! ASg Neut Indef ++ "îò" ++ np.s ! RObj Acc
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ "ïî" ++ "-" ++ a.s ! ASg Neut Indef ++ "îò" ++ s.s
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! prep.c} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! RObj prep.c} ;
|
||||
|
||||
AdAdv = cc2 ;
|
||||
|
||||
|
||||
@@ -30,23 +30,24 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||
Cl = {s : ResBul.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
Slash = {
|
||||
s : ResBul.Tense => Anteriority => Polarity => Order => Str ;
|
||||
c2 : Prep
|
||||
c2 : Preposition
|
||||
} ;
|
||||
Imp = {s : Polarity => GenNum => Str} ;
|
||||
|
||||
-- Question
|
||||
|
||||
QCl = {s : ResBul.Tense => Anteriority => Polarity => QForm => Str} ;
|
||||
IP = {s : Case => Str; gn : GenNum} ;
|
||||
IComp = {s : Str} ;
|
||||
IP = {s : Role => Str; gn : GenNum} ;
|
||||
IComp = {s1,s2 : Str} ;
|
||||
IDet = {s : GenNum => Str; n : Number} ;
|
||||
|
||||
-- Verb
|
||||
|
||||
VP = {
|
||||
s : ResBul.Tense => Anteriority => Polarity => Agr => Str ;
|
||||
s : ResBul.Tense => Anteriority => Polarity => Agr => Bool => Str ;
|
||||
imp : Polarity => Number => Str ;
|
||||
s2 : Agr => Str
|
||||
s2 : Agr => Str ;
|
||||
subjRole : Role
|
||||
} ;
|
||||
|
||||
Comp = {s : Agr => Str} ;
|
||||
@@ -60,15 +61,15 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||
|
||||
Adv = {s : Str} ;
|
||||
CAdv = {s : Str; sn : Str} ;
|
||||
IAdv = {s : Str} ;
|
||||
IAdv = {s1,s2 : Str} ;
|
||||
AdA = {s : Str} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
CN = {s : NForm => Str; g : DGender} ;
|
||||
NP = {s : Case => Str; a : Agr} ;
|
||||
Pron = {s : Case => Str; gen : AForm => Str; a : Agr} ;
|
||||
Det = {s : DGender => Case => Str ; n : Number; countable : Bool; spec : Species} ;
|
||||
NP = {s : Role => Str; a : Agr} ;
|
||||
Pron = {s : Role => Str; gen : AForm => Str; a : Agr} ;
|
||||
Det = {s : DGender => Role => Str ; n : Number; countable : Bool; spec : Species} ;
|
||||
Predet = {s : GenNum => Str} ;
|
||||
Ord = {s : AForm => Str; nonEmpty : Bool} ;
|
||||
Num = {s : DGenderSpecies => Str; n : Number; nonEmpty : Bool} ;
|
||||
@@ -88,8 +89,8 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VQ, VA = Verb ;
|
||||
V2, V2A = Verb ** {c2 : Prep} ;
|
||||
V3 = Verb ** {c2, c3 : Prep} ;
|
||||
V2, V2A = Verb ** {c2 : Preposition} ;
|
||||
V3 = Verb ** {c2, c3 : Preposition} ;
|
||||
|
||||
A = {s : AForm => Str} ;
|
||||
A2 = {s : AForm => Str ; c2 : Str} ;
|
||||
|
||||
@@ -113,7 +113,7 @@ lin
|
||||
flow_V = mkV148 "ňĺęŕ" ;
|
||||
fly_V = mkV177 "ëĺň˙" ;
|
||||
freeze_V = mkV186 "çŕěđúçâŕě" ;
|
||||
laugh_V = mkV160 "ńěĺ˙" ;
|
||||
laugh_V = reflV (mkV160 "ńěĺ˙") Acc ;
|
||||
lie_V = mkV178 "ëĺćŕ" ;
|
||||
play_V = mkV161 "čăđŕ˙" ;
|
||||
-- sew_V = IrregEng.sew_V ;
|
||||
@@ -131,9 +131,9 @@ lin
|
||||
-- bite_V2 = dirV2 IrregEng.bite_V ;
|
||||
count_V2 = dirV2 (mkV175 "áđî˙") ;
|
||||
cut_V2 = dirV2 (mkV157 "đĺćŕ") ;
|
||||
fear_V2 = dirV2 (mkV186 "ńňđŕőóâŕě") ;
|
||||
fight_V2 = dirV2 (mkV173 "áîđ˙") ;
|
||||
-- hit_V2 = dirV2 hit_V ;
|
||||
fear_V2 = dirV2 (reflV (mkV186 "ńňđŕőóâŕě") Acc) ;
|
||||
fight_V2 = dirV2 (reflV (mkV173 "áîđ˙") Acc) ;
|
||||
hit_V2 = dirV2 (mkV173 "óäŕđ˙") ;
|
||||
-- hold_V2 = dirV2 hold_V ;
|
||||
hunt_V2 = dirV2 (mkV174 "ëîâ˙") ;
|
||||
kill_V2 = dirV2 (mkV163 "óáč˙") ;
|
||||
|
||||
@@ -15,9 +15,9 @@ resource MorphoBul = ResBul ** open Prelude, (Predef=Predef) in {
|
||||
oper
|
||||
--2 Determiners
|
||||
|
||||
mkDeterminerSg : Str -> Str -> Str -> {s : DGender => Case => Str; n : Number; countable : Bool ; spec : Species} = \vseki,vsiaka,vsiako ->
|
||||
mkDeterminerSg : Str -> Str -> Str -> {s : DGender => Role => Str; n : Number; countable : Bool ; spec : Species} = \vseki,vsiaka,vsiako ->
|
||||
{s = \\g,_ => table DGender [vseki;vseki;vsiaka;vsiako] ! g; n = Sg; countable = False; spec = Indef} ;
|
||||
mkDeterminerPl : Str -> {s : DGender => Case => Str ; n : Number; countable : Bool ; spec : Species} = \vsicki ->
|
||||
mkDeterminerPl : Str -> {s : DGender => Role => Str ; n : Number; countable : Bool ; spec : Species} = \vsicki ->
|
||||
{s = \\_,_ => vsicki; n = Pl; countable = False; spec = Indef} ;
|
||||
|
||||
mkQuant : Str -> Str -> Str -> Str -> {s : GenNum => Str; spec : Species} = \tozi,tazi,towa,tezi -> {
|
||||
|
||||
@@ -4,27 +4,27 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
|
||||
lin
|
||||
DetCN det cn =
|
||||
{ s = \\c => let nf = case <det.n,det.spec> of {
|
||||
<Sg,Def> => case c of {
|
||||
Nom => NFSgDefNom ;
|
||||
_ => NF Sg Def
|
||||
} ;
|
||||
<Pl,Indef> => case det.countable of {
|
||||
True => NFPlCount ;
|
||||
False => NF Pl Indef
|
||||
} ;
|
||||
_ => NF det.n det.spec
|
||||
} ;
|
||||
s = det.s ! cn.g ! c ++ cn.s ! nf
|
||||
in case c of {
|
||||
Dat => "íà" ++ s;
|
||||
_ => s
|
||||
} ;
|
||||
{ s = \\role => let nf = case <det.n,det.spec> of {
|
||||
<Sg,Def> => case role of {
|
||||
RSubj => NFSgDefNom ;
|
||||
_ => NF Sg Def
|
||||
} ;
|
||||
<Pl,Indef> => case det.countable of {
|
||||
True => NFPlCount ;
|
||||
False => NF Pl Indef
|
||||
} ;
|
||||
_ => NF det.n det.spec
|
||||
} ;
|
||||
s = det.s ! cn.g ! role ++ cn.s ! nf
|
||||
in case role of {
|
||||
RObj Dat => "íà" ++ s;
|
||||
_ => s
|
||||
} ;
|
||||
a = {gn = gennum cn.g det.n; p = P3} ;
|
||||
} ;
|
||||
UsePN pn = { s = \\c => case c of {
|
||||
Dat => "íà" ++ pn.s;
|
||||
_ => pn.s
|
||||
UsePN pn = { s = \\role => case role of {
|
||||
RObj Dat => "íà" ++ pn.s;
|
||||
_ => pn.s
|
||||
} ;
|
||||
a = {gn = GSg pn.g; p = P3}
|
||||
} ;
|
||||
@@ -58,7 +58,7 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
PossPron p = {
|
||||
s = \\gn => p.gen ! aform gn Indef Nom ;
|
||||
s = \\gn => p.gen ! aform gn Indef RSubj ;
|
||||
spec = Indef
|
||||
} ;
|
||||
|
||||
@@ -97,8 +97,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||
UseN2 noun = noun ;
|
||||
UseN3 noun = noun ;
|
||||
|
||||
ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! Acc; g=f.g} ;
|
||||
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! Acc; c2 = f.c3; g=f.g} ;
|
||||
ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! RObj Acc; g=f.g} ;
|
||||
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! RObj Acc; c2 = f.c3; g=f.g} ;
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\nf => preOrPost ap.isPre (ap.s ! nform2aform nf cn.g) (cn.s ! (indefNForm nf)) ;
|
||||
|
||||
@@ -59,12 +59,18 @@ oper
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
|
||||
|
||||
reflV : V -> Case -> V ;
|
||||
phrasalV : V -> Case -> V ;
|
||||
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
|
||||
reflV v c = {s = v.s; vtype = VMedial c; lock_V=<>} ;
|
||||
phrasalV v c = {s = v.s; vtype = VPhrasal c; lock_V=<>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
@@ -84,17 +90,17 @@ oper
|
||||
mkVS : V -> VS ;
|
||||
|
||||
mkPN : Str -> Gender -> PN ;
|
||||
|
||||
mkIAdv : Str -> IAdv ;
|
||||
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
|
||||
mkPrep p c = {s = p; c = c; lock_Prep = <>} ;
|
||||
noPrep = mkPrep [] Acc ;
|
||||
|
||||
prepV2 v p = {s = v.s ; c2 = p ; lock_V2 = <>} ;
|
||||
prepV2 v p = {s = v.s; c2 = p; vtype = v.vtype; lock_V2 = <>} ;
|
||||
dirV2 v = prepV2 v noPrep ;
|
||||
|
||||
mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
mkV3 v p q = {s = v.s; s1 = v.s1; c2 = p; c3 = q; vtype = v.vtype; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v noPrep p ;
|
||||
dirdirV3 v = dirV3 v noPrep ;
|
||||
|
||||
@@ -102,4 +108,5 @@ oper
|
||||
|
||||
mkPN s g = {s = s; g = g ; lock_PN = <>} ;
|
||||
|
||||
mkIAdv s = {s1 = s; s2 = s + "òî"; lock_IAdv = <>} ;
|
||||
}
|
||||
@@ -7,5 +7,5 @@ concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! GPl} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! GPl} ;
|
||||
|
||||
UttIAdv iadv = iadv ;
|
||||
UttIAdv iadv = {s = iadv.s1} ;
|
||||
}
|
||||
|
||||
@@ -14,18 +14,18 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
QuestVP ip vp =
|
||||
let cl = mkClause (ip.s ! Nom) {gn = ip.gn ; p = P3} vp
|
||||
let cl = mkClause (ip.s ! RSubj) {gn = ip.gn ; p = P3} vp
|
||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! Main} ;
|
||||
|
||||
QuestSlash ip slash =
|
||||
mkQuestion (ss (slash.c2.s ++ ip.s ! slash.c2.c)) slash ;
|
||||
mkQuestion {s1 = slash.c2.s ++ ip.s ! (RObj slash.c2.c); s2 = slash.c2.s ++ ip.s ! (RObj slash.c2.c)} slash ;
|
||||
|
||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||
|
||||
QuestIComp icomp np =
|
||||
mkQuestion icomp (mkClause (np.s ! Nom) np.a (predV auxBe)) ;
|
||||
mkQuestion icomp (mkClause (np.s ! RSubj) np.a (predV verbBe)) ;
|
||||
|
||||
PrepIP p ip = {s = p.s ++ ip.s ! Nom} ;
|
||||
PrepIP p ip = {s1 = p.s ++ ip.s ! RSubj; s2 = p.s ++ ip.s ! RSubj} ;
|
||||
|
||||
AdvIP ip adv = {
|
||||
s = \\c => ip.s ! c ++ adv.s ;
|
||||
@@ -38,8 +38,8 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
_ => NF idet.n Indef
|
||||
}
|
||||
in idet.s ! gennum cn.g idet.n ++
|
||||
num.s ! dgenderSpecies cn.g Indef Nom ++
|
||||
ord.s ! aform (gennum cn.g num.n) Indef Nom ++
|
||||
num.s ! dgenderSpecies cn.g Indef RSubj ++
|
||||
ord.s ! aform (gennum cn.g num.n) Indef RSubj ++
|
||||
cn.s ! nf ;
|
||||
gn = gennum cn.g idet.n
|
||||
} ;
|
||||
|
||||
@@ -18,7 +18,8 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
-- This is the worst-case $Case$ needed for pronouns.
|
||||
|
||||
param
|
||||
Case = Nom | Acc | Dat;
|
||||
Role = RSubj | RObj Case ;
|
||||
Case = Acc | Dat;
|
||||
|
||||
NForm =
|
||||
NF Number Species
|
||||
@@ -54,6 +55,12 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
| VImperative Number
|
||||
| VGerund
|
||||
;
|
||||
|
||||
VType =
|
||||
VNormal
|
||||
| VMedial Case
|
||||
| VPhrasal Case
|
||||
;
|
||||
|
||||
-- The order of sentence is needed already in $VP$.
|
||||
|
||||
@@ -112,39 +119,39 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
GPl => Pl
|
||||
} ;
|
||||
|
||||
aform : GenNum -> Species -> Case -> AForm = \gn,spec,c ->
|
||||
aform : GenNum -> Species -> Role -> AForm = \gn,spec,role ->
|
||||
case gn of {
|
||||
GSg g => case <g,spec,c> of {
|
||||
<Masc,Def,Nom> => ASgMascDefNom ;
|
||||
_ => ASg g spec
|
||||
GSg g => case <g,spec,role> of {
|
||||
<Masc,Def,RSubj> => ASgMascDefNom ;
|
||||
_ => ASg g spec
|
||||
} ;
|
||||
GPl => APl spec
|
||||
} ;
|
||||
|
||||
dgenderSpecies : DGender -> Species -> Case -> DGenderSpecies =
|
||||
\g,spec,c -> case <g,spec> of {
|
||||
<DMasc,Indef> => DMascIndef ;
|
||||
<DMasc,Def> => case c of {
|
||||
Nom => DMascDefNom ;
|
||||
_ => DMascDef
|
||||
} ;
|
||||
<DMascPersonal,Indef> => DMascPersonalIndef ;
|
||||
<DMascPersonal,Def> => case c of {
|
||||
Nom => DMascPersonalDefNom ;
|
||||
_ => DMascPersonalDef
|
||||
} ;
|
||||
<DFem ,Indef> => DFemIndef ;
|
||||
<DFem ,Def> => DFemDef ;
|
||||
<DNeut,Indef> => DNeutIndef ;
|
||||
<DNeut,Def> => DNeutDef
|
||||
} ;
|
||||
dgenderSpecies : DGender -> Species -> Role -> DGenderSpecies =
|
||||
\g,spec,role -> case <g,spec> of {
|
||||
<DMasc,Indef> => DMascIndef ;
|
||||
<DMasc,Def> => case role of {
|
||||
RSubj => DMascDefNom ;
|
||||
_ => DMascDef
|
||||
} ;
|
||||
<DMascPersonal,Indef> => DMascPersonalIndef ;
|
||||
<DMascPersonal,Def> => case role of {
|
||||
RSubj => DMascPersonalDefNom ;
|
||||
_ => DMascPersonalDef
|
||||
} ;
|
||||
<DFem ,Indef> => DFemIndef ;
|
||||
<DFem ,Def> => DFemDef ;
|
||||
<DNeut,Indef> => DNeutIndef ;
|
||||
<DNeut,Def> => DNeutDef
|
||||
} ;
|
||||
|
||||
nform2aform : NForm -> DGender -> AForm
|
||||
= \nf,g -> case nf of {
|
||||
NF n spec => aform (gennum g n) spec Acc ;
|
||||
NFSgDefNom => aform (gennum g Sg) Def Nom ;
|
||||
NF n spec => aform (gennum g n) spec (RObj Acc) ;
|
||||
NFSgDefNom => aform (gennum g Sg) Def RSubj ;
|
||||
NFPlCount => APl Indef ;
|
||||
NFVocative => aform (gennum g Sg) Indef Acc
|
||||
NFVocative => aform (gennum g Sg) Indef (RObj Acc)
|
||||
} ;
|
||||
|
||||
indefNForm : NForm -> NForm
|
||||
@@ -159,96 +166,174 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
-- For $Verb$.
|
||||
|
||||
Verb : Type = {
|
||||
s : VForm => Str ;
|
||||
s : VForm => Str ;
|
||||
vtype : VType
|
||||
} ;
|
||||
|
||||
VP : Type = {
|
||||
s : Tense => Anteriority => Polarity => Agr => Str ;
|
||||
s : Tense => Anteriority => Polarity => Agr => Bool => Str ;
|
||||
imp : Polarity => Number => Str ;
|
||||
s2 : Agr => Str
|
||||
s2 : Agr => Str ;
|
||||
subjRole : Role
|
||||
} ;
|
||||
|
||||
predV : Verb -> VP =
|
||||
\verb ->
|
||||
let pol : Polarity -> Str -> Str = \p,vf -> case p of { Pos => vf ; Neg => "íå" ++ vf }
|
||||
in { s = \\t,a,p,agr => let present = verb.s ! (VPres (numGenNum agr.gn) agr.p) ;
|
||||
aorist = verb.s ! (VAorist (numGenNum agr.gn) agr.p) ;
|
||||
perfect = verb.s ! (VPerfect (aform agr.gn Indef Acc)) ;
|
||||
vf = case <t,a> of {
|
||||
<Pres,Simul> => present ;
|
||||
<Pres,Anter> => auxBe.s ! (VPres (numGenNum agr.gn) agr.p) ++ perfect ;
|
||||
<Past,Simul> => aorist ;
|
||||
<Past,Anter> => auxBe.s ! (VAorist (numGenNum agr.gn) agr.p) ++ perfect ;
|
||||
<Fut, Simul> => "ùå" ++ present ;
|
||||
<Fut, Anter> => "ùå" ++ auxBe.s ! (VPres (numGenNum agr.gn) agr.p) ++ perfect ;
|
||||
<Cond,Simul> => auxWould.s ! (VAorist (numGenNum agr.gn) agr.p) ++ perfect ;
|
||||
<Cond,Anter> => auxWould.s ! (VAorist (numGenNum agr.gn) agr.p) ++ auxBe.s ! (VPerfect (aform agr.gn Indef Acc)) ++ perfect
|
||||
{ s = \\t,a,p,agr,q => let
|
||||
clitic = case verb.vtype of {
|
||||
VNormal => {s=[]; agr=agr} ;
|
||||
VMedial c => {s=reflClitics ! c; agr=agr} ;
|
||||
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}}
|
||||
} ;
|
||||
|
||||
present = verb.s ! (VPres (numGenNum clitic.agr.gn) clitic.agr.p) ;
|
||||
aorist = verb.s ! (VAorist (numGenNum clitic.agr.gn) clitic.agr.p) ;
|
||||
perfect = verb.s ! (VPerfect (aform clitic.agr.gn Indef (RObj Acc))) ;
|
||||
|
||||
auxPres = auxBe clitic.s ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ;
|
||||
auxAorist = auxBe clitic.s ! VAorist (numGenNum clitic.agr.gn) clitic.agr.p ;
|
||||
auxPerfect = auxBe clitic.s ! VPerfect (aform clitic.agr.gn Indef (RObj Acc)) ;
|
||||
auxCondS = auxWould clitic.s ! VAorist (numGenNum clitic.agr.gn) clitic.agr.p ;
|
||||
auxCondA = auxCondS ++
|
||||
auxBe [] ! VPerfect (aform clitic.agr.gn Indef (RObj Acc)) ;
|
||||
|
||||
verbs : {aux:Str; main:Str}
|
||||
= case <t,a> of {
|
||||
<Pres,Simul> => {aux=clitic.s; main=present} ;
|
||||
<Pres,Anter> => {aux=auxPres; main=perfect} ;
|
||||
<Past,Simul> => {aux=clitic.s; main=aorist} ;
|
||||
<Past,Anter> => {aux=auxAorist; main=perfect} ;
|
||||
<Fut, Simul> => {aux=clitic.s; main=present} ;
|
||||
<Fut, Anter> => {aux=auxPres; main=perfect} ;
|
||||
<Cond,Simul> => {aux=auxCondS; main=perfect} ;
|
||||
<Cond,Anter> => {aux=auxCondA; main=perfect}
|
||||
} ;
|
||||
in pol p vf ;
|
||||
imp = \\p,n => pol p (verb.s ! VImperative n) ;
|
||||
s2 = \\_ => []
|
||||
|
||||
li = case q of {True => "ëè"; False => []} ;
|
||||
aux = case p of {
|
||||
Pos => case t of {
|
||||
Fut => {s1="ùå"++verbs.aux; s2=li} ;
|
||||
_ => case q of {True => {s1=[]; s2="ëè"++verbs.aux};
|
||||
False => {s1=verbs.aux; s2=[]}}
|
||||
} ;
|
||||
Neg => case t of {
|
||||
Fut => {s1="íå"++"ùå"++verbs.aux; s2=li} ;
|
||||
_ => case q of {True => {s1="íå"++verbs.aux; s2="ëè"};
|
||||
False => {s1="íå"++verbs.aux; s2=[]}}
|
||||
}
|
||||
}
|
||||
|
||||
in aux.s1 ++ verbs.main ++ aux.s2;
|
||||
imp = \\p,n => let ne = case p of {Pos => []; Neg => "íå"} ;
|
||||
in ne ++ verb.s ! VImperative n ;
|
||||
s2 = \\_ => [] ;
|
||||
subjRole = case verb.vtype of {
|
||||
VNormal => RSubj ;
|
||||
VMedial _ => RSubj ;
|
||||
VPhrasal c => RObj c
|
||||
}
|
||||
} ;
|
||||
|
||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
s = vp.s ;
|
||||
imp = vp.imp ;
|
||||
s2 = \\a => vp.s2 ! a ++ obj ! a
|
||||
s2 = \\a => vp.s2 ! a ++ obj ! a ;
|
||||
subjRole = vp.subjRole
|
||||
} ;
|
||||
|
||||
auxBe : Verb = {
|
||||
s = table {
|
||||
VPres Sg P1 => "ñúì" ;
|
||||
VPres Sg P2 => "ñè" ;
|
||||
VPres Sg P3 => "å" ;
|
||||
VPres Pl P1 => "ñìå" ;
|
||||
VPres Pl P2 => "ñòå" ;
|
||||
VPres Pl P3 => "ñà" ;
|
||||
VAorist Sg P1 => "áÿõ" ;
|
||||
VAorist Sg _ => "áåøå" ;
|
||||
VAorist Pl P1 => "áÿõìå" ;
|
||||
VAorist Pl P2 => "áÿõòå" ;
|
||||
VAorist Pl P3 => "áÿõà" ;
|
||||
VImperfect Sg P1 => "áÿõ" ;
|
||||
VImperfect Sg _ => "áåøå" ;
|
||||
VImperfect Pl P1 => "áÿõìå" ;
|
||||
VImperfect Pl P2 => "áÿõòå" ;
|
||||
VImperfect Pl P3 => "áÿõà" ;
|
||||
VPerfect aform => (regAdjective "áèë").s ! aform ;
|
||||
VPluPerfect aform => (regAdjective "áèë").s ! aform ;
|
||||
VPassive aform => (regAdjective "áúäåí").s ! aform ;
|
||||
VPresPart aform => (regAdjective "áúäåù").s ! aform ;
|
||||
VImperative Sg => "áúäè" ;
|
||||
VImperative Pl => "áúäåòå" ;
|
||||
VGerund => "áèäåéêè"
|
||||
}
|
||||
auxBe : Str -> VForm => Str = \se ->
|
||||
table {
|
||||
VPres Sg P1 => "ñúì" ++ se ;
|
||||
VPres Sg P2 => "ñè" ++ se ;
|
||||
VPres Sg P3 => se ++ "å" ;
|
||||
VPres Pl P1 => "ñìå" ++ se ;
|
||||
VPres Pl P2 => "ñòå" ++ se ;
|
||||
VPres Pl P3 => "ñà" ++ se ;
|
||||
VAorist Sg P1 => "áÿõ" ++ se ;
|
||||
VAorist Sg P2 => "áåøå" ++ se ;
|
||||
VAorist Sg P3 => se ++ "áåøå" ;
|
||||
VAorist Pl P1 => "áÿõìå" ++ se ;
|
||||
VAorist Pl P2 => "áÿõòå" ++ se ;
|
||||
VAorist Pl P3 => "áÿõà" ++ se ;
|
||||
VImperfect Sg P1 => "áÿõ" ++ se ;
|
||||
VImperfect Sg _ => "áåøå" ++ se ;
|
||||
VImperfect Pl P1 => "áÿõìå" ++ se ;
|
||||
VImperfect Pl P2 => "áÿõòå" ++ se ;
|
||||
VImperfect Pl P3 => "áÿõà" ++ se ;
|
||||
VPerfect aform => (regAdjective "áèë").s ! aform ++ se ;
|
||||
VPluPerfect aform => (regAdjective "áèë").s ! aform ++ se ;
|
||||
VPassive aform => (regAdjective "áúäåí").s ! aform ++ se ;
|
||||
VPresPart aform => (regAdjective "áúäåù").s ! aform ++ se ;
|
||||
VImperative Sg => "áúäè" ++ se ;
|
||||
VImperative Pl => "áúäåòå" ++ se ;
|
||||
VGerund => "áèäåéêè" ++ se
|
||||
} ;
|
||||
|
||||
auxWould : Verb = {
|
||||
s = table {
|
||||
VPres Sg P1 => "áúäà" ;
|
||||
VPres Sg P2 => "áúäåø" ;
|
||||
VPres Sg P3 => "áúäå" ;
|
||||
VPres Pl P1 => "áúäåì" ;
|
||||
VPres Pl P2 => "áúäåòå" ;
|
||||
VPres Pl P3 => "áúäàò" ;
|
||||
VAorist Sg P1 => "áèõ" ;
|
||||
VAorist Sg _ => "áè" ;
|
||||
VAorist Pl P1 => "áèõìå" ;
|
||||
VAorist Pl P2 => "áèõòå" ;
|
||||
VAorist Pl P3 => "áèõà" ;
|
||||
VImperfect Sg P1 => "áúäåõ" ;
|
||||
VImperfect Sg _ => "áúäåøå" ;
|
||||
VImperfect Pl P1 => "áúäåõìå" ;
|
||||
VImperfect Pl P2 => "áúäåõòå" ;
|
||||
VImperfect Pl P3 => "áúäåõà" ;
|
||||
VPerfect aform => (regAdjective "áèë").s ! aform ;
|
||||
VPluPerfect aform => (regAdjective "áúäåë").s ! aform ;
|
||||
VPassive aform => (regAdjective "áúäåí").s ! aform ;
|
||||
VPresPart aform => (regAdjective "áúäåù").s ! aform ;
|
||||
VImperative Sg => "áúäè" ;
|
||||
VImperative Pl => "áúäåòå" ;
|
||||
VGerund => "áúäåéêè"
|
||||
}
|
||||
auxWould : Str -> VForm => Str = \se ->
|
||||
table {
|
||||
VPres Sg P1 => "áúäà" ++ se ;
|
||||
VPres Sg P2 => "áúäåø" ++ se ;
|
||||
VPres Sg P3 => se ++ "áúäå" ;
|
||||
VPres Pl P1 => "áúäåì" ++ se ;
|
||||
VPres Pl P2 => "áúäåòå" ++ se ;
|
||||
VPres Pl P3 => "áúäàò" ++ se ;
|
||||
VAorist Sg P1 => "áèõ" ++ se ;
|
||||
VAorist Sg _ => "áè" ++ se ;
|
||||
VAorist Pl P1 => "áèõìå" ++ se ;
|
||||
VAorist Pl P2 => "áèõòå" ++ se ;
|
||||
VAorist Pl P3 => "áèõà" ++ se ;
|
||||
VImperfect Sg P1 => "áúäåõ" ++ se ;
|
||||
VImperfect Sg _ => "áúäåøå" ++ se ;
|
||||
VImperfect Pl P1 => "áúäåõìå" ++ se ;
|
||||
VImperfect Pl P2 => "áúäåõòå" ++ se ;
|
||||
VImperfect Pl P3 => "áúäåõà" ++ se ;
|
||||
VPerfect aform => (regAdjective "áèë").s ! aform ++ se ;
|
||||
VPluPerfect aform => (regAdjective "áúäåë").s ! aform ++ se ;
|
||||
VPassive aform => (regAdjective "áúäåí").s ! aform ++ se ;
|
||||
VPresPart aform => (regAdjective "áúäåù").s ! aform ++ se ;
|
||||
VImperative Sg => "áúäè" ++ se ;
|
||||
VImperative Pl => "áúäåòå" ++ se ;
|
||||
VGerund => "áúäåéêè" ++ se
|
||||
} ;
|
||||
|
||||
verbBe : Verb = {s=auxBe []; vtype=VNormal} ;
|
||||
|
||||
reflClitics : Case => Str = table {Acc => "ñå"; Dat => "ñè"} ;
|
||||
|
||||
personalClitics : Case => GenNum => Person => Str =
|
||||
table {
|
||||
Acc => table {
|
||||
GSg g => table {
|
||||
P1 => "ìå" ;
|
||||
P2 => "òå" ;
|
||||
P3 => case g of {
|
||||
Masc => "ãî" ;
|
||||
Fem => "ÿ" ;
|
||||
Neut => "ãî"
|
||||
}
|
||||
} ;
|
||||
GPl => table {
|
||||
P1 => "íè" ;
|
||||
P2 => "âè" ;
|
||||
P3 => "ãè"
|
||||
}
|
||||
} ;
|
||||
Dat => table {
|
||||
GSg g => table {
|
||||
P1 => "ìè" ;
|
||||
P2 => "òè" ;
|
||||
P3 => case g of {
|
||||
Masc => "ìó" ;
|
||||
Fem => "é" ;
|
||||
Neut => "ìó"
|
||||
}
|
||||
} ;
|
||||
GPl => table {
|
||||
P1 => "íè" ;
|
||||
P2 => "âè" ;
|
||||
P3 => "èì"
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
ia2e : Str -> Str = -- to be used when the next syllable has vowel different from "à","ú","î" or "ó"
|
||||
@@ -345,7 +430,8 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
_ => chete + "éêè"
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
vtype = VNormal
|
||||
} ;
|
||||
|
||||
-- For $Sentence$.
|
||||
|
||||
@@ -357,12 +443,13 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
verb = vp.s ! t ! a ! b ! agr ;
|
||||
verb = vp.s ! t ! a ! b ! agr ! False ;
|
||||
verbq = vp.s ! t ! a ! b ! agr ! True ;
|
||||
compl = vp.s2 ! agr
|
||||
in case o of {
|
||||
Main => subj ++ verb ++ compl ;
|
||||
Inv => verb ++ subj ++ compl ;
|
||||
Quest => subj ++ verb ++ "ëè" ++ compl
|
||||
Inv => verb ++ compl ++ subj ;
|
||||
Quest => subj ++ verbq ++ compl
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -421,22 +508,22 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
DNeutDef => addDef dve
|
||||
} ;
|
||||
|
||||
mkIP : Str -> Str -> GenNum -> {s : Case => Str ; gn : GenNum} =
|
||||
mkIP : Str -> Str -> GenNum -> {s : Role => Str ; gn : GenNum} =
|
||||
\koi,kogo,gn -> {
|
||||
s = table {
|
||||
Nom => koi ;
|
||||
Acc => kogo ;
|
||||
Dat => "íà" ++ kogo
|
||||
RSubj => koi ;
|
||||
RObj Acc => kogo ;
|
||||
RObj Dat => "íà" ++ kogo
|
||||
} ;
|
||||
gn = gn
|
||||
} ;
|
||||
|
||||
mkPron : (az,men,mi,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) -> GenNum -> Person -> {s : Case => Str; gen : AForm => Str; a : Agr} =
|
||||
mkPron : (az,men,mi,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) -> GenNum -> Person -> {s : Role => Str; gen : AForm => Str; a : Agr} =
|
||||
\az,men,mi,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite,gn,p -> {
|
||||
s = table {
|
||||
Nom => az ;
|
||||
Acc => men ;
|
||||
Dat => mi
|
||||
RSubj => az ;
|
||||
RObj Acc => men ;
|
||||
RObj Dat => mi
|
||||
} ;
|
||||
gen = (mkAdjective moj moia moiat moia_ moiata moe moeto moi moite).s ;
|
||||
a = {
|
||||
@@ -444,17 +531,18 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
p = p
|
||||
}
|
||||
} ;
|
||||
|
||||
Preposition : Type = {s : Str; c : Case};
|
||||
|
||||
mkQuestion :
|
||||
{s : Str} -> Clause ->
|
||||
{s1,s2 : Str} -> Clause ->
|
||||
{s : Tense => Anteriority => Polarity => QForm => Str} = \wh,cl ->
|
||||
{
|
||||
s = \\t,a,p =>
|
||||
let cls = cl.s ! t ! a ! p ;
|
||||
why = wh.s
|
||||
in table {
|
||||
QDir => why ++ cls ! Inv ;
|
||||
QIndir => why ++ cls ! Main
|
||||
QDir => wh.s1 ++ cls ! Inv ;
|
||||
QIndir => wh.s2 ++ cls ! Main
|
||||
}
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
||||
PredVP np vp = mkClause (np.s ! vp.subjRole) np.a vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\p,gn =>
|
||||
@@ -15,7 +15,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
} ;
|
||||
|
||||
SlashV2 np v2 =
|
||||
mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ;
|
||||
mkClause (np.s ! RSubj) np.a (predV v2) ** {c2 = v2.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||
|
||||
@@ -54,7 +54,7 @@ concrete StructuralBul of Structural = CatBul **
|
||||
here_Adv = ss "òóê" ;
|
||||
here7to_Adv = ss ["äî òóê"] ;
|
||||
here7from_Adv = ss ["îò òóê"] ;
|
||||
how_IAdv = ss "êàê" ;
|
||||
how_IAdv = mkIAdv "êàê" ;
|
||||
how8many_IDet = {s = \\_ => "êîëêî"; n = Pl} ;
|
||||
if_Subj = ss "àêî" ;
|
||||
in8front_Prep = mkPrep "ïðåä" Acc ;
|
||||
@@ -133,16 +133,16 @@ concrete StructuralBul of Structural = CatBul **
|
||||
we_Pron = mkPron "íèå" "íàñ" "íè" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl P1 ;
|
||||
whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ;
|
||||
whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ;
|
||||
when_IAdv = ss "êîãà" ;
|
||||
when_IAdv = mkIAdv "êîãà" ;
|
||||
{-
|
||||
when_Subj = ss "when" ;
|
||||
-}
|
||||
where_IAdv = ss "êúäå" ;
|
||||
where_IAdv = mkIAdv "êúäå" ;
|
||||
whichPl_IDet = {s = table GenNum ["êîé";"êîÿ";"êîå";"êîè"]; n = Pl} ;
|
||||
whichSg_IDet = {s = table GenNum ["êîé";"êîÿ";"êîå";"êîè"]; n = Sg} ;
|
||||
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
|
||||
whoPl_IP = mkIP "êîè" "êîãî" GPl ;
|
||||
why_IAdv = ss "çàùî" ;
|
||||
why_IAdv = mkIAdv "çàùî" ;
|
||||
without_Prep = mkPrep "áåç" Acc ;
|
||||
with_Prep = mkPrep (pre { "ñ" ;
|
||||
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
|
||||
|
||||
@@ -4,22 +4,23 @@ concrete VerbBul of Verb = CatBul ** open ResBul, ParadigmsBul in {
|
||||
|
||||
lin
|
||||
UseV = predV ;
|
||||
ComplV2 v np = insertObj (\\_ => v.c2.s ++ np.s ! v.c2.c) (predV v) ;
|
||||
ComplV2 v np = insertObj (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) (predV v) ;
|
||||
ComplV3 v np np2 =
|
||||
insertObj (\\_ => v.c2.s ++ np.s ! v.c2.c ++ v.c3.s ++ np2.s ! v.c3.c) (predV v) ;
|
||||
insertObj (\\_ => v.c2.s ++ np.s ! RObj v.c2.c ++ v.c3.s ++ np2.s ! RObj v.c3.c) (predV v) ;
|
||||
|
||||
ComplVS v s = insertObj (\\_ => "," ++ "֌" ++ s.s) (predV v) ;
|
||||
|
||||
UseComp comp = insertObj comp.s (predV auxBe) ;
|
||||
UseComp comp = insertObj comp.s (predV verbBe) ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
|
||||
ReflV2 v = insertObj (\\_ => v.c2.s ++ case v.c2.c of {Dat => "ñè"; _ => "ñå"}) (predV v) ;
|
||||
ReflV2 v = predV (reflV v v.c2.c) ;
|
||||
|
||||
PassV2 v = insertObj (\\a => v.s ! VPassive (aform a.gn Indef Acc)) (predV auxBe) ;
|
||||
PassV2 v = insertObj (\\a => v.s ! VPassive (aform a.gn Indef (RObj Acc))) (predV verbBe) ;
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = noPrep ; isRefl = vv.isRefl} ; -- no "to"
|
||||
UseVS, UseVQ = \vv -> {s = vv.s; c2 = noPrep; vtype = vv.vtype} ; -- no "to"
|
||||
|
||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
||||
CompAP ap = {s = \\agr => ap.s ! aform agr.gn Indef (RObj Acc)} ;
|
||||
CompNP np = {s = \\_ => np.s ! RObj Acc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user