diff --git a/src/bantu/AdjectiveBantu.gf b/src/bantu/AdjectiveBantu.gf
new file mode 100644
index 000000000..6b3ca455b
--- /dev/null
+++ b/src/bantu/AdjectiveBantu.gf
@@ -0,0 +1,46 @@
+incomplete concrete AdjectiveBantu of Adjective =
+ CatBantu ** open CommonBantu, ResBantu, Prelude in {
+ flags coding=utf8;
+ lin
+
+ PositA a = {s = \\g,n => a.s !AAdj g n ;isPre = True } ;
+ ComparA a np = {
+ s = \\g,n => a.s !AComp g n ++ conjThan ++ np.s ! npNom ;
+ isPre = False} ;
+
+ UseComparA a = {s = \\g,n=> a.s !AComp g n;isPre = True};
+
+ AdjOrd ord = { -- find why it cannot generate tree
+ s = \\g,n => ord.s ! g ;
+ isPre = True
+ } ;
+
+ CAdvAP ad ap np = {
+ s = \\g,n => ad.s ++ ap.s !g! n ++ ad.p ++ np.s ! npNom ;
+ isPre = False
+ } ;
+
+ ComplA2 a np = {
+ s = \\g,n => a.s !AComp g n ++ a.c2 ++ np.s ! NPAcc;
+ isPre = False
+ } ;
+ ReflA2 a ={
+ s = \\g,n => a.s !AAdj g n ++ a.c2 ++ reflPron ! Ag g n P3 ;
+ } ;
+
+ SentAP ap sc = {
+ s = \\g,n => ap.s !g! n ++ sc.s ;
+ isPre = False
+ } ;
+
+ AdAP ada ap = {
+ s = \\g,n => ada.s ++ ap.s ! g ! n;
+ isPre = ap.isPre
+ } ;
+
+ UseA2 a2 = {s = \\g, n => a2.s !AAdj g n ;isPre = True } ;
+
+ AdvAP ap adv = {s = \\g,n => ap.s ! g ! n ++ adv.s ; isPre = False} ;
+
+
+}
diff --git a/src/bantu/AdverbBantu.gf b/src/bantu/AdverbBantu.gf
new file mode 100644
index 000000000..2589c0fa0
--- /dev/null
+++ b/src/bantu/AdverbBantu.gf
@@ -0,0 +1,27 @@
+incomplete concrete AdverbBantu of Adverb =
+ CatBantu ** open CommonBantu, ResBantu, Prelude in {
+
+ lin
+ PositAdvAdj a = {s = a.s !AAdj G1 Sg} ;
+
+ ComparAdvAdj cadv a np =let agr = complAgr np.a
+ in {
+ s = cadv.s ++ a.s !AComp agr.g agr.n ++ cadv.p ++ np.s ! npNom
+ } ;
+ ComparAdvAdjS cadv a s = {
+ s = cadv.s ++ a.s !AComp G1 Sg ++ cadv.p ++ s.s
+ } ;
+
+ PrepNP prep np = let agr = complAgr np.a
+ in {s = prep.s!agr.n!agr.g ++ (np.s ! NPAcc) } ; --s = preOrPost prep.isPre prep.s (np.s ! NPAcc)
+
+ AdAdv = cc2 ;
+ PositAdAAdj a = {s = a.s !AAdj G1 Sg } ;
+
+
+ SubjS = cc2 ;
+
+ AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
+
+
+}
diff --git a/src/bantu/CatBantu.gf b/src/bantu/CatBantu.gf
new file mode 100644
index 000000000..7d86007eb
--- /dev/null
+++ b/src/bantu/CatBantu.gf
@@ -0,0 +1,111 @@
+incomplete concrete CatBantu of Cat =
+ CommonX - [Pol]
+ ** open ResBantu, Prelude, ParamX in {
+
+ flags optimize=all_subs ;
+ coding=utf8 ;
+
+ lincat
+
+ Pol = {s : Str ; b : Bool} ;
+
+ S = {s : Str} ;
+ QS = {s : QForm => Str} ;
+ RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts
+ SSlash = {s : Str ; c2 : Str} ;
+
+-- Sentence
+
+ -- Cl = {s : Tense => Anteriority => Bool => Str} ;
+ -- ClSlash = {
+ -- s : ResKam.Tense => Anteriority => Bool => Str ;
+-- } ;
+--
+-- Question
+
+ -- QCl = {s : ResKam.Tense => Anteriority => Polarity => QForm => Str} ;
+ IP = {s : NPCase => Str ; n : Number} ;
+ IComp = {s : Str} ;
+ IDet = {s : Str ; n : Number} ;
+ IQuant = {s : Number => Str} ;
+
+-- Relative
+{-}
+ RCl = {
+ s : ResKam.Tense => Anteriority => Polarity => Agr => Str ;
+ c : NPCase
+ } ;
+ RP = {s : RCase => Str ; a : RAgr} ;
+-}
+-- Verb
+
+ VP = ResBantu.VP ;
+ VPSlash = ResBantu.SlashVP ;
+ Comp = {s : Agr => Str} ;
+
+-- Adjective
+ AP = {s : Gender => Number => Str };
+
+-- Noun
+
+ CN = CNoun;
+ NP = {s : NPCase => Str ; a : Agr} ;
+ Pron = {s: PronForm=>Str; a : Agr};-- Pronoun ;
+ Det = {s : DetForm => Str ; n : Number } ;
+ Predet = {s : Gender =>Str} ;
+ Ord = { s : Gender => Str } ;
+ Num = {s : Gender => Str ; n : Number } ;
+ Card = {s : Gender => Str ; n : Number} ;
+ Quant = {s : Number => Gender => Str } ;
+ DAP = {s : DetForm => Str ; n : Number} ;
+
+-- Numeral
+
+ Numeral = {s : CardOrd => Gender => Str ; n : Number} ;
+
+ Digits = {s : CardOrd => Gender => Str ; n : Number} ;
+
+-- Structural
+
+ Conj = {s1,s2 : Str ; n : Number} ;
+
+ Subj = {s : Str} ;
+ Prep = {s: Number => Gender => Str} ;
+
+-- Open lexical classes, e.g. Lexicon
+ V, VS, VQ, VA, V3,V2,VV, V2S, V2Q, V2V,V2A= Verb ;
+ -- V2, VV, V2S, V2Q = Verb ** {c2 : Str} ;
+ -- V3, V2V,V2A = Verb ** {c2, c3 : Prep} ;
+ A = {s : AForm => Str } ;
+ A2 = {s :AForm => Str }** {c2 : Str} ;
+
+ N = {s : Number => Case => Str ; g : Gender} ;
+-- N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
+ N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Prep} ;
+ N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Prep} ;
+ PN = {s : Case => Str ; g : Gender} ;
+ --Tense = {s : Str ; t : ResKam.Tense} ;
+
+ linref
+ SSlash = \ss -> ss.s ++ ss.c2 ;
+ -- ClSlash = \cls -> cls.s ! Pres ! Simul ! CPos ! oDir ++ cls.c2 ;
+
+ -- VP = \vp -> infVP VVAux vp Simul CPos (agrP3 Sg) ;
+ -- VPSlash = \vps -> infVP VVAux vps Simul CPos (agrP3 Sg) ++ vps.c2;
+--
+ Conj = \conj -> conj.s1 ++ conj.s2 ;
+
+ -- V, VS, VQ, VA = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg);
+ -- V2, V2A, V2Q, V2S = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg) ++ v.c2;
+ -- V3 = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg) ++ v.c2 ++ v.c3;
+ -- VV = \v -> infVP VVAux (predVV v) Simul CPos (agrP3 Sg) ;
+ -- V2V = \v -> infVP VVAux (predVc v) Simul CPos (agrP3 Sg) ;
+ Det =\d -> d.s!Obj G1;
+ CN = \cn -> cn.s!Sg!Nom ++ cn.s2!Sg ;
+ -- A = \a -> a.s ! AAdj G1 Sg ;
+ -- A2 = \a -> a.s ! AAdj G1 Sg ++ a.c2 ;
+
+ N = \n -> n.s ! Sg ! Nom ;
+ N2 = \n -> n.s ! Sg ! Nom ++ n.c2.s!Sg!G1 ;
+ N3 = \n -> n.s ! Sg ! Nom ++ n.c2.s!Sg!G1 ++ n.c3.s!Sg!G1 ;
+}
diff --git a/src/bantu/CommonBantu.gf b/src/bantu/CommonBantu.gf
new file mode 100644
index 000000000..e2e5007fb
--- /dev/null
+++ b/src/bantu/CommonBantu.gf
@@ -0,0 +1,30 @@
+----1 Auxiliary operations common for Bantu languages
+--
+-- This module contains operations that are shared by the Bantu
+-- languages. The complete set of auxiliary operations needed to
+-- implement [Test Test.html] is defined in [ResBantu ResBantu.html],
+-- which depends on [DiffBantu DiffBantu.html].
+
+resource CommonBantu = ParamX ** open Prelude in {
+
+ flags optimize=all ;
+ coding=utf8 ;
+
+ param
+ Case = Nom | Loc ;
+ NPCase = NCase Case | NPAcc | NPNomPoss ;
+ CardOrd = NCard | NOrd ;
+
+ oper
+ ---- Conjunction Agreements (as fas as indep. of Gender) ----
+ conjPPerson : Person -> Person -> Person = \p,q ->
+ case
of {
+ <_,P1> | <_,P2> => P1 ;
+ => P1 ;
+ => P2 ;
+ => P3
+ };
+
+ artIndef = "" ;
+
+}
diff --git a/src/bantu/ConjunctionBantu.gf b/src/bantu/ConjunctionBantu.gf
new file mode 100644
index 000000000..6858c2327
--- /dev/null
+++ b/src/bantu/ConjunctionBantu.gf
@@ -0,0 +1,77 @@
+incomplete concrete ConjunctionBantu of Conjunction =
+ CatBantu ** open CommonBantu, ResBantu, Coordination, Prelude in {
+
+ flags optimize=all_subs ;
+
+ lin
+
+ ConjS = conjunctDistrSS ;
+
+ ConjAdv = conjunctDistrSS ;
+ ConjAdV = conjunctDistrSS ;
+
+ ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
+ a = Ag (agrFeatures ss.a).g (conjNumber (agrFeatures ss.a).n conj.n) (agrFeatures ss.a).p ; -- a = conjAgr (agrP3 conj.n) ss.a
+ } ;
+
+ ConjAP conj ss = conjunctDistrTable2 Gender Number conj ss;-- ** { isPre = ss.isPre } ;
+
+ ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
+ c = ss.c
+ } ;
+
+ ConjIAdv = conjunctDistrSS ;
+
+ ConjCN conj cn = {
+ s = \\num,c => conj.s1 ++ cn.n1.s ! num!c ++ conj.s2 ++ cn.n2.s ! num!c ;
+ g = conjGender cn.n1.g cn.n2.g ;
+ s2 = \\num => [];
+ } ;
+ ConjDet c xs = { s = table {
+ Sub => [] ;
+ Obj g => xs.s1!Sub ++ c.s2 ++ xs.s2 !Obj g} ;
+ n = xs.n};
+
+ -- These fun's are generated from the list cat's.
+
+ BaseS = twoSS ;
+ ConsS = consrSS comma ;
+ BaseAdv = twoSS ;
+ ConsAdv = consrSS comma ;
+ BaseAdV = twoSS ;
+ ConsAdV = consrSS comma ;
+ BaseNP x y = twoTable NPCase x y ** {a = conjAgr Sg x.a y.a} ;
+ ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr Sg xs.a x.a} ;
+
+
+ BaseAP x y = twoTable2 Gender Number x y ;
+ ConsAP xs x = consrTable2 Gender Number comma xs x ;
+ BaseRS x y = twoTable Agr x y ** {c = y.c} ;
+ ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
+ BaseIAdv = twoSS ;
+ ConsIAdv = consrSS comma ;
+ BaseCN x y = { n1 = x ; n2 = y } ;
+ ConsCN xs x = {
+ n1 = {
+ s = \\num,c => x.n1.s ! num!c ++ comma ++ x.n2.s ! num !c ;
+ g = x.n2.g ;
+ s2 = \\num => [] ;
+ } ;
+ n2 = xs ;
+ } ;
+ BaseDAP x y = twoTable DetForm x y ** {n = y.n} ;
+ ConsDAP x xs = consrTable DetForm comma x xs ** {n = xs.n} ;
+ --BaseDet x y = twoTable DetForm x y ** {n = y.n} ;
+ --ConsDet xs x = consrTable DetForm comma xs x ** {n = xs.n} ;
+ lincat
+ [S] = {s1,s2 : Str} ;
+ [Adv] = {s1,s2 : Str} ;
+ [AdV] = {s1,s2 : Str} ;
+ [IAdv] = {s1,s2 : Str} ;
+ [NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
+ [AP] = {s1,s2 : Gender => Number => Str} ; --isPre : Bool} ;
+ [RS] = {s1,s2 : Agr => Str ; c : NPCase} ;
+ [CN] = {n1,n2 : CNoun } ;
+ [DAP] = {s1,s2 : DetForm => Str ; n : Number} ;
+
+}
diff --git a/src/bantu/DiffBantu.gf b/src/bantu/DiffBantu.gf
new file mode 100644
index 000000000..2ec12d696
--- /dev/null
+++ b/src/bantu/DiffBantu.gf
@@ -0,0 +1,100 @@
+--1 Differences between Bantu languages
+
+interface DiffBantu = open CommonBantu, Prelude in {
+ flags coding=utf8 ;
+
+-- HL: everything depending on Gender is not common, so it must not
+-- be in CommonBantu, but here in DiffBantu.
+oper
+ Gender : PType ;
+ firstGender : Gender ; -- G1
+ secondGender : Gender ; -- G2
+
+ Noun : Type = {s : Number => Case => Str ; g : Gender};
+ CNoun : Type = {s : Number => Case => Str ; g : Gender; s2 : Number => Str};
+ AAgr : Type = {g : Gender ; n : Number} ;
+
+param
+ Agr = Ag Gender Number Person ;
+
+oper
+-- AGRE = {g : Gender ; n : Number ; p : Person} ;
+ Agre : Type = {g : Gender ; n : Number ; p : Person} ;
+ agre : Gender -> Number -> Person -> Agre = \g,n,p -> {g = g ; n = n ; p = p} ;
+
+ agrFeatures : Agr -> Agre = \a -> case a of {Ag g n p => {g = g ; n = n ; p = p}} ;
+ getGender : Agr -> Gender = \a -> case a of {Ag g _ _ => g};
+ getNumber : Agr -> Number = \a -> case a of {Ag _ n _ => n};
+ getPerson : Agr -> Person = \a -> case a of {Ag _ _ p => p};
+
+ clitAgr : Agr -> {n : Number ; p : Person} = \a -> case a of {
+ Ag _ n p => {n = n; p = p}
+ } ;
+ complAgr : Agr -> {g : Gender ; n : Number} = \a -> case a of {
+ Ag g n _ => {g = g ; n = n}
+ } ;
+ predetAgr : Agr -> {g : Gender} = \a -> case a of {
+ Ag g _ _ => {g = g}
+ } ;
+ verbAgr : Agr -> {g : Gender ; n : Number ; p : Person} = \a -> case a of {
+ Ag g n p => {g = g ; n = n ; p = p}
+ } ; -- verbAgr = agrFeatures, why both? HL
+
+ detAgr : Agr -> {g : Gender ; p : Person} = \a -> case a of {
+ Ag g _ p => {g = g; p = p}
+ } ;
+
+ agrG1 : Number -> Person -> Agr = \n,p ->
+ Ag firstGender n p ;
+ dapagr : Gender -> Person -> Agr = \g,p ->
+ Ag g Sg p ;
+ agrP3 : Gender -> Number -> Agr = \g,n ->
+ Ag g n P3 ;
+
+ aagr : Gender -> Number -> AAgr = \g,n ->
+ {g = g ; n = n} ;
+
+ ---- Conjunction Agreements----
+
+ conjAgr : Number -> Agr -> Agr -> Agr = \n,xa,ya ->
+ let
+ x = agrFeatures xa ; y = agrFeatures ya
+ in
+ Ag (conjGender x.g y.g) (conjNumber (conjNumber x.n y.n) n)
+ (conjPPerson x.p y.p) ;
+
+ conjGender : Gender -> Gender -> Gender ;
+
+param
+ -- AForm = AAdj Gender Number | AComp Gender Number ;
+ PronForm= Pers | Poss Number Gender;
+ DetForm = Sub | Obj Gender ;
+
+-- HL: the above is material removed from CommonBantu and adapted --
+
+oper
+ conjThan : Str ; --one of them in bantu
+ conjThat : Str ;
+ superVery : Str ; -- one of bantu
+
+ reflPron : Agr => Str ; -- second of bantu.
+
+param
+ VForm ;
+ DForm ;
+ AForm;
+oper
+ ProunSgprefix : Gender -> Str ; -- added, HL
+ ProunPlprefix : Gender -> Str ; -- added, HL
+ Cardoneprefix : Gender -> Str;
+ Cardtwoprefix : Gender -> Str;
+ Allpredetprefix : Gender -> Str;
+ PrefixPlNom : Gender -> Str;
+ mkprefix,Ordprefix : Gender -> Str;
+ Cardprefix : Gender -> Str ;
+ Mostpredetprefix : Gender -> Str;
+ Adjpprefix : Gender -> Number -> Str;
+ VowelAdjprefix: Gender -> Number -> Str;
+ ConsonantAdjprefix: Gender -> Number -> Str;
+}
+
diff --git a/src/bantu/NounBantu.gf b/src/bantu/NounBantu.gf
new file mode 100644
index 000000000..ccca45585
--- /dev/null
+++ b/src/bantu/NounBantu.gf
@@ -0,0 +1,169 @@
+incomplete concrete NounBantu of Noun =
+ -- HL: Structural added for part_Prep, possess_Prep; contains Cat
+ CatBantu ** open Structural, ResBantu, Prelude in {
+
+flags optimize=all_subs ; coding = utf8 ;
+
+lin
+ -- Det -> CN -> NP
+ -- e.g. 'the man'
+
+ DetCN det cn =let g = cn.g ; n = det.n in {
+ s = \\c => det.s!Sub ++ cn.s ! det.n !npcase2case c ++ det.s!Obj g ++ cn.s2!det.n;
+ a =Ag cn.g det.n P3 ;
+ } ;
+
+
+ -- PN -> NP
+ -- e.g. 'John'
+ UsePN pn = {s = \\c => pn.s !npcase2case c ; a = Ag pn.g Sg P3 } ;
+ -- Pron -> NP
+ -- e.g. 'he'
+ UsePron pron = let agr = verbAgr pron.a;
+ n=agr.n; g=agr.g
+ in {s = table {
+ NCase c => pron.s!Pers ;
+ NPAcc => pron.s!Pers ;
+ NPNomPoss => pron.s!Poss n g };
+ a = Ag agr.g agr.n agr.p;
+ } ;
+ -- Predet -> NP -> NP
+ -- e.g. 'only the man'
+
+ PredetNP pred np =
+ let agr = predetAgr np.a in {
+ s = \\c => np.s ! NCase Nom ++ pred.s ! agr.g ;
+ a =Ag agr.g Pl P3 ;
+ } ;
+
+ {-} PPartNP np v2 = {
+ s = \\c => np.s ! c ++ v2.s ! VPPart ;
+ a = np.a
+ } ;
+ -}
+ RelNP np rs = {
+ s = \\c => np.s ! NCase Nom ++ frontComma ++ rs.s ! np.a ++ finalComma ;
+ a = np.a
+ } ;
+ -- NP -> Adv -> NP
+ -- e.g. 'Paris today'
+ AdvNP np adv = {
+ s = \\c => np.s ! NCase Nom ++ adv.s ;
+ a = np.a
+ } ;
+
+ ExtAdvNP np adv = {
+ s = \\c => np.s ! NCase Nom ++ embedInCommas adv.s ;
+ a = np.a
+ } ;
+
+ DetQuant quant num = { s = table{ Sub => [];
+ Obj g=>quant.s ! num.n! g ++ num.s !g };
+ n = num.n } ;
+
+ DetQuantOrd quant num ord ={ s = table{ Sub => [];
+ Obj g=>quant.s ! num.n! g ++ num.s! g ++ ord.s ! g };
+ n = num.n } ;
+ DetNP det = { s = \\c => det.s!Obj G1 ;
+ a = agrP3 G1 det.n } ;
+
+ PossPron pron = { s = \\n,g => pron.s!Poss n g } ;
+
+ NumSg = {s = \\_ => []; n = Sg };--; hasCard = False} ;
+ NumPl = {s = \\_ => []; n = Pl };--; hasCard = False} ;
+--b NoOrd = {s = []} ;
+
+ NumCard n = n ;--** {hasCard = True} ;
+
+ NumDigits n = {s = n.s ! NCard ; n = n.n} ;
+ OrdDigits n = { s = n.s ! NOrd} ;
+
+ NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
+ OrdNumeral numeral = {s = numeral.s ! NOrd} ;
+
+ AdNum adn num = {s = \\g => adn.s ++ num.s!g ; n = num.n} ;
+
+ OrdSuperl a ={s = \\g => a.s! AAdj g Sg ++ superVery} ;-- find how to include plular
+
+ OrdNumeralSuperl n a = {s = \\g => n.s ! NOrd !g ++ a.s !AAdj g Sg } ;--what PL
+ -- DefArt = { s = \\n,g => []} ; --what PL
+ IndefArt, DefArt = { s = \\n,g =>[] } ;
+ --IndefArt = {s = \\ n,g => artIndef } ;
+
+ -- CN -> NP
+ MassNP cn = let g = cn.g ; n = Sg | Pl in {
+ s = \\c => cn.s ! n! npcase2case c;
+ a = Ag g n P3 ;
+ } ;
+ UseN n = { s = n.s ; s2 = \\_ => [] ; g = n.g} ; --n
+ UseN2 n = { s = n.s ; s2 = \\_ => [] ; g = n.g} ;--n ;
+ UseN3 n = { s = n.s ; s2 = \\_ => [] ; g = n.g} ; --n ;
+
+ Use2N3 f = {
+ s = \\n,c => f.s ! n ! Nom ;
+ s2 = \\_ => [] ;
+ g = f.g ;
+ c2 = f.c2
+ } ;
+
+ Use3N3 f = {
+ s = \\n,c => f.s ! n ! Nom ;
+ s2 = \\_ => [] ;
+ g = f.g ;
+ c2 = f.c3
+ } ;
+
+ ComplN2 n2 np = {s = \\n,c => n2.s ! n ! Nom ++ n2.c2.s!n!n2.g ++ np.s ! NCase Nom ;
+ s2 = \\_ => [] ;
+ g = n2.g
+ };
+ ComplN3 n3 np = {
+ s = \\n,c => n3.s ! n ! Nom ++ n3.c2.s!n!n3.g ++ np.s ! NCase Nom;
+ g = n3.g ;
+ c2 = n3.c3
+ } ;
+
+ AdjCN ap cn = {s = cn.s ; g = cn.g;
+ s2 = \\n =>cn.s2! n ++ ap.s ! cn.g ! n} ;
+
+ RelCN cn rs = {
+ s = \\n,c => cn.s ! n ! Nom ++ rs.s ! Ag cn.g n P3 ; s2 =\\n => []; --another persons
+ g = cn.g
+ } ;
+ -- AP -> CN -> CN
+ -- e.g. 'big house'
+ AdvCN cn ad = {s = \\n,c => cn.s ! n ! Nom ++ ad.s ;s2 =\\n => []; g = cn.g} ;
+
+ SentCN cn sc = {s = \\n,c => cn.s ! n ! Nom ++ sc.s ; s2 =\\n => []; g = cn.g} ;
+
+ -- ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NCase Nom ; s2 =\\n => []; g = cn.g} ;
+
+ -- PossNP : CN -> NP -> CN
+ -- e.g. 'house of Paris', 'house of mine'
+ PossNP cn np =let agr = detAgr np.a in
+ {s = \\n,c => cn.s ! n ! Nom ++ possess_Prep.s! n!cn.g ++ np.s ! NPNomPoss;
+ s2 =\\n => []; g = cn.g} ;
+ -- PartNP : CN -> NP -> CN
+ -- e.g. 'glass of wine'
+ PartNP cn np = {s = \\n,c => cn.s ! n ! Nom ++ part_Prep.s! n!cn.g ++ np.s ! NPAcc ; s2 =\\n => []; g = cn.g} ;
+
+ -- CountNP : Det -> NP -> NP
+ -- e.g. 'three of them', 'some of the boys'
+ CountNP det np = let agr = verbAgr np.a
+ in {
+ s = \\c => det.s!Obj agr.g ++ part_Prep.s!agr.n!agr.g ++ np.s!c ;--NPAcc was removed
+ a = Ag agr.g agr.n agr.p
+ } ;
+
+
+ AdjDAP det ap = { s = table{ Sub => [] ;
+ Obj g =>det.s!Obj g ++ ap.s!g !det.n};
+ n = det.n };
+
+ DetDAP d = { s=d.s; n=d.n };
+
+ ApposCN cn np = let agr = complAgr np.a in
+ {s = \\n,c => np.s ! NCase Nom --++ possess_Prep.s!n!agr.g
+ ++ cn.s !n ! Nom ; s2 =\\n => ""; g = cn.g} ;
+
+}
diff --git a/src/bantu/PhraseBantu.gf b/src/bantu/PhraseBantu.gf
new file mode 100644
index 000000000..8bed07332
--- /dev/null
+++ b/src/bantu/PhraseBantu.gf
@@ -0,0 +1,31 @@
+incomplete concrete PhraseBantu of Phrase =
+ CatBantu ** open CommonBantu, ResBantu, Prelude in { }
+{-}
+ flags optimize = all_subs ;
+
+ lin
+ PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
+
+ UttS s = {s = s.s ! Indic} ;
+ UttQS qs = {s = qs.s ! QDir} ;
+ UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False ! Fem} ;
+ UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False ! Fem} ;
+ UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True ! Fem} ;
+
+ UttIP ip = {s = ip.s ! Nom} ; --- Acc also
+ UttIAdv iadv = iadv ;
+ UttNP np = {s = (np.s ! Nom).ton} ;
+ UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
+ UttAdv adv = adv ;
+ UttCN n = {s = n.s ! Sg} ;
+ UttAP ap = {s = ap.s ! AF Masc Sg} ;
+ UttCard n = {s = n.s ! Masc} ;
+ UttInterj i = i ;
+
+ NoPConj = {s = []} ;
+ PConjConj conj = {s = conj.s2} ;
+
+ NoVoc = {s = []} ;
+ VocNP np = {s = "," ++ (np.s ! Nom).ton} ;
+
+-}
diff --git a/src/bantu/QuestionBantu.gf b/src/bantu/QuestionBantu.gf
new file mode 100644
index 000000000..7a3f31669
--- /dev/null
+++ b/src/bantu/QuestionBantu.gf
@@ -0,0 +1,118 @@
+incomplete concrete QuestionBantu of Question =
+ CatBantu ** open CommonBantu, ResBantu, Prelude in {
+{-
+ flags optimize=all_subs ;
+
+ lin
+
+ QuestCl cl = {
+ s = \\t,a,p =>
+ let cls = cl.s ! DDir ! t ! a ! p ---- DInv?
+ in table {
+ QDir => cls ! Indic ;
+ QIndir => subjIf ++ cls ! Indic
+ }
+ } ;
+
+ QuestVP qp vp = {
+ s = \\t,a,b,_ =>
+ let
+ cl = mkClause (qp.s ! Nom) False False (agrP3 qp.a.g qp.a.n) vp
+ in
+ cl.s ! DDir ! t ! a ! b ! Indic
+ } ;
+
+ QuestSlash ip slash = {
+ s = \\t,a,p =>
+ let
+ cls : Direct -> Str =
+ \d -> slash.s ! ip.a ! d ! t ! a ! p ! Indic ;
+ who = slash.c2.s ++ ip.s ! slash.c2.c
+ in table {
+ QDir => who ++ cls DInv ;
+ QIndir => who ++ cls DDir
+ }
+ } ;
+
+ QuestIAdv iadv cl = {
+ s = \\t,a,p,q =>
+ let
+ ord = case q of {
+ QDir => iAdvQuestionInv ;
+ QIndir => iAdvQuestionInv
+ } ;
+ cls = cl.s ! ord ! t ! a ! p ! Indic ;
+ why = iadv.s
+ in why ++ cls
+ } ;
+
+ QuestIComp icomp np = {
+ s = \\t,a,p,_ =>
+ let
+ vp = predV (selectCopula icomp.cop) ;
+ cls = (mkClause (np.s ! Nom).comp np.hasClit np.isPol np.a vp).s !
+ DInv ! t ! a ! p ! Indic ;
+ why = icomp.s ! complAgr np.a ;
+ in why ++ cls
+ } ;
+
+ PrepIP p ip = {
+ s = p.s ++ ip.s ! p.c
+ } ;
+
+ AdvIP ip adv = {
+ s = \\c => ip.s ! c ++ adv.s ;
+ a = ip.a
+ } ;
+
+ IdetCN idet cn =
+ let
+ g = cn.g ;
+ n = idet.n ;
+ a = aagr g n
+ in {
+ s = \\c => idet.s ! g ! c ++ cn.s ! n ;
+ a = a
+ } ;
+
+ IdetIP idet =
+ let
+ g = Masc ; ---- Fem in Extra
+ n = idet.n ;
+ a = aagr g n
+ in {
+ s = \\c => idet.s ! g ! c ;
+ a = a
+ } ;
+
+ IdetQuant idet num =
+ let
+ n = num.n ;
+ in {
+ s = \\g,c => idet.s ! n ! g ! c ++ num.s ! g ;
+ n = n
+ } ;
+
+ AdvIAdv i a = {s = i.s ++ a.s} ;
+
+ CompIAdv a = {s = \\_ => a.s ; cop = estarCopula} ;
+
+ CompIP p = {s = \\_ => p.s ! Nom ; cop = serCopula} ;
+
+ lincat
+ QVP = ResBantu.VP ;
+ lin
+ ComplSlashIP vp ip = insertObject vp.c2 (heavyNP {s = ip.s ; a = {g = ip.a.g ; n = ip.a.n ; p = P3}}) vp ;
+ AdvQVP vp adv = insertAdv adv.s vp ;
+ AddAdvQVP vp adv = insertAdv adv.s vp ;
+
+ QuestQVP qp vp = {
+ s = \\t,a,b,_ =>
+ let
+ cl = mkClause (qp.s ! Nom) False False (agrP3 qp.a.g qp.a.n) vp
+ in
+ cl.s ! DDir ! t ! a ! b ! Indic
+ } ;
+-}
+}
+
diff --git a/src/bantu/RelativeBantu.gf b/src/bantu/RelativeBantu.gf
new file mode 100644
index 000000000..ed85dec8d
--- /dev/null
+++ b/src/bantu/RelativeBantu.gf
@@ -0,0 +1,50 @@
+incomplete concrete RelativeBantu of Relative =
+ CatBantu ** open Prelude, CommonBantu, ResBantu in {
+{-
+ flags optimize=all_subs ;
+
+ lin
+
+ RelCl cl = {
+ s = \\ag,t,a,p,m => pronSuch ! complAgr ag ++ conjThat ++
+ cl.s ! DDir ! t ! a ! p ! m ;
+ c = Nom
+ } ;
+
+ --- more efficient to compile than case inside mkClause; see log.txt
+ RelVP rp vp = case rp.hasAgr of {
+ True => {s = \\ag =>
+ (mkClause
+ (rp.s ! False ! complAgr ag ! Nom) False False
+ (Ag rp.a.g rp.a.n P3)
+ vp).s ! DDir ; c = Nom} ;
+ False => {s = \\ag =>
+ (mkClause
+ (rp.s ! False ! complAgr ag ! Nom) False False
+ ag
+ vp).s ! DDir ; c = Nom
+ }
+ } ;
+
+ RelSlash rp slash = {
+ s = \\ag,t,a,p,m =>
+ let aag = complAgr ag
+ in
+ slash.c2.s ++
+ rp.s ! False ! aag ! slash.c2.c ++
+ slash.s ! aag ! DDir ! t ! a ! p ! m ; --- ragr
+ c = Acc
+ } ;
+
+ FunRP p np rp = {
+ s = \\_,a,c => (np.s ! Nom).ton ++ p.s ++ rp.s ! True ! a ! p.c ;
+ a = complAgr np.a ;
+ hasAgr = True
+ } ;
+ IdRP = {
+ s = relPron ;
+ a = {g = Masc ; n = Sg} ;
+ hasAgr = False
+ } ;
+-}
+}
diff --git a/src/bantu/ResBantu.gf b/src/bantu/ResBantu.gf
new file mode 100644
index 000000000..b05f0ee29
--- /dev/null
+++ b/src/bantu/ResBantu.gf
@@ -0,0 +1,93 @@
+--1 Bantu auxiliary operations.
+
+interface ResBantu = DiffBantu ** open CommonBantu in {
+
+flags
+ optimize=all ;
+ coding=utf8 ;
+
+--2 Constants uniformly defined in terms of language-dependent constants
+
+oper
+ npNom : NPCase = NCase Nom ;
+ npLoc : NPCase = NCase Loc ;
+ npcase2case : NPCase -> Case = \nc -> case nc of {NCase c => c ; _ => Nom} ;
+
+
+ mkNP : (i,my : Str) -> Gender -> Number -> Person ->
+ {s : NPCase => Str ; a : Agr} = \i,my,g,n,p ->
+ { s = table {
+ NCase Nom => i ;
+ NPAcc => my ;
+ NCase Loc | NPNomPoss => my -- works for normal genitives, "whose", etc.
+ } ;
+ a = Ag g n p ;
+ };
+
+ regNP : Str ->Gender -> Number -> {s : NPCase => Str ; a : Agr} = \that,g, n ->
+ mkNP that that g n P3 ;
+
+ mkPron: (i, mine : Str) -> Gender -> Number -> Person ->
+ {s: PronForm => Str ; a : Agr} = \i,mine, g,n,p ->
+ { s = table {
+ Pers => i;
+ Poss n g => case of {
+ => ProunSgprefix g + mine ;
+ => ProunPlprefix g + mine}
+ } ;
+ a = Ag g n p } ;
+
+ Verb : Type = {s : Bool => VForm => Str} ;
+ VerbForms : Type = Tense => Anteriority => Bool => Agre => Str;
+ VP : Type = {s:VerbForms ; obj : Agr => Str};
+ SlashVP = VP ** {c2 : Str} ;
+
+ predV : Verb -> VP = \verb -> {
+ s = \\t,ant,b,agre =>
+ let
+ inf = verb.s !b! VInf ;
+ pres = verb.s !True! VPres agre.g agre.n agre.p ;
+ presn = verb.s !False! VPres agre.g agre.n agre.p ;
+ past = verb.s !True! VPast agre.g agre.n agre.p ;
+ pastn = verb.s !False! VPast agre.g agre.n agre.p ;
+ fut = verb.s !True! VFut agre.g agre.n agre.p ;
+ futn = verb.s !False! VFut agre.g agre.n agre.p ;
+ in
+ case of {
+ => pres ;
+ => fut ; --# notpresent
+ => past ; --# notpresent
+ => presn ;
+ => futn ; --# notpresent
+ => pastn
+ -- ; <_, _, _> => inf --# notpresent -- never reached
+ } ;
+ obj = \\_ => [] };
+
+ Clause : Type = {
+ s : Tense => Anteriority => Bool => Str
+ } ;
+
+ mkClause : Str -> Agre -> VP -> Clause =
+ \subj,agr,vp -> {
+ s = \\t,a,b =>
+ let
+ verb = vp.s ! t ! a ! b ! agr
+ in
+ subj ++ verb
+ } ;
+
+ finalComma : Str = pre {"," | "." => []; "" => SOFT_BIND ++ ","; _ => []} ;
+ frontComma : Str = SOFT_BIND ++ "," ;
+}
+
+-- insertObject:
+-- p -cat=Cl -tr "la femme te l' envoie"
+-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
+-- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron))
+-- la femme te l' a envoyé
+--
+-- p -cat=Cl -tr "la femme te lui envoie"
+-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
+-- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron))
+-- la femme te lui a envoyée
diff --git a/src/bantu/SentenceBantu.gf b/src/bantu/SentenceBantu.gf
new file mode 100644
index 000000000..9735f1974
--- /dev/null
+++ b/src/bantu/SentenceBantu.gf
@@ -0,0 +1,74 @@
+incomplete concrete SentenceBantu of Sentence =
+ CatBantu ** open Prelude, CommonBantu, ResBantu in {
+{-
+ flags optimize=all_subs ;
+ coding=utf8 ;
+
+ lin
+
+
+ PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
+
+ PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
+
+ ImpVP vp = {
+ s = \\pol,n =>
+ let
+ agr = AgP2 (numImp n) ;
+ verb = infVP VVAux vp Simul CPos agr ;
+ dont = case pol of {
+ CNeg True => "don't" ;
+ CNeg False => "do" ++ "not" ;
+ _ => []
+ }
+ in
+ dont ++ verb
+ } ;
+
+ SlashVP np vp =
+ mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ;
+
+ AdvSlash slash adv = {
+ s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
+ c2 = slash.c2
+ } ;
+
+ SlashPrep cl prep = cl ** {c2 = prep.s} ;
+
+ SlashVS np vs slash =
+ mkClause (np.s ! npNom) np.a
+ (insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
+ {c2 = slash.c2} ;
+
+ EmbedS s = {s = conjThat ++ s.s} ;
+ EmbedQS qs = {s = qs.s ! QIndir} ;
+ EmbedVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
+ UseCl t p cl = {
+ s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.b } ;
+
+ -- UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! p.b} ;
+ UseQCl t p cl = {
+ s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q
+ } ;
+ UseRCl t p cl = {
+ s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
+ c = cl.c
+ } ;
+ UseSlash t p cl = {
+ s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! oDir ;
+ c2 = cl.c2
+ } ;
+
+ AdvS a s = {s = a.s ++ s.s} ;
+ ExtAdvS a s = {s = a.s ++ frontComma ++ s.s} ;
+
+ SSubjS a s b = {s = a.s ++ frontComma ++ s.s ++ b.s} ;
+
+ RelS s r = {s = s.s ++ frontComma ++ r.s ! agrP3 Sg} ;
+
+ oper
+ ctr : CPolarity -> CPolarity = \x -> x ;
+--- ctr = contrNeg True ; -- contracted negations
+-}
+
+}
diff --git a/src/bantu/Symbol10Bantu.gf b/src/bantu/Symbol10Bantu.gf
new file mode 100644
index 000000000..231a9a9d5
--- /dev/null
+++ b/src/bantu/Symbol10Bantu.gf
@@ -0,0 +1,41 @@
+incomplete concrete SymbolBantu of Symbol =
+ CatBantu ** open Prelude, CommonBantu, ResBantu in {
+
+lin
+ SymbPN i = {s = i.s ; g = Masc} ;
+ IntPN i = {s = i.s ; g = Masc} ;
+ FloatPN i = {s = i.s ; g = Masc} ;
+ NumPN i = {s = i.s!Masc ; g = Masc} ;
+
+ CNIntNP cn i = heavyNP {
+ s = \\c => prepCase c ++ cn.s ! Sg ++ i.s ;
+ a = agrP3 cn.g Sg ;
+ hasClit = False
+ } ;
+ CNSymbNP det cn xs = let g = cn.g in heavyNP {
+ s = \\c => det.s ! g ! c ++ cn.s ! det.n ++ xs.s ;
+ a = agrP3 g det.n ;
+ hasClit = False
+ } ;
+ CNNumNP cn i = heavyNP {
+ s = \\c => artDef False cn.g Sg c ++ cn.s ! Sg ++ i.s ! Masc ;
+ a = agrP3 cn.g Sg ;
+ hasClit = False
+ } ;
+ SymbS sy = {s = \\_ => sy.s} ;
+
+ SymbNum n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
+ SymbOrd n = {s = \\_ => n.s ++ BIND ++ "º"} ; -- feminine variant ª, also variants 1.º and 1.ª
+
+lincat
+
+ Symb, [Symb] = SS ;
+
+lin
+
+ MkSymb s = s ;
+
+ BaseSymb = infixSS "et" ; ----
+ ConsSymb = infixSS "," ;
+
+}
diff --git a/src/bantu/Tense10Bantu.gf b/src/bantu/Tense10Bantu.gf
new file mode 100644
index 000000000..42adb1800
--- /dev/null
+++ b/src/bantu/Tense10Bantu.gf
@@ -0,0 +1,15 @@
+incomplete concrete TenseBantu of Tense =
+ CatBantu [Tense,Temp], TenseX [Ant,AAnter,ASimul] **
+ open ResBantu, CommonBantu, Prelude in {
+
+ lin
+ TTAnt t a = {s = a.s ++ t.s ; a = a.a ; t = t.t} ;
+ TPres = {s = []} ** {t = RPres} ;
+ TPast = {s = []} ** {t = RPast} ; --# notpresent
+ TFut = {s = []} ** {t = RFut} ; --# notpresent
+ TCond = {s = []} ** {t = RCond} ; --# notpresent
+
+ PPos = {s = [] ; p = RPos} ;
+ PNeg = {s = [] ; p = RNeg False} ;
+
+}
diff --git a/src/bantu/VerbBantu.gf b/src/bantu/VerbBantu.gf
new file mode 100644
index 000000000..3edc98bd2
--- /dev/null
+++ b/src/bantu/VerbBantu.gf
@@ -0,0 +1,69 @@
+incomplete concrete VerbBantu of Verb =
+ CatBantu ** open Prelude, CommonBantu, ResBantu in {
+{-
+ flags optimize=all_subs ;
+
+ lin
+ UseV = predV ;
+
+ SlashV2a v = predV v ** {c2 = v.c2 ; gapInMiddle = False} ;
+ Slash2V3 v np =
+ insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3 ; gapInMiddle = False}) ;
+ Slash3V3 v np =
+ insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
+
+ ComplVV v vp = insertObj (\\a => infVP v.typ vp Simul CPos a) (predVV v) ; ---- insertExtra?
+ ComplVS v s = insertExtra (conjThat ++ s.s) (predV v) ;
+--- ComplVS v s = insertObj (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predV v) ;
+ ComplVQ v q = insertExtra (q.s ! QIndir) (predV v) ;
+ -- ComplVA v ap = insertObj (ap.s (predV v)) ;
+
+ SlashV2V v vp = insertObjc (\\a => v.c3 ++ infVP v.typ vp Simul CPos a) (predVc v) ;
+ SlashV2S v s = insertExtrac (conjThat ++ s.s) (predVc v) ; ---- insertExtra?
+--- SlashV2S v s = insertObjc (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predVc v) ;
+ SlashV2Q v q = insertExtrac (q.s ! QIndir) (predVc v) ;
+ -- SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
+
+ ComplSlash vp np = case vp.gapInMiddle of {
+ True => insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ;
+ False => insertObj (\\_ => vp.c2 ++ np.s ! NPAcc) vp
+ } ;
+ SlashVV vv vp =
+ insertObj (\\a => infVP vv.typ vp Simul CPos a) (predVV vv) **
+ {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
+ SlashV2VNP vv np vp =
+ insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc)
+ (insertObjc (\\a => vv.c3 ++ infVP vv.typ vp Simul CPos a) (predVc vv)) **
+ {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
+
+ UseComp comp = insertObj comp.s (predAux auxBe) ;
+
+ AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
+ ExtAdvVP vp adv = insertObj (\\_ => frontComma ++ adv.s ++ finalComma) vp ;
+ AdVVP adv vp = insertAdV adv.s vp ;
+
+ AdvVPSlash vp adv = insertObj (\\_ => adv.s) vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
+ AdVVPSlash adv vp = insertAdV adv.s vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
+
+ ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
+
+ PassV2 v = insertObj (\\_ => v.s ! VPPart ++ v.p) (predAux auxBe) ;
+
+---b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
+
+
+ --CompAP ap = ap ;
+ CompNP np = {s = \\_ => np.s ! NPAcc} ;
+ CompAdv a = {s = \\_ => a.s} ;
+ CompCN cn = {s = \\a => case (fromAgr a).n of {
+ Sg => artIndef ++ cn.s ! Sg ! Nom ;
+ Pl => cn.s ! Pl ! Nom
+ }
+ } ;
+
+ -- UseCopula = auxBe ;
+
+ VPSlashPrep vp p = vp ** {c2 = p.s!Sg!G1 } ;
+-}
+}
+
diff --git a/src/egekusii/AdjectiveGus.gf b/src/egekusii/AdjectiveGus.gf
new file mode 100644
index 000000000..e30579d32
--- /dev/null
+++ b/src/egekusii/AdjectiveGus.gf
@@ -0,0 +1,16 @@
+concrete AdjectiveGus of Adjective = CatGus **AdjectiveBantu-[ComparA,UseComparA,ComplA2]
+with (ResBantu = ResGus)** open DiffGus in
+{
+flags coding=utf8;
+ lin
+ ComparA a np = {
+ s = \\g,n => a.s !AAdj g n ++ conjThan ++ np.s ! npNom ;
+ isPre = False} ;
+
+ UseComparA a = {s = \\g,n=> a.s !AAdj g n;isPre = True};
+
+ ComplA2 a np = {
+ s = \\g,n => a.s !AAdj g n ++ a.c2 ++ np.s ! NPAcc;
+ isPre = False
+ } ;
+ }
\ No newline at end of file
diff --git a/src/egekusii/AdverbGus.gf b/src/egekusii/AdverbGus.gf
new file mode 100644
index 000000000..14df4d77a
--- /dev/null
+++ b/src/egekusii/AdverbGus.gf
@@ -0,0 +1,13 @@
+concrete AdverbGus of Adverb = CatGus **AdverbBantu -[ComparAdvAdj,ComparAdvAdjS] with
+ (ResBantu = ResGus)** open DiffGus in
+{
+flags coding=utf8;
+ lin
+ ComparAdvAdj cadv a np =let agr = complAgr np.a
+ in {
+ s = cadv.s ++ a.s !AAdj agr.g agr.n ++ cadv.p ++ np.s ! npNom
+ } ;
+ ComparAdvAdjS cadv a s = {
+ s = cadv.s ++ a.s !AAdj G1 Sg ++ cadv.p ++ s.s
+ } ;
+ }
\ No newline at end of file
diff --git a/src/egekusii/CatGus.gf b/src/egekusii/CatGus.gf
new file mode 100644
index 000000000..3ec568dd0
--- /dev/null
+++ b/src/egekusii/CatGus.gf
@@ -0,0 +1,2 @@
+concrete CatGus of Cat = CommonX - [Pol]
+ ** CatBantu with (ResBantu = ResGus);
diff --git a/src/egekusii/ConjunctionGus.gf b/src/egekusii/ConjunctionGus.gf
new file mode 100644
index 000000000..e26984628
--- /dev/null
+++ b/src/egekusii/ConjunctionGus.gf
@@ -0,0 +1,2 @@
+concrete ConjunctionGus of Conjunction = CatGus ** ConjunctionBantu with
+ (ResBantu = ResGus);
\ No newline at end of file
diff --git a/src/egekusii/DiffGus.gf b/src/egekusii/DiffGus.gf
new file mode 100644
index 000000000..a307aebe9
--- /dev/null
+++ b/src/egekusii/DiffGus.gf
@@ -0,0 +1,244 @@
+instance DiffGus of DiffBantu = open CommonBantu, Prelude in {
+
+param
+ GenderGus = G1 | G2 | G3 |G4| G5|G6|G7|G8|G9|G10 ;
+oper
+ Gender = GenderGus ;
+ firstGender = G1 ; secondGender = G2 ;
+ conjThan = "kobua" ;
+ conjThat = "kobua" ;
+
+ conjGender : Gender -> Gender -> Gender = \m,n ->
+ case m of { G1 => n ; _ => G2 } ;
+ reflPron :Agr => Str = \\ag=> case of {
+ < Ag G1 Sg P1 > => "mimi" ;
+ < Ag G1 Sg P2 > => "wewe" ;
+ < Ag G1 Sg P3 > => "yeye" ;
+ < Ag _ Sg P3 > => "" ;
+ < Ag G1 Pl P1 > => "sisi" ;
+ < Ag G1 Pl P2 > => "nyinyi" ;
+ < Ag G1 Pl P3 > => "wao" ;
+ < Ag _ _ _ > => ""
+
+ };
+ possess_Prepof,mkPrepof : Number => Gender => Str =
+ table Number { Sg => table {
+ G1| G2 => "bwo" ;
+ G3 => "ya";
+ G4 => "ria";
+ G5 => "kia"; --
+ G6 => "rwa";
+ G7 => "ka";
+ G8 => "bwa";
+ G9 => "kwa";
+ G10 => "a"
+ };
+
+ Pl => table { G1 => "ba" ;
+ G2 => "ya" ;
+ G3|G6 => "cia";
+ G4 |G8|G9|G10 => "a";
+ G5 => "bi"; --
+ G7 => "bia"} } ;
+
+
+ superVery ="bi";
+
+Cardoneprefix : Gender -> Str = \g ->
+ case of {
+ =>"oya";
+ =>"aka";
+ =>"obo";
+ =>"eri";
+ =>"eye";
+ =>"oro";
+ =>"oyo";
+ =>"eke";
+ =>"oko";
+ => "a"
+ } ;
+Cardtwoprefix : Gender -> Str = \g ->
+ case of {
+ =>"ba";
+ | =>"bi";
+ | =>"a";
+ | =>"i";
+ | =>"e";
+ < G10> => ""
+ } ;
+
+ Allpredetprefix : Gender -> Str = \g ->
+ case of {
+ => "b" ;
+ => "y" ;
+ || => "bi" ;
+ | | => "" ;
+ | => "ci"
+ } ;
+
+
+ PrefixPlNom : Gender -> Str = \g ->
+ case of {
+ => "aba" ;
+ => "eme" ;
+ | => "ci" ;
+ | | => "ama" ;
+ | => "ebi";
+ => ""
+ } ;
+
+ mkprefix,Ordprefix : Gender -> Str = \g ->
+ case of {
+ | =>"o";
+ => "ria";
+ => "kia";
+ => "ya";
+ => "rwa";
+ => "ka";
+ => "bwa";
+ => "kwa";
+ < G10> => "a"
+ } ;
+
+ Cardprefix : Gender -> Str = \g ->
+ case of {
+ =>"ba";
+ | =>"bi";
+ | =>"a";
+ | =>"i";
+ | =>"e";
+ => ""
+ } ;
+
+ Mostpredetprefix : Gender -> Str = \g -> ""; -- not taken care of
+
+ ConsonantAdjprefix: Gender -> Number -> Str = \n,g -> ""; --not taken care of
+ {-case of {
+ => "m" ;
+ => "wa" ;
+ => "m" ;
+ => "mi" ;
+ => "ma" ;
+ => "ki" ;
+ => "vi" ;
+ => "m" ;
+ => "m" ;
+ => "m" ;
+ => "ma" ;
+ => "ma" ;
+ => "pa" ;
+ => "ku" ;
+ => "m" ;
+ <_,_> => ""
+ } ; -}
+
+ VowelAdjprefix: Gender -> Number -> Str = \n,g ->""; -- not taken care of
+ {-} case of {
+ => "mw" ;
+ => "w" ;
+ => "mw" ;
+ => "my" ;
+ => "j" ;
+ => "m" ;
+ => "ch" ;
+ => "vy" ;
+ => "ny";
+ => "ny";
+ => "mw" ;
+ => "y" ;
+ => "mw" ;
+ => "mw" ;
+ => "mw" ;
+ => "m" ;
+ => "m" ;
+ => "ny" ;
+ => "p" ;
+ => "kw" ;
+ => "mu" ;
+ <_,_> => ""
+ } ; -}
+
+ VoweliAdjprefix: Gender -> Number -> Str = \n,g -> ""; -- not taken care of
+ {-} case of {
+ => "mwi" ;
+ => "we" ;
+ => "mwi" ;
+ => "mi" ;
+ => "ji" ;
+ => "me" ;
+ => "ki" ;
+ => "vi" ;
+ => "zi";
+ => "zi";
+ => "mwi" ;
+ => "zi" ;
+ => "mwi" ;
+ => "mwi" ;
+ => "mwi" ;
+ => "me" ;
+ => "me" ;
+ => "zi" ;
+ => "pe" ;
+ => "kwi" ;
+ => "mwi" ;
+ <_,_> => ""
+ } ; -}
+Adjpprefix : Gender -> Number -> Str = \n,g ->
+ case of {
+ => "aba" ;
+ => "eme" ;
+ => "e" ;
+ => "eri" ;
+ => "ege" ;
+ => "ebi" ;
+ => "oro" ;
+ => "aka" ;
+ => "ebi";
+ => "obo" ;
+ => "oko" ;
+ => "aa" ;
+ | => "omo" ;
+ | => "ci" ;
+ | | => "ama" ;
+ => ""
+ } ;
+ ProunSgprefix : Gender -> Str = \g ->
+ case of {
+ | =>"o";
+ => "ria";
+ => "kia";
+ => "ya";
+ => "rwa";
+ => "ka";
+ => "bwa";
+ => "kwa";
+ => "a"
+ } ;
+
+ProunPlprefix : Gender -> Str = \g ->
+ case of {
+ | =>"ba";
+ | =>"a";
+ | =>"chia";
+ =>"ya";
+ =>"bia";
+ <_> => ""
+ } ;
+
+ dfltGender : Gender = G1 ;
+ dflt2Gender : Gender = G2 ;
+
+
+
+ param
+
+ VForm = VInf
+ | VPres Gender Number Person
+ | VPast Gender Number Person
+ | VFut Gender Number Person
+ -- | notpresent
+ ;
+
+ DForm = unit | teen | ten |hund ;
+ AForm = AAdj Gender Number;
+}
diff --git a/src/egekusii/GrammarGus.gf b/src/egekusii/GrammarGus.gf
new file mode 100644
index 000000000..19119486c
--- /dev/null
+++ b/src/egekusii/GrammarGus.gf
@@ -0,0 +1,30 @@
+--# -path=.:../abstract:../common:prelude
+
+concrete GrammarGus of Grammar =
+ NounGus,
+ VerbGus,
+ AdjectiveGus,
+ AdverbGus,
+ NumeralGus,
+ SentenceGus,
+ QuestionGus,
+ RelativeGus,
+ ConjunctionGus,
+ PhraseGus,
+ TextX - [Pol,PPos,PNeg,Pres],
+ StructuralGus,
+ IdiomGus,
+ TenseX - [Pol,PPos,PNeg,Pres]
+ ** {
+
+flags startcat = Phr ; unlexer = text ; lexer = text;
+
+--lin
+ --PPos = {s = [] ; p = CPos} ;
+ -- PNeg = {s = [] ; p = CNeg True} ; -- contracted: don't
+ --PPos = {s = [] ; b = True} ;
+ -- PNeg = {s = [] ; b = False} ;
+ -- TPres = {s = [] ; t = ResGus.Pres} ;
+ -- TPast = {s = [] ; t = ResGus.Past };
+ -- TFut = {s = [] ; t = ResGus.Fut };
+} ;
diff --git a/src/egekusii/IdiomGus.gf b/src/egekusii/IdiomGus.gf
new file mode 100644
index 000000000..4582e2281
--- /dev/null
+++ b/src/egekusii/IdiomGus.gf
@@ -0,0 +1,48 @@
+concrete IdiomGus of Idiom = CatGus ** open Prelude, ResGus in {
+
+ flags optimize=all_subs ;
+{-
+ lin
+ ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
+ GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
+
+ CleftNP np rs = mkClause "it" (agrP3 Sg)
+ (insertObj (\\_ => rs.s ! np.a)
+ (insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
+
+ CleftAdv ad s = mkClause "it" (agrP3 Sg)
+ (insertObj (\\_ => conjThat ++ s.s)
+ (insertObj (\\_ => ad.s) (predAux auxBe))) ;
+
+ ExistNP np =
+ mkClause "there" (agrP3 (fromAgr np.a).n)
+ (insertObj (\\_ => np.s ! NPAcc) (predAux auxBe)) ;
+
+ ExistIP ip =
+ mkQuestion (ss (ip.s ! npNom))
+ (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
+
+ ExistNPAdv np adv =
+ mkClause "there" (agrP3 (fromAgr np.a).n)
+ (insertObj (\\_ => np.s ! NPAcc ++ adv.s) (predAux auxBe)) ;
+
+ ExistIPAdv ip adv =
+ mkQuestion (ss (ip.s ! npNom))
+ (mkClause "there" (agrP3 ip.n) (insertObj (\\_ => adv.s) (predAux auxBe))) ;
+
+ ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
+
+ ImpPl1 vp = {s = "let's" ++ infVP VVAux vp Simul CPos (AgP1 Pl)} ;
+
+ ImpP3 np vp = {s = "let" ++ np.s ! NPAcc ++ infVP VVAux vp Simul CPos np.a} ;
+
+ SelfAdvVP vp = insertObj reflPron vp ;
+ SelfAdVVP vp = insertAdVAgr reflPron vp ;
+ SelfNP np = {
+ s = \\c => np.s ! c ++ reflPron ! np.a ;
+ a = np.a
+ } ;
+} -}
+
+}
+
diff --git a/src/egekusii/LangGus.gf b/src/egekusii/LangGus.gf
new file mode 100644
index 000000000..abf594085
--- /dev/null
+++ b/src/egekusii/LangGus.gf
@@ -0,0 +1,11 @@
+--# -path=.:../abstract:../common:../api
+
+concrete LangGus of Lang =
+ GrammarGus,
+ LexiconGus
+-- ,ConstructionGus
+ ** {
+
+
+
+} ;
diff --git a/src/egekusii/LexiconGus.gf b/src/egekusii/LexiconGus.gf
new file mode 100644
index 000000000..6bf8b40dc
--- /dev/null
+++ b/src/egekusii/LexiconGus.gf
@@ -0,0 +1,79 @@
+--# -path=.:prelude
+
+concrete LexiconGus of Lexicon = CatGus **
+ open ParadigmsGus,StructuralGus, Prelude in {
+
+flags
+ optimize=values ;
+
+lin
+person_N = regN "omonto" omo_aba;
+ woman_N = regN "omosubati" omo_aba;
+ house_N = regN "enyomba" e_ci ;
+ tree_N = regN "omote" omo_eme;
+ big_A = regA "nene" ;
+ beautiful_A = regA "muya" ;
+ black_A = regA "mwamu";
+ blue_A = regA "buluu" ;
+ broad_A = regA "gare" ;
+ brown_A = regA "maraba" ;
+ clean_A = iregA "safi" "safi";
+ clever_A = regA "ng'aini" ;
+ cold_A = regA "kundu";
+ correct_A = regA "keene" ;
+ dirty_A = regA "chabu" ;
+ dry_A = regA "kamoku" ;
+ full_A = regA "ichire" ;
+ good_A = regA "ya" ;
+ green_A = regA "machani" ;
+ heavy_A = regA "rito" ;
+ hot_A = regA "morero" ;
+ important_A = regA "eng'encho" ;
+ long_A = regA "tambe" ;
+ narrow_A = regA "nyerere" ;
+ near_A = regA "ang'e" ;
+ new_A = regA "nyia" ;
+ old_A = regA "koro" ;
+ red_A = regA "bariri" ;
+ rotten_A = regA "ng'undo" ;
+ round_A = regA "viringo" ;
+ sharp_A = regA "oge" ;
+ short_A = regA "eng'e" ;
+ small_A = regA "ke" ;
+ smooth_A = regA "terere" ;
+ straight_A = regA "ronge" ;
+ stupid_A = regA "riri" ;
+ thick_A = regA "netu" ;
+ thin_A = regA "reu" ;
+ ugly_A = regA "be";
+ warm_A = regA "berera" ;
+ wet_A = regA "nyiu" ;
+ white_A = regA "rabu" ;
+ yellow_A = regA "yaye" ;
+ young_A = regA "ke" ;
+ certain_A=regA "maena";
+ cow_N = regN "eng'ombe" e_ci ;
+ doctor_N = regN "omorwaria" omo_aba ;
+ dog_N = regN "esese" e_ci;
+ door_N = regN "omorangwa" omo_eme ;
+ enemy_N = regN "omobisa" omo_aba;
+ fish_N = regN "enswe" e_ci;
+ friend_N = regN "omosani" omo_aba;
+ garden_N = regN "omogondo" omo_eme;
+ girl_N = regN "omoiseke" omo_aba ;
+ lamp_N = regN "etaya" e_ci;
+ man_N = regN "omosacha" omo_aba ;
+ eye_N = iregN "eriso" "amaiso" eri_ama ;
+ tooth_N = regN "ero" eri_ama ;
+ wife_N = regN "omokungu" omo_aba;
+
+oper
+ aboutP = mkPrep "juu ya" ;
+ atP = mkPrep "vala ve" ;
+ forP = mkPrep "for" ;
+ fromP = mkPrep "kutoka" ;
+ inP = mkPrep "ndani" ;
+ onP = mkPrep "juu" ;
+ toP = mkPrep "hadi" ;
+
+} ;
diff --git a/src/egekusii/MorphoGus.gf b/src/egekusii/MorphoGus.gf
new file mode 100644
index 000000000..1f3063a5f
--- /dev/null
+++ b/src/egekusii/MorphoGus.gf
@@ -0,0 +1,446 @@
+--# -path=.:../../prelude
+
+--1 Egekusii Resource Morphology
+
+resource MorphoGus = CommonBantu ,
+ResGus ** open Prelude, Predef
+in {
+
+ flags optimize=all ;
+ oper
+ Many_prefix: Gender -> Str = \g ->
+ case of {
+ =>"aba";
+ || =>"ama";
+ | =>"cini";
+ =>"eme";
+ | =>"ebi";
+ => "ani"
+ } ;
+
+ Few_prefix : Gender -> Str = \g ->
+ case of {
+ =>"basi";
+ || =>"masi";
+ | =>"cisi";
+ =>"mesi";
+ | =>"bisi";
+ => "asi"
+ } ;
+
+
+ Detsomesgprefix : Gender -> Str = \g ->"";
+ {-} case of {
+ => "li" ;
+ => "ki" ;
+ => "me";
+ => "pe" ;
+ => "kwi" ;
+ | => "nyi" ;
+ |||| | => "mwi"
+
+ } ; -}
+ Some_prefix : Gender -> Str = \g ->
+ case of {
+ =>"beke";
+ =>"bike";
+ =>"make";
+ =>"make";
+ =>"nke";
+ =>"nke";
+ =>"mebe";
+ =>"bike";
+ =>"make";
+ => "ake"
+ } ;
+
+Detsomeplprefix : Gender -> Str = \g ->"";
+ {-} case of {
+ => "we" ;
+ => "mi" ;
+ => "nyi" ;
+ => "pe" ;
+ => "kwi" ;
+ => "vi" ;
+ | => "nye" ;
+ | => "mwi" ;
+ | | => "me"
+
+ } ; -}
+
+ mkNum3 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ CardThirteenprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ second} ;
+ ten => table {NCard =>\\g =>"emerongo etato" ;
+ NOrd => \\g => Ordprefix g ++ "emerongo etato"};
+ hund => table {NCard =>\\g =>"amagana atato " ;
+ NOrd => \\g => Ordprefix g ++ "amagana atato"}
+ }
+ } ;
+ mkNum4 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardfouteenprefix g ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ second } ;
+ ten => table {NCard =>\\g =>"emerongo ene";
+ NOrd => \\g => Ordprefix g ++ "emerongo ene"};
+ hund => table {NCard =>\\g =>"amagana ane " ;
+ NOrd => \\g => Ordprefix g ++ "amagana ane"}
+ }
+ } ;
+ mkNum5 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ;-- create table totake care of eci and oroci which is isano not itano
+ NOrd => \\g => Ordprefix g ++ second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardfifteenprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ second } ;
+ ten => table {NCard =>\\g =>"emerongo etano" ;
+ NOrd => \\g => Ordprefix g ++ "emerongo etano"};
+ hund => table {NCard =>\\g =>"amagana atano " ;
+ NOrd => \\g => Ordprefix g ++ "amagana atano"}
+ }
+ } ;
+
+ mkNum6 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ++Cardsixprefix g + second;
+ NOrd => \\g => Ordprefix g ++ "ga" + two ++ "ri" + second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardfifteenprefix g + two ++ Cardsixprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ "ga" + two ++ "ri" + second} ;
+ ten => table {NCard =>\\g =>"emerongo etano" ++ Cardsixprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "emerongo etato"++ "ri" + second};
+ hund => table {NCard =>\\g =>"amagana atano "++ Cardoneprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "amagana atano"++ "ri" + second}
+ }
+ } ;
+
+ mkNum7 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ++Cardtwoprefix g + second;
+ NOrd => \\g => Ordprefix g ++ "ga" + two ++ "ka" + second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardfifteenprefix g + two ++ Cardtwoprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ "ga" + two ++ "ka" + second} ;
+ ten => table {NCard =>\\g =>"emerongo etano" ++ Cardtwoprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "emerongo etano"++ "ka" + second};
+ hund => table {NCard =>\\g =>"amagana atano "++ Cardtwoprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "amagana atano"++"ka" + second}
+ }
+ } ;
+
+ mkNum8 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardprefix g + two ++ Cardprefix g + second;
+ NOrd => \\g => Ordprefix g ++ "ga" + two ++ "ga" + second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardfifteenprefix g + two ++ Cardprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ "ga" + two ++ "ga" + second} ;
+ ten => table {NCard =>\\g =>"emerongo etano" ++ Cardprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "emerongo etano"++ "ga" + second};
+ hund => table {NCard =>\\g =>"amagana atano "++ Cardprefix g + second ;
+ NOrd => \\g => Ordprefix g ++ "amagana atano"++ "ga" + second}
+ }
+ } ;
+ mkNum2 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardtwoprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ second} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ Cardtwelveprefix g + two ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ Cardtwelveprefix g + two } ;
+ ten => table {NCard =>\\g =>"emerongo ebere" ;
+ NOrd => \\g => Ordprefix g ++ "emerongo ebere" };
+ hund => table {NCard =>\\g =>"amagana ebere" ;
+ NOrd => \\g => Ordprefix g ++ "amagana ebere" }
+ }
+ } ;
+
+ mkNum1 : Str -> Str -> {s : DForm => CardOrd => Gender => Str} =
+ \two, second ->
+ {s = table {
+ unit => table {NCard =>\\g => Cardoneprefix g + two ;
+ NOrd => \\g => Ordoneprefix g ++ second} ;
+ teen => table {NCard =>\\g =>"ikomi nemo" ;
+ NOrd => \\g => Ordprefix g ++ "ikomi " ++ "nemo"} ;
+ ten => table {NCard =>\\g =>"ikomi" ;
+ NOrd => \\g => Ordprefix g ++ "ikomi"};
+ hund => table {NCard =>\\g =>"rigana erimo";
+ NOrd => \\g => Ordprefix g ++ "rigana erimo" }
+ }
+ } ;
+
+ regNum : Str -> {s : DForm => CardOrd => Gender => Str} =
+ \six -> {s = table {
+ unit => table {NCard =>\\g => six ;
+ NOrd => \\g => Ordprefix g ++ six} ;
+ teen => table {NCard =>\\g =>"ikomi na" ++ six ;
+ NOrd => \\g => Ordprefix g ++ "ikomi na" ++ six} ;
+ ten => table {NCard =>\\g =>"emerongo" ++ six ;
+ NOrd => \\g => Ordprefix g ++ "emerongo" ++ six};
+ hund => table {NCard =>\\g =>"amagana " ++ six ;
+ NOrd => \\g => Ordprefix g ++ "amagana" ++ six}
+ } } ;
+
+
+ regCardOrd : Str -> {s : CardOrd => Gender => Str} = \ten ->
+ {s = table {NCard => \\g => ten ;
+ NOrd =>\\g => Ordprefix g ++ ten } } ;
+
+ regCardone : Str -> Str -> {s : CardOrd => Gender => Str} = \ten,one ->
+ {s = table {NCard => \\g => ten ++ Cardoneprefix g + one ;
+ NOrd =>\\g => Ordprefix g ++ ten ++ Cardoneprefix g + one } } ;
+
+ mkCard : CardOrd -> Str -> Gender => Str = \o,ten ->
+ (regCardOrd ten).s ! o ;
+
+
+
+
+
+regN : Str ->Gender -> Noun = \w, g ->let
+ ndeto= PrefixPlNom g + Predef.drop 3 w;
+ in case g of {
+ G4 => {s = table { Sg => table {Nom => w; Loc => ""} ;
+ Pl=>table{ Nom => "ama" + Predef.drop 2 w; Loc => "" }
+ }; g = g} ;
+ G3=> {s = table { Sg => table {Nom => w; Loc => ""} ;
+ Pl=>table{ Nom => "ci" + Predef.drop 1 w; Loc => "" }
+ }; g = g} ;
+ _ => {s = table { Sg => table {Nom => w; Loc => ""} ;
+ Pl=>table{ Nom => ndeto; Loc => "" } };
+ g = g}};
+
+ iregN :Str-> Str ->Gender -> Noun= \man,men,g -> {
+ s = table{Sg => table{Nom => man ; Loc=> ""};
+ Pl => table{Nom => men ; Loc=> ""}} ;
+ g = g
+ } ;
+
+ regA:Str -> {s : AForm => Str} = \seo -> {s = table {
+ AAdj G1 Sg=>case Predef.take 1 seo of {
+ "a"|"e"|"i"|"u" => "omu" + seo;
+ "o" => "omw" + seo;
+ _ => ConsonantAdjprefix G1 Sg + seo };
+ AAdj G1 Pl =>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G1 Pl + seo };
+
+
+ AAdj G2 Sg=>case Predef.take 1 seo of {
+ "a"|"e"|"i"|"u" => "omu" + seo;
+ "o" => "omw" + seo;
+ _ => ConsonantAdjprefix G2 Sg + seo };
+ AAdj G2 Pl =>case Predef.take 1 seo of {
+ "o" => "emi" + seo;
+ _ => ConsonantAdjprefix G2 Pl + seo };
+
+ AAdj G3 Sg=>case Predef.take 1 seo of {
+ "o" |"i" => "eng" + seo;
+ _ => ConsonantAdjprefix G3 Sg + seo };
+ AAdj G3 Pl =>case Predef.take 1 seo of {
+ "o" |"i" => "ching" + seo;
+ _ => ConsonantAdjprefix G3 Pl + seo };
+ AAdj G4 Sg=>case Predef.take 1 seo of {
+ "a"|"e"|"i"|"o"|"u" => "rigi" + seo;
+ _ => ConsonantAdjprefix G4 Sg + seo };
+ AAdj G4 Pl =>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G4 Pl + seo };
+ AAdj G5 Sg=>case Predef.take 1 seo of {
+ "i" => "eki" + seo;
+ _ => ConsonantAdjprefix G5 Sg + seo };
+ AAdj G5 Pl =>case Predef.take 1 seo of {
+ "i" => "ebi" + seo;
+ _ => ConsonantAdjprefix G5 Pl + seo };
+
+ AAdj G6 Sg=>case Predef.take 1 seo of {
+ "i"|"o" => "oru"+ seo;
+ _ => ConsonantAdjprefix G6 Sg + seo };
+ AAdj G6 Pl =>case Predef.take 1 seo of {
+ "i"|"o" => "ching'"+ seo;
+ _ => ConsonantAdjprefix G6 Pl + seo };
+ AAdj G7 Sg=>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G7 Sg + seo };
+ AAdj G7 Pl =>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G7 Pl + seo };
+ AAdj G8 Sg=>case Predef.take 1 seo of {
+ "i"|"o" => "obu"+ seo;
+ _ => ConsonantAdjprefix G8 Sg + seo };
+ AAdj G8 Pl =>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G8 Pl + seo };
+ AAdj G9 Sg=>case Predef.take 1 seo of {
+ "i"|"o" => "oku" + seo;
+ _ => ConsonantAdjprefix G9 Sg + seo };
+ AAdj G9 Pl =>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G9 Pl + seo };
+
+ AAdj G10 Sg=>case Predef.take 1 seo of {
+ _ => ConsonantAdjprefix G10 Sg + seo };
+ AAdj G10 Pl =>[] }};
+
+
+lregA : Str-> Str -> {s : AForm => Str} = \seo,seoo -> {
+ s = table {
+ AAdj g Sg => ProunSgprefix g + seo ++ seoo;
+ AAdj g Pl=> ProunPlprefix g + seo ++ seoo
+ } } ;
+
+iregA : Str-> Str -> {s : AForm => Str} = \seo,seoo -> {
+ s = table {
+ AAdj g Sg=> seo;
+ AAdj g Pl => seoo} };
+
+regV : Str -> Verb =
+ \vika -> {
+ s = table{ True => table{
+ VInf => vika;
+ VPres g n p => Verbprefix g n p + vika;
+ VPast g n p => Verbprefix g n p + init vika + "ie" ;
+ VFut g n p => Verbfutureprefix g n p + vika
+ } ;
+ False =>table {
+ VInf => "ndi" + vika;
+ VPres g n p => neg (Ag g n p) False Pres + "na" + vika ;
+ VPast g n p => neg (Ag g n p) False Past + "ne" + vika ;
+ VFut g n p => neg (Ag g n p) False Fut + "ka" + vika
+ }
+ };
+ };
+
+ neg : Agr -> Bool ->Tense -> Str = \a,b,t -> let
+ g = getGender a;
+ n=getNumber a;
+ p=getPerson a
+ in case b of {True => [] ; False => negprefix g n t p} ;
+
+ negprefix : Gender -> Number -> Tense -> Person -> Str =\g,n,t,p-> case of {
+ => "ndi";
+ => "ndu";
+ => "ndu";
+ => "twi";
+ => "mwi";
+ => "mai";
+ => "ndu";
+ => "i";
+ => "i";
+ => "mai";
+ => "ki";
+