added pronouns and compounds

This commit is contained in:
Krasimir Angelov
2026-04-30 19:13:25 +02:00
parent 6064e69d8e
commit b571d86b7c
10 changed files with 855 additions and 770 deletions

View File

@@ -1,4 +1,5 @@
concrete AllBel of AllBelAbs =
LangBel
LangBel,
ExtendBel
**
{} ;

View File

@@ -1,3 +1,4 @@
abstract AllBelAbs =
Lang
** {}
Lang,
Extend
** {}

View File

@@ -3,12 +3,13 @@ concrete CatBel of Cat = CommonX ** open ResBel in {
lincat N = Noun ;
lincat N2 = Noun ** {c2 : Compl} ;
lincat N3 = Noun ** {c2,c3 : Compl} ;
lincat V = V ;
lincat VV,VS,VQ,VA = V ;
lincat V2 = V ** {c2 : Compl} ;
lincat V3,V2A,V2S,V2Q,V2V = V ** {c2,c3 : Compl} ;
lincat A = A ;
lincat A2 = A ** {c2 : Compl} ;
lincat Pron = {s: Case => Str; g: Gender; n : Number; p: Person} ;
lincat V = Verb ;
lincat VV,VS,VQ,VA = Verb ;
lincat V2 = Verb ** {c2 : Compl} ;
lincat V3,V2A,V2S,V2Q,V2V = Verb ** {c2,c3 : Compl} ;
lincat A = Adj ;
lincat A2 = Adj ** {c2 : Compl} ;
lincat Prep = Compl ;
lincat CN = CommonNoun ;
lincat AP = AdjPhrase ;

View File

@@ -29,12 +29,12 @@ lin
paragraph (x.infinitive) ++
heading1 "Present" ++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pres" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P1 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P2 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P2 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td ((x.active ! Imperf).Pres ! P3 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).Pres ! P3 ! Pl))) ++
tr (intagAttr "th" "rowspan=\"6\"" "Pres" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td ((x.active ! Imperf).pres ! P1 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).pres ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2" ++ th "Sg" ++ td ((x.active ! Imperf).pres ! P2 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).pres ! P2 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td ((x.active ! Imperf).pres ! P3 ! Sg)) ++
tr (th "Pl" ++ td ((x.active ! Imperf).pres ! P3 ! Pl))) ++
heading1 "Imperative" ++
frameTable (
tr (th "Sg" ++ td (x.imperative ! Sg)) ++

View File

@@ -0,0 +1,15 @@
--# -path=.:../abstract:../common:prelude
concrete ExtendBel of Extend = CatBel ** open ResBel, ParadigmsBel in {
lin
iFem_Pron = mkPron "я" "мяне" "мне" "мяне" "мне" "мной" Fem Sg P1 ;
youFem_Pron = mkPron "ты" "табе" "табе" "табе" "табе" "табой" Fem Sg P2 ;
weFem_Pron = mkPron "мы" "нас" "нам" "нас" "наc" "намі" Fem Pl P1 ;
youPlFem_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Fem Pl P2 ;
theyFem_Pron = mkPron "вони" "їх" "їм" "їх" "них" "ними" Fem Pl P3 ;
youPolFem_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Fem Pl P2 ;
youPolPl_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Fem Pl P2 ;
youPolPlFem_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Fem Pl P2 ;
}

View File

@@ -2,5 +2,6 @@ concrete GrammarBel of Grammar =
TenseX,
PhraseBel,
NounBel,
AdjectiveBel ** {
}
AdjectiveBel,
StructuralBel ** {
}

File diff suppressed because it is too large Load Diff

View File

@@ -636,6 +636,44 @@ oper
_ => regN form1
} ;
compoundN = overload {
compoundN : A -> N -> N = \a,n -> lin N {
s = \\c,num => a.s ! c ! genNum n.g num ++ n.s ! c ! num ;
voc = a.s ! Nom ! genNum n.g Sg ++ n.voc ;
g = n.g
} ;
compoundN : N -> A -> N = \n,a -> lin N {
s = \\c,num => n.s ! c ! num ++ a.s ! c ! genNum n.g num ;
voc = n.voc ++ a.s ! Nom ! genNum n.g Sg ;
g = n.g
} ;
compoundN : N -> Str -> N = \n,adv -> lin N {
s = \\c,num => n.s ! c ! num ++ adv ;
voc = n.voc ++ adv ;
g = n.g
} ;
compoundN : Str -> N -> N = \adv,n -> lin N {
s = \\c,num => adv ++ n.s ! c ! num ;
voc = adv ++ n.voc ;
g = n.g
}
} ;
mkPron : (_,_,_,_,_,_ : Str) -> Gender -> Number -> Person -> Pron =
\nom,acc,dat,gen,loc,instr,g,n,p -> lin Pron {
s = table {
Nom => nom ;
Acc => acc ;
Dat => dat ;
Gen => gen ;
Loc => loc ;
Instr => instr
} ;
g = g ;
n = n ;
p = p
} ;
regV : Str -> V -- infinitive
= \form -> case form of {
_ + "агчы" => mkV021 form;
@@ -717,6 +755,16 @@ oper
_ => regV form1
} ;
compoundV : V -> Str -> V = \v,adv -> lin V {
active = \\a => {past=(v.active ! a).past ++ adv ;
pres=\\p,num=>(v.active ! a).pres ! p ! num ++ adv
} ;
imperative = \\num => v.imperative ! num ++ adv ;
infinitive = v.infinitive ++ adv ;
participle = \\g,num => v.participle ! g ! num ++ adv ;
passive = \\a,t => v.passive ! a ! t ++ adv
} ;
regA : Str -> A -- s;Nom;('GSg', Masc)
= \form -> case form of {
_ + "які" => mkA006 form;

View File

@@ -40,12 +40,12 @@ oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
param Aspect = Imperf | Perf ;
param Person = P1 | P2 | P3 ;
param Tense = Pres | Past ;
oper V = {active: Aspect => {Past: Str; Pres: Person => Number => Str}; imperative: Number => Str; infinitive: Str; participle: Gender => Number => Str; passive: Aspect => Tense => Str} ; -- 703
oper mkV : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> V =
oper Verb = {active: Aspect => {past: Str; pres: Person => Number => Str}; imperative: Number => Str; infinitive: Str; participle: Gender => Number => Str; passive: Aspect => Tense => Str} ; -- 703
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
\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 ->
{ active = table {
Imperf => { Past = f1 ;
Pres = table {
Imperf => { past = f1 ;
pres = table {
P1 => table {
Sg => f2 ;
Pl => f3
@@ -60,8 +60,8 @@ oper mkV : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> V =
}
}
} ;
Perf => { Past = f8 ;
Pres = table {
Perf => { past = f8 ;
pres = table {
P1 => table {
Sg => f9 ;
Pl => f10
@@ -110,8 +110,14 @@ oper mkV : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> V =
param GenNum = GSg Gender | GPl ;
oper A = {s: Case => GenNum => Str} ; -- 704
oper mkA : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> A =
oper genNum : Gender -> Number -> GenNum = \g,n ->
case n of {
Sg => GSg g ;
Pl => GPl
} ;
oper Adj = {s: Case => GenNum => Str} ; -- 704
oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Adj =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24 ->
{ s = table {
Nom => table {
@@ -158,6 +164,6 @@ oper Compl = {s : Str; c : Case} ;
oper noPrep : Compl = {s=""; c=Acc} ;
oper CommonNoun = Noun ;
oper AdjPhrase = A ;
oper AdjPhrase = Adj ;
}

View File

@@ -0,0 +1,12 @@
concrete StructuralBel of Structural = CatBel ** open ResBel, ParadigmsBel in {
lin
i_Pron = mkPron "я" "мяне" "мне" "мяне" "мне" "мной" Masc Sg P1 ;
youSg_Pron = mkPron "ты" "табе" "табе" "табе" "табе" "табой" Masc Sg P2 ;
he_Pron = mkPron "ён" "яго" "яму" "яго" "ім" "ім" Masc Sg P3 ;
she_Pron = mkPron "яна" "яе" "ёй" "яе" "ёй" "ёю" Fem Sg P3 ;
it_Pron = mkPron "яно" "яго" "яму" "яго" "ім" "ім" Neuter Sg P3 ;
we_Pron = mkPron "мы" "нас" "нам" "нас" "наc" "намі" Masc Pl P1 ;
youPl_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Masc Pl P2 ;
youPol_Pron = mkPron "вы" "вас" "вам" "вас" "вас" "вамі" Masc Pl P2 ;
they_Pron = mkPron "яны" "іх" "їм" "їх" "іх" "імі" Masc Pl P3 ;
}