forked from GitHub/gf-rgl
added egekusii language based on Bantu functor
This commit is contained in:
16
src/egekusii/AdjectiveGus.gf
Normal file
16
src/egekusii/AdjectiveGus.gf
Normal file
@@ -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
|
||||||
|
} ;
|
||||||
|
}
|
||||||
13
src/egekusii/AdverbGus.gf
Normal file
13
src/egekusii/AdverbGus.gf
Normal file
@@ -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
|
||||||
|
} ;
|
||||||
|
}
|
||||||
2
src/egekusii/CatGus.gf
Normal file
2
src/egekusii/CatGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete CatGus of Cat = CommonX - [Pol]
|
||||||
|
** CatBantu with (ResBantu = ResGus);
|
||||||
2
src/egekusii/ConjunctionGus.gf
Normal file
2
src/egekusii/ConjunctionGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete ConjunctionGus of Conjunction = CatGus ** ConjunctionBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
244
src/egekusii/DiffGus.gf
Normal file
244
src/egekusii/DiffGus.gf
Normal file
@@ -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 <ag > 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 <g> of {
|
||||||
|
<G1> =>"oya";
|
||||||
|
<G7> =>"aka";
|
||||||
|
<G8> =>"obo";
|
||||||
|
<G4> =>"eri";
|
||||||
|
<G3> =>"eye";
|
||||||
|
<G6> =>"oro";
|
||||||
|
<G2> =>"oyo";
|
||||||
|
<G5> =>"eke";
|
||||||
|
<G9> =>"oko";
|
||||||
|
<G10> => "a"
|
||||||
|
} ;
|
||||||
|
Cardtwoprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"ba";
|
||||||
|
<G7> |<G5> =>"bi";
|
||||||
|
<G8> |<G4> =>"a";
|
||||||
|
<G3> |<G6> =>"i";
|
||||||
|
<G2> |<G9> =>"e";
|
||||||
|
< G10> => ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Allpredetprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> => "b" ;
|
||||||
|
<G2> => "y" ;
|
||||||
|
<G3> |<G5>| <G8> => "bi" ;
|
||||||
|
<G9> | <G10> |<G4> => "" ;
|
||||||
|
<G6> | <G7> => "ci"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
PrefixPlNom : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> => "aba" ;
|
||||||
|
<G2> => "eme" ;
|
||||||
|
<G3> |<G6> => "ci" ;
|
||||||
|
<G4>| <G8> |<G9> => "ama" ;
|
||||||
|
<G5> |<G7> => "ebi";
|
||||||
|
<G10> => ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkprefix,Ordprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G2> =>"o";
|
||||||
|
<G4> => "ria";
|
||||||
|
<G5> => "kia";
|
||||||
|
<G3> => "ya";
|
||||||
|
<G6>=> "rwa";
|
||||||
|
<G7>=> "ka";
|
||||||
|
<G8>=> "bwa";
|
||||||
|
<G9>=> "kwa";
|
||||||
|
< G10> => "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Cardprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"ba";
|
||||||
|
<G7> |<G5> =>"bi";
|
||||||
|
<G8> |<G4> =>"a";
|
||||||
|
<G3> |<G6> =>"i";
|
||||||
|
<G2> |<G9> =>"e";
|
||||||
|
<G10> => ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Mostpredetprefix : Gender -> Str = \g -> ""; -- not taken care of
|
||||||
|
|
||||||
|
ConsonantAdjprefix: Gender -> Number -> Str = \n,g -> ""; --not taken care of
|
||||||
|
{-case <n,g> of {
|
||||||
|
<G1,Sg> => "m" ;
|
||||||
|
<G1,Pl> => "wa" ;
|
||||||
|
<G2,Sg> => "m" ;
|
||||||
|
<G2,Pl> => "mi" ;
|
||||||
|
<G3,Pl> => "ma" ;
|
||||||
|
<G4,Sg> => "ki" ;
|
||||||
|
<G4,Pl> => "vi" ;
|
||||||
|
<G6,Sg> => "m" ;
|
||||||
|
<G7,_> => "m" ;
|
||||||
|
<G8,Sg> => "m" ;
|
||||||
|
<G8,Pl> => "ma" ;
|
||||||
|
<G9,_> => "ma" ;
|
||||||
|
<G11,Sg> => "pa" ;
|
||||||
|
<G12,Sg> => "ku" ;
|
||||||
|
<G13,Sg> => "m" ;
|
||||||
|
<_,_> => ""
|
||||||
|
} ; -}
|
||||||
|
|
||||||
|
VowelAdjprefix: Gender -> Number -> Str = \n,g ->""; -- not taken care of
|
||||||
|
{-} case <n,g> of {
|
||||||
|
<G1,Sg> => "mw" ;
|
||||||
|
<G1,Pl> => "w" ;
|
||||||
|
<G2,Sg> => "mw" ;
|
||||||
|
<G2,Pl> => "my" ;
|
||||||
|
<G3,Sg> => "j" ;
|
||||||
|
<G3,Pl> => "m" ;
|
||||||
|
<G4,Sg> => "ch" ;
|
||||||
|
<G4,Pl> => "vy" ;
|
||||||
|
<G5,Sg> => "ny";
|
||||||
|
<G5,Pl> => "ny";
|
||||||
|
<G6,Sg>=> "mw" ;
|
||||||
|
<G6,Pl> => "y" ;
|
||||||
|
<G7,Sg> => "mw" ;
|
||||||
|
<G7,Pl> => "mw" ;
|
||||||
|
<G8,Sg>=> "mw" ;
|
||||||
|
<G8,Pl> => "m" ;
|
||||||
|
<G9,_> => "m" ;
|
||||||
|
<G10,_> => "ny" ;
|
||||||
|
<G11,Sg> => "p" ;
|
||||||
|
<G12,Sg> => "kw" ;
|
||||||
|
<G13,Sg> => "mu" ;
|
||||||
|
<_,_> => ""
|
||||||
|
} ; -}
|
||||||
|
|
||||||
|
VoweliAdjprefix: Gender -> Number -> Str = \n,g -> ""; -- not taken care of
|
||||||
|
{-} case <n,g> of {
|
||||||
|
<G1,Sg> => "mwi" ;
|
||||||
|
<G1,Pl> => "we" ;
|
||||||
|
<G2,Sg> => "mwi" ;
|
||||||
|
<G2,Pl> => "mi" ;
|
||||||
|
<G3,Sg> => "ji" ;
|
||||||
|
<G3,Pl> => "me" ;
|
||||||
|
<G4,Sg> => "ki" ;
|
||||||
|
<G4,Pl> => "vi" ;
|
||||||
|
<G5,Sg> => "zi";
|
||||||
|
<G5,Pl> => "zi";
|
||||||
|
<G6,Sg>=> "mwi" ;
|
||||||
|
<G6,Pl> => "zi" ;
|
||||||
|
<G7,Sg> => "mwi" ;
|
||||||
|
<G7,Pl> => "mwi" ;
|
||||||
|
<G8,Sg>=> "mwi" ;
|
||||||
|
<G8,Pl> => "me" ;
|
||||||
|
<G9,_> => "me" ;
|
||||||
|
<G10,_> => "zi" ;
|
||||||
|
<G11,Sg> => "pe" ;
|
||||||
|
<G12,Sg> => "kwi" ;
|
||||||
|
<G13,Sg> => "mwi" ;
|
||||||
|
<_,_> => ""
|
||||||
|
} ; -}
|
||||||
|
Adjpprefix : Gender -> Number -> Str = \n,g ->
|
||||||
|
case <n,g> of {
|
||||||
|
<G1,Pl> => "aba" ;
|
||||||
|
<G2,Pl> => "eme" ;
|
||||||
|
<G3,Sg> => "e" ;
|
||||||
|
<G4,Sg> => "eri" ;
|
||||||
|
<G5,Sg> => "ege" ;
|
||||||
|
<G5,Pl> => "ebi" ;
|
||||||
|
<G6,Sg> => "oro" ;
|
||||||
|
<G7,Sg> => "aka" ;
|
||||||
|
<G7,Pl> => "ebi";
|
||||||
|
<G8,Sg> => "obo" ;
|
||||||
|
<G9,Sg> => "oko" ;
|
||||||
|
<G10,Sg> => "aa" ;
|
||||||
|
<G1,Sg>|<G2,Sg> => "omo" ;
|
||||||
|
<G3,Pl> |<G6,Pl> => "ci" ;
|
||||||
|
<G4,Pl>|<G8,Pl> |<G9,Pl> => "ama" ;
|
||||||
|
<G10,Pl> => ""
|
||||||
|
} ;
|
||||||
|
ProunSgprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G2> =>"o";
|
||||||
|
<G4> => "ria";
|
||||||
|
<G5> => "kia";
|
||||||
|
<G3> => "ya";
|
||||||
|
<G6>=> "rwa";
|
||||||
|
<G7>=> "ka";
|
||||||
|
<G8>=> "bwa";
|
||||||
|
<G9>=> "kwa";
|
||||||
|
<G10> => "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ProunPlprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G7> =>"ba";
|
||||||
|
<G8> |<G4> =>"a";
|
||||||
|
<G3> |<G6> =>"chia";
|
||||||
|
<G2> =>"ya";
|
||||||
|
<G5> =>"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;
|
||||||
|
}
|
||||||
30
src/egekusii/GrammarGus.gf
Normal file
30
src/egekusii/GrammarGus.gf
Normal file
@@ -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 };
|
||||||
|
} ;
|
||||||
48
src/egekusii/IdiomGus.gf
Normal file
48
src/egekusii/IdiomGus.gf
Normal file
@@ -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
|
||||||
|
} ;
|
||||||
|
} -}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
11
src/egekusii/LangGus.gf
Normal file
11
src/egekusii/LangGus.gf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--# -path=.:../abstract:../common:../api
|
||||||
|
|
||||||
|
concrete LangGus of Lang =
|
||||||
|
GrammarGus,
|
||||||
|
LexiconGus
|
||||||
|
-- ,ConstructionGus
|
||||||
|
** {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
79
src/egekusii/LexiconGus.gf
Normal file
79
src/egekusii/LexiconGus.gf
Normal file
@@ -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" ;
|
||||||
|
|
||||||
|
} ;
|
||||||
446
src/egekusii/MorphoGus.gf
Normal file
446
src/egekusii/MorphoGus.gf
Normal file
@@ -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 <g> of {
|
||||||
|
<G1> =>"aba";
|
||||||
|
<G4> |<G9>|<G8> =>"ama";
|
||||||
|
<G3> |<G6> =>"cini";
|
||||||
|
<G2> =>"eme";
|
||||||
|
<G5> | <G7> =>"ebi";
|
||||||
|
<G10> => "ani"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Few_prefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"basi";
|
||||||
|
<G4> |<G9>|<G8> =>"masi";
|
||||||
|
<G3> |<G6> =>"cisi";
|
||||||
|
<G2> =>"mesi";
|
||||||
|
<G5> | <G7> =>"bisi";
|
||||||
|
<G10> => "asi"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
Detsomesgprefix : Gender -> Str = \g ->"";
|
||||||
|
{-} case <g> of {
|
||||||
|
<G3> => "li" ;
|
||||||
|
<G4> => "ki" ;
|
||||||
|
<G9> => "me";
|
||||||
|
<G11> => "pe" ;
|
||||||
|
<G12> => "kwi" ;
|
||||||
|
<G5>|<G10> => "nyi" ;
|
||||||
|
<G1> |<G6>|<G2>|<G7>|<G8> |<G13> => "mwi"
|
||||||
|
|
||||||
|
} ; -}
|
||||||
|
Some_prefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"beke";
|
||||||
|
<G7> =>"bike";
|
||||||
|
<G8> =>"make";
|
||||||
|
<G4> =>"make";
|
||||||
|
<G3> =>"nke";
|
||||||
|
<G6> =>"nke";
|
||||||
|
<G2> =>"mebe";
|
||||||
|
<G5> =>"bike";
|
||||||
|
<G9> =>"make";
|
||||||
|
<G10> => "ake"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Detsomeplprefix : Gender -> Str = \g ->"";
|
||||||
|
{-} case <g> of {
|
||||||
|
<G1> => "we" ;
|
||||||
|
<G2> => "mi" ;
|
||||||
|
<G10> => "nyi" ;
|
||||||
|
<G11> => "pe" ;
|
||||||
|
<G12> => "kwi" ;
|
||||||
|
<G4> => "vi" ;
|
||||||
|
<G5>|<G6> => "nye" ;
|
||||||
|
<G7> |<G13> => "mwi" ;
|
||||||
|
<G3>|<G8> |<G9> => "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 <g,n,t,p> of {
|
||||||
|
<G1,Sg,_,P1> => "ndi";
|
||||||
|
<G1,Sg,_,P2> => "ndu";
|
||||||
|
<G1,Sg,_,P3> => "ndu";
|
||||||
|
<G1,Pl,_,P1> => "twi";
|
||||||
|
<G1,Pl,_,P2> => "mwi";
|
||||||
|
<G1,Pl,_,P3> => "mai";
|
||||||
|
<G2,Sg,_,_> => "ndu";
|
||||||
|
<G2,Pl,_,_> => "i";
|
||||||
|
<G3,Sg,_,_> => "i";
|
||||||
|
<G3,Pl,_,_> => "mai";
|
||||||
|
<G4,Sg,_,_> => "ki";
|
||||||
|
<G4,Pl,_,_> => "i";
|
||||||
|
<G5,Sg,_,_> => "kai";
|
||||||
|
<G5,Pl,_,_> => "tui";
|
||||||
|
<G6,Sg,_,_> => "vai";
|
||||||
|
<G6,Pl,_,_> => "kui";
|
||||||
|
<G7,Sg,_,_> => "i";
|
||||||
|
<_,_,_,_> => "syi"
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Verbprefix : Gender -> Number -> Person -> Str = \g, n, p ->
|
||||||
|
case <g,n,p> of {
|
||||||
|
<G1,Sg,P1> => "na" ;
|
||||||
|
<G1,Sg,P2> => "wa" ;
|
||||||
|
<G1,Sg,P3> => "wa" ;
|
||||||
|
<G1,Pl,P1> => "twa" ;
|
||||||
|
<G1,Pl,P2> => "mwa" ;
|
||||||
|
<G1,Pl,P3> => "ma" ;
|
||||||
|
<G2,Sg,_> => "wa" ;
|
||||||
|
<G2,Pl, _> => "ya" ;
|
||||||
|
<G4,Sg,_> => "kya" ;
|
||||||
|
<G4,Pl,_> => "sya" ;
|
||||||
|
<G3,Sg,_> => "ya" ;
|
||||||
|
<G3,Pl,_> => "ma" ;
|
||||||
|
<G5,Sg,_> => "ka" ;
|
||||||
|
<G5,Pl,_> => "twa" ;
|
||||||
|
<G6,Sg,_> => "va" ;
|
||||||
|
<G6,Pl,_> => "kwa" ;
|
||||||
|
<G7,Sg,_> => "ya" ;
|
||||||
|
<_,_,_> => "sya"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Verbfutureprefix : Gender -> Number -> Person -> Str = \g, n, p ->
|
||||||
|
case <g,n,p> of {
|
||||||
|
<G1,Sg,P1> => "nga" ;
|
||||||
|
<G1,Sg,P2> => "uka" ;
|
||||||
|
<G1,Sg,P3> => "uka" ;
|
||||||
|
<G1,Pl,P1> => "tuka" ;
|
||||||
|
<G1,Pl,P2> => "muka" ;
|
||||||
|
<G1,Pl,P3> => "maka" ;
|
||||||
|
<G2,Sg,_> => "uka" ;
|
||||||
|
<G2,Pl, _> => "ika" ;
|
||||||
|
<G4,Sg,_> => "kika" ;
|
||||||
|
<G4,Pl,_> => "ika" ;
|
||||||
|
<G3,Sg,_> => "ika" ;
|
||||||
|
<G3,Pl,_> => "maka" ;
|
||||||
|
<G5,Sg,_> => "kaka" ;
|
||||||
|
<G5,Pl,_> => "tuka" ;
|
||||||
|
<G6,Sg,_> => "vaka" ;
|
||||||
|
<G6,Pl,_> => "kuka" ;
|
||||||
|
<G7,Sg,_> => "ika" ;
|
||||||
|
<_,_,_> => "ika"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
Cardtwelveprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"ba";
|
||||||
|
<G2> =>"ne";
|
||||||
|
<_> => "i"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
CardThirteenprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G7> |<G5>=>"bat";
|
||||||
|
<G8> |<G4> |<G9> =>"at";
|
||||||
|
<G3> |<G6> =>"is";
|
||||||
|
<G2> =>"nit";
|
||||||
|
<G10> =>"at"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Cardsixprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"o";
|
||||||
|
<G7> |<G5>=>"bi";
|
||||||
|
<G2>|<G4> |<G3>|<G6> |<G8> |<G9> |<G10> =>"e"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Cardfouteenprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G7> |<G5>=>"bane";
|
||||||
|
<G8> |<G4> |<G9> =>"ane";
|
||||||
|
<G3> |<G6> =>"inye";
|
||||||
|
<G2> =>"ene";
|
||||||
|
<G10> =>"ene"
|
||||||
|
} ;
|
||||||
|
Cardfifteenprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> =>"ba";
|
||||||
|
<G5> |<G7>=>"bi";
|
||||||
|
<G8> |<G9> |<G4> =>"a";
|
||||||
|
<G3> |<G6> =>"es";
|
||||||
|
<G2> =>"e";
|
||||||
|
<G10> =>"a"
|
||||||
|
} ;
|
||||||
|
Ordoneprefix : Gender -> Str = \g ->
|
||||||
|
case <g> of {
|
||||||
|
<G1> |<G2> =>"omo";
|
||||||
|
<G4> => "rita";
|
||||||
|
<G5> => "ege";
|
||||||
|
<G3> => "en";
|
||||||
|
<G6>=> "oro";
|
||||||
|
<G7>=> "aka";
|
||||||
|
<G8>=> "abo";
|
||||||
|
<G9>=> "oko";
|
||||||
|
< G10> => "aa"
|
||||||
|
} ;
|
||||||
|
}
|
||||||
2
src/egekusii/NounGus.gf
Normal file
2
src/egekusii/NounGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete NounGus of Noun =
|
||||||
|
CatGus ** NounBantu with (Structural = StructuralGus), (ResBantu = ResGus);
|
||||||
86
src/egekusii/NumeralGus.gf
Normal file
86
src/egekusii/NumeralGus.gf
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
concrete NumeralGus of Numeral = CatGus [Numeral,Digits] ** open Prelude,
|
||||||
|
DiffGus,MorphoGus in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Digit = {s : DForm => CardOrd => Gender => Str} ;
|
||||||
|
Sub10 = {s : DForm => CardOrd => Gender => Str ; n : Number} ;
|
||||||
|
Sub100 = {s : CardOrd => Gender => Str ; n : Number} ;
|
||||||
|
Sub1000 = {s : CardOrd => Gender => Str ; n : Number} ;
|
||||||
|
Sub1000000 = {s : CardOrd => Gender => Str ; n : Number} ;
|
||||||
|
|
||||||
|
lin num x = x ;
|
||||||
|
lin n2 = mkNum2 "bere" "kabere" ;
|
||||||
|
lin n3 = mkNum3 "ato" "gatatu" ;
|
||||||
|
lin n4 = mkNum4 "ne" "kane" ;
|
||||||
|
lin n5 = mkNum5 "tano" "gatano" ;
|
||||||
|
lin n6 = mkNum6 "tano" "mo";
|
||||||
|
lin n7 = mkNum7 "tano" "bere";
|
||||||
|
lin n8 = mkNum8 "tano" "tato";
|
||||||
|
lin n9 = regNum "kianda" ;
|
||||||
|
|
||||||
|
lin pot01 = mkNum1 "mo" "tang'ani" ** {n = Sg} ;
|
||||||
|
lin pot0 d = d ** {n = Pl} ;
|
||||||
|
lin pot110 = regCardOrd "ikomi" ** {n = Pl} ;
|
||||||
|
lin pot111 = regCardone "ikomi na" "mo" ** {n = Pl} ; -- creat another function to be gender specific
|
||||||
|
lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
||||||
|
lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
|
||||||
|
lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
||||||
|
lin pot1plus d e = { s = table {
|
||||||
|
NCard => \\g => d.s ! ten ! NCard ! g ++ "na"++ e.s ! unit ! NCard ! g ;
|
||||||
|
NOrd => \\g =>Ordprefix g++ d.s ! ten ! NCard ! g ++ "na"++ e.s ! unit ! NCard ! g } ;
|
||||||
|
n = Pl} ;
|
||||||
|
lin pot1as2 n = n ;
|
||||||
|
lin pot2 d = {s = d.s ! hund} ** {n = Pl} ;
|
||||||
|
lin pot2plus d e = {s = table {
|
||||||
|
NCard => \\g => d.s ! hund ! NCard ! g ++ "na" ++ e.s !NCard ! g ;
|
||||||
|
NOrd => \\g =>Ordprefix g++ d.s ! hund ! NCard ! g ++ "na" ++ e.s ! NCard ! g } ;
|
||||||
|
n = Pl} ;
|
||||||
|
lin pot2as3 n = n ;
|
||||||
|
lin pot3 n = { s = table {
|
||||||
|
NCard => \\g => mkCard NCard "chilibu" ! g ++ n.s ! NCard ! g ;
|
||||||
|
NOrd => \\g =>Ordprefix g++ mkCard NCard "chilibu" ! g ++ n.s ! NCard ! g } ;
|
||||||
|
n = Pl} ;
|
||||||
|
lin pot3plus n m = { s = table {
|
||||||
|
NCard => \\g => "chilibu" ++ n.s ! NCard !g ++ m.s ! NCard ! g ;
|
||||||
|
NOrd => \\g =>Ordprefix g++ "chilibu" ++ n.s ! NCard !g ++ m.s ! NCard ! g} ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
-- numerals as sequences of digits0'
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Dig = TDigit ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
IDig d = d ;
|
||||||
|
|
||||||
|
IIDig d i = {
|
||||||
|
--s = \\o,g => d.s ! NCard ! g ++ i.s ! o ! g ;
|
||||||
|
s = table {NCard => \\g => d.s! NCard ! g ++ BIND ++ i.s ! NCard ! g ;
|
||||||
|
NOrd => \\g => d.s! NOrd! g ++ BIND ++ i.s !NCard! g } ;
|
||||||
|
n = Pl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
D_0 = mkDig "0" ;
|
||||||
|
D_1 = mk3Dig "1" "1" Sg ;
|
||||||
|
D_2 = mkDig "2" ;
|
||||||
|
D_3 = mkDig "3" ;
|
||||||
|
D_4 = mkDig "4" ;
|
||||||
|
D_5 = mkDig "5" ;
|
||||||
|
D_6 = mkDig "6" ;
|
||||||
|
D_7 = mkDig "7" ;
|
||||||
|
D_8 = mkDig "8" ;
|
||||||
|
D_9 = mkDig "9" ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
||||||
|
mkDig : Str -> TDigit = \c -> mk2Dig c (c ) ;
|
||||||
|
|
||||||
|
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||||
|
s = table {NCard => \\g => c ; NOrd => \\g =>Ordprefix g ++ o} ;
|
||||||
|
n = n} ;
|
||||||
|
|
||||||
|
TDigit = {
|
||||||
|
n : Number ;
|
||||||
|
s : CardOrd => Gender => Str
|
||||||
|
} ;
|
||||||
|
}
|
||||||
437
src/egekusii/ParadigmsGus.gf
Normal file
437
src/egekusii/ParadigmsGus.gf
Normal file
@@ -0,0 +1,437 @@
|
|||||||
|
--# -path=.:../abstract:../../prelude:../common
|
||||||
|
|
||||||
|
resource ParadigmsGus = open
|
||||||
|
(Predef=Predef),
|
||||||
|
Prelude,
|
||||||
|
MorphoGus,
|
||||||
|
ResGus,
|
||||||
|
CatGus
|
||||||
|
in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
Gender : Type ;
|
||||||
|
omo_aba : Gender ;--%
|
||||||
|
omo_eme : Gender ;
|
||||||
|
e_ci : Gender ;
|
||||||
|
eri_ama : Gender ;
|
||||||
|
ege_ebi : Gender ;
|
||||||
|
oro_ci : Gender ;
|
||||||
|
aka_ebi : Gender ; --%
|
||||||
|
abo_ama : Gender ;
|
||||||
|
oko_ama : Gender ;
|
||||||
|
aa : Gender ;
|
||||||
|
|
||||||
|
-- To abstract over number names, we define the following.
|
||||||
|
|
||||||
|
Number : Type ;
|
||||||
|
|
||||||
|
singular : Number ;
|
||||||
|
plural : Number ;
|
||||||
|
|
||||||
|
-- To abstract over case names, we define the following.
|
||||||
|
|
||||||
|
Case : Type ; --%
|
||||||
|
|
||||||
|
nominative : Case ; --%
|
||||||
|
locative : Case ; --%
|
||||||
|
|
||||||
|
npNumber : NP -> Number ; -- exctract the number of a noun phrase
|
||||||
|
|
||||||
|
|
||||||
|
--2 Nouns
|
||||||
|
|
||||||
|
-- Nouns are constructed by the function $mkN$, which takes a varying
|
||||||
|
-- number of arguments.
|
||||||
|
|
||||||
|
mkN : overload {
|
||||||
|
mkN : (flash : Str) -> Gender -> N ; --regular plural
|
||||||
|
mkN : (man,men : Str) ->Gender -> N ; -- irregular plural
|
||||||
|
mkN : Str -> N -> N -- e.g. baby + boom compound noun
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--3 Relational nouns
|
||||||
|
mkN2 : overload {
|
||||||
|
mkN2 : N -> Prep -> N2 ;
|
||||||
|
mkN2 : N -> Str -> N2 ;
|
||||||
|
mkN2 : N -> N2 ;
|
||||||
|
mkN2 : N -> (Gender => Number => Str)-> N2 ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper dfltGender : Gender = G1 ;
|
||||||
|
dfltNumber : Number = Sg ;
|
||||||
|
|
||||||
|
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||||
|
|
||||||
|
mkN3 : N -> Prep -> Prep -> N3 ; -- e.g. connection from x to y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--3 Proper names and noun phrases
|
||||||
|
--
|
||||||
|
-- Proper names, with a regular genitive, are formed from strings.
|
||||||
|
|
||||||
|
mkPN : overload {
|
||||||
|
|
||||||
|
mkPN : Str ->Gender -> PN ;
|
||||||
|
|
||||||
|
-- Sometimes a common noun can be reused as a proper name, e.g. "Bank"
|
||||||
|
|
||||||
|
mkPN : N -> PN --%
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--3 Determiners and quantifiers
|
||||||
|
|
||||||
|
mkOrd : Str -> Ord ; --%
|
||||||
|
|
||||||
|
--2 Adjectives
|
||||||
|
|
||||||
|
mkA : overload {
|
||||||
|
mkA : (happy : Str) -> A ;
|
||||||
|
--mkA : (happy : Str) -> A ;-- regular adj,
|
||||||
|
mkA : (fat,fatter : Str) -> A ; -- irreg.
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Two-place adjectives
|
||||||
|
|
||||||
|
mkA2 : overload {
|
||||||
|
mkA2 : A -> Prep -> A2 ; -- absent from
|
||||||
|
mkA2 : A -> Str -> A2 ; -- absent from --%
|
||||||
|
mkA2 : Str -> Prep -> A2 ; -- absent from --%
|
||||||
|
mkA2 : Str -> Str -> A2 -- absent from --%
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Adverbs
|
||||||
|
|
||||||
|
-- Adverbs are not inflected. Most lexical ones have position
|
||||||
|
-- after the verb. Some can be preverbal (e.g. "always").
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv ; -- e.g. today
|
||||||
|
mkAdV : Str -> AdV ; -- e.g. always
|
||||||
|
|
||||||
|
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||||
|
|
||||||
|
mkAdA : Str -> AdA ; -- e.g. quite
|
||||||
|
|
||||||
|
-- Adverbs modifying numerals
|
||||||
|
|
||||||
|
mkAdN : Str -> AdN ; -- e.g. approximately
|
||||||
|
|
||||||
|
--2 Prepositions
|
||||||
|
|
||||||
|
mkPrep : overload {
|
||||||
|
mkPrep : Str -> Prep ;
|
||||||
|
-- mkPrep : Str -> Str -> Prep ;
|
||||||
|
mkPrep : (Gender => Number => Str) -> Prep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
noPrep : Prep ; -- no preposition
|
||||||
|
|
||||||
|
-- (These two functions are synonyms.)
|
||||||
|
|
||||||
|
--2 Conjunctions
|
||||||
|
--
|
||||||
|
|
||||||
|
mkConj : overload {
|
||||||
|
mkConj : Str -> Conj ; -- and (plural agreement) --%
|
||||||
|
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument) --%
|
||||||
|
mkConj : Str -> Str -> Conj ; -- both ... and (plural) --%
|
||||||
|
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument) --%
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Verbs
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Verbs are constructed by the function $mkV$, which takes a varying
|
||||||
|
-- number of arguments.
|
||||||
|
|
||||||
|
mkV : overload {
|
||||||
|
mkV : (cry : Str) -> V ; -- regular, incl. cry-cries, kiss-kisses etc
|
||||||
|
mkV : Str -> V -> V ; -- fix compound, e.g. under+take
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--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$.-}
|
||||||
|
|
||||||
|
mkV2 : overload {
|
||||||
|
mkV2 : Str -> V2 ; -- kill --%
|
||||||
|
mkV2 : V -> V2 ; -- transitive, e.g. hit
|
||||||
|
mkV2 : V -> Prep -> V2 ; -- with preposiiton, e.g. believe in
|
||||||
|
mkV2 : V -> Str -> V2 ; -- believe in --%
|
||||||
|
mkV2 : Str -> Prep -> V2 ; -- believe in --%
|
||||||
|
mkV2 : Str -> Str -> V2 -- believe in --%
|
||||||
|
};
|
||||||
|
|
||||||
|
--3 Three-place verbs
|
||||||
|
--
|
||||||
|
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||||
|
-- the first one or both can be absent.
|
||||||
|
|
||||||
|
mkV3 : overload {
|
||||||
|
mkV3 : V -> V3 ; -- ditransitive, e.g. give,_,_
|
||||||
|
mkV3 : V -> Prep -> Prep -> V3 ; -- two prepositions, e.g. speak, with, about
|
||||||
|
mkV3 : V -> Prep -> V3 ; -- give,_,to --%
|
||||||
|
mkV3 : V -> Str -> V3 ; -- give,_,to --%
|
||||||
|
mkV3 : Str -> Str -> V3 ; -- give,_,to --%
|
||||||
|
mkV3 : Str -> V3 ; -- give,_,_ --%
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
--2 Other categories
|
||||||
|
|
||||||
|
mkSubj : Str -> Subj = \s -> lin Subj {s = s} ; --%
|
||||||
|
mkInterj : Str -> Interj
|
||||||
|
= \s -> lin Interj (ss s) ;
|
||||||
|
|
||||||
|
--.
|
||||||
|
--2 Definitions of paradigms
|
||||||
|
--
|
||||||
|
-- The definitions should not bother the user of the API. So they are
|
||||||
|
-- hidden from the document.
|
||||||
|
|
||||||
|
Gender = MorphoGus.Gender ;
|
||||||
|
Number = MorphoGus.Number ;
|
||||||
|
Case = MorphoGus.NPCase ;
|
||||||
|
omo_aba = G1 ;
|
||||||
|
omo_eme = G2 ;
|
||||||
|
e_ci = G3 ;
|
||||||
|
eri_ama = G4 ;
|
||||||
|
ege_ebi = G5 ;
|
||||||
|
oro_ci = G6 ;
|
||||||
|
aka_ebi = G7 ;
|
||||||
|
abo_ama = G8 ;
|
||||||
|
oko_ama = G9 ;
|
||||||
|
aa = G10 ;
|
||||||
|
singular = Sg ;
|
||||||
|
plural = Pl ;
|
||||||
|
nominative = npNom ;
|
||||||
|
locative = npLoc ;
|
||||||
|
|
||||||
|
npNumber np = (agrFeatures np.a).n ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
regN = MorphoGus.regN ;
|
||||||
|
iregN = MorphoGus.iregN ;
|
||||||
|
|
||||||
|
|
||||||
|
compoundN s n = lin N {s = \\x,y => s ++ n.s ! x ! y ; g=n.g} ;
|
||||||
|
|
||||||
|
mkPN = overload {
|
||||||
|
mkPN : Str -> Gender -> PN = regPN;
|
||||||
|
mkPN : N -> PN = nounPN
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkN2 = overload {
|
||||||
|
mkN2 : N -> Prep -> N2 = prepN2 ;
|
||||||
|
mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPrep s);
|
||||||
|
mkN2 : N -> N2 = \n -> prepN2 n (mkPrep mkPrepof ) ;
|
||||||
|
mkN2 : N -> (Number =>Gender => Str)-> N2= \n,s -> prepN2 n (mkPrep mkPrepof) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepN2 = \n,p -> lin N2 (n ** {c2 = p}) ;
|
||||||
|
regN2 = \n -> (prepN2 n (mkPrep mkPrepof )) ;
|
||||||
|
mkN3 = \n,p,q -> lin N3 (n ** {c2 = p ; c3 = q}) ;
|
||||||
|
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"} } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cnN2 : CN -> Prep -> N2 ;
|
||||||
|
cnN3 : CN -> Prep -> Prep -> N3 ;
|
||||||
|
|
||||||
|
-- This is obsolete.
|
||||||
|
cnN2 = \n,p -> lin N2 (n ** {c2 = p}) ;
|
||||||
|
cnN3 = \n,p,q -> lin N3 (n ** {c2 = p ; c3 = q}) ;
|
||||||
|
|
||||||
|
|
||||||
|
regPN n g = lin PN {s = table {Loc => "" ; _ => n} ; g = g} ;
|
||||||
|
|
||||||
|
|
||||||
|
nounPN n = lin PN {s = n.s ! singular ; g = n.g} ;
|
||||||
|
|
||||||
|
mkOrd : Str -> Ord = \x -> lin Ord { s =\\g => x};
|
||||||
|
|
||||||
|
|
||||||
|
prepA2 a p = lin A2 (a ** {c2 = p.s!Sg!G1}) ;
|
||||||
|
|
||||||
|
mkAdv x = lin Adv (ss x) ;
|
||||||
|
mkAdV x = lin AdV (ss x) ;
|
||||||
|
mkAdA x = lin AdA (ss x) ;
|
||||||
|
mkAdN x = lin AdN (ss x) ;
|
||||||
|
|
||||||
|
mkPrep = overload {
|
||||||
|
mkPrep : Str -> Prep = \str -> lin Prep {s = \\n,g => str } ;
|
||||||
|
mkPrep : (Number => Gender => Str) -> Prep = \t ->lin Prep {s = t} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
noPrep = mkPrep [] ;
|
||||||
|
{-} mkPrep : Str -> Str -> Prep = \p,q -> lin Prep
|
||||||
|
{s = table{Sg => table{G1 => p; _=> "" };
|
||||||
|
Pl => table{G1 => q; _=> ""}}} ;
|
||||||
|
prepV2 : V -> Prep -> V2 ;
|
||||||
|
prepV2 = \v,p -> lin V2 (v ** {c2 = p.s!Sg!G1}) ;
|
||||||
|
dirV2 : V -> V2 = \v -> prepV2 v noPrep ;
|
||||||
|
|
||||||
|
prepPrepV3 v p q = lin V3 (v ** {c2 = p ; c3 = q}) ;
|
||||||
|
dirV3 v p = prepPrepV3 v noPrep p ;
|
||||||
|
dirdirV3 v = dirV3 v noPrep ;
|
||||||
|
|
||||||
|
|
||||||
|
mkA2V : A -> Prep -> Prep -> A2V;
|
||||||
|
A2S, A2V : Type = A2 ;
|
||||||
|
mkA2V v p q = mkA2 v p ** {s3 = q.p2 ; c3 = q.p1 ; lock_A2V = <>} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkAV v = v ** { lock_AV = <>} ;
|
||||||
|
mkAV : A -> AV ;
|
||||||
|
AS, AV : Type = A ;
|
||||||
|
|
||||||
|
mkAS : A -> AS ;
|
||||||
|
mkAS v = v ** {lock_AS = <>} ;
|
||||||
|
|
||||||
|
mkVS : V -> VS ;
|
||||||
|
mkVS v = v ** { lock_VS = <>} ;
|
||||||
|
|
||||||
|
mkVQ : V -> VQ ;
|
||||||
|
mkVQ v = v ** {lock_VQ = <>} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- mkVV : V -> VV ;
|
||||||
|
-- mkVV v = v ** { lock_VV = <>} ;
|
||||||
|
|
||||||
|
mkVA : V -> VA ;
|
||||||
|
mkVA v = v ** {lock_VA = <>} ;
|
||||||
|
|
||||||
|
mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
|
mkV2V v p q = prepPrepV3 v p q ** {lock_V2V = <>} ;
|
||||||
|
|
||||||
|
mkV2S : V -> Prep -> V2S ;
|
||||||
|
mkV2S v p = prepV2 v p ** { lock_V2S = <>} ;
|
||||||
|
|
||||||
|
mkV2Q : V -> Prep -> V2Q ;
|
||||||
|
mkV2Q v p = prepV2 v p ** {lock_V2Q = <>} ;
|
||||||
|
|
||||||
|
mkV2A : V -> Prep -> Prep -> V2A ;
|
||||||
|
mkV2A v p q = prepPrepV3 v p q ** {lock_V2A = <>} ;
|
||||||
|
|
||||||
|
|
||||||
|
mkV0 : V -> V0 ;
|
||||||
|
V0 : Type ;
|
||||||
|
V0 : Type = V;
|
||||||
|
mkV0 v = v ** {lock_V0 = <>} ;
|
||||||
|
-}
|
||||||
|
-- pre-overload API and overload definitions
|
||||||
|
|
||||||
|
-- regN : Str ->Gender -> N ;
|
||||||
|
--iregN : (man,men : Str) ->Gender -> N ;
|
||||||
|
compoundN : Str -> N -> N ;
|
||||||
|
|
||||||
|
mkN = overload {
|
||||||
|
mkN : Str ->Gender -> N = \n, g -> lin N (regN n g );
|
||||||
|
mkN : (man,men : Str) ->Gender -> N = \s,p,g -> lin N ( iregN s p g) ;
|
||||||
|
} ;
|
||||||
|
--mkN : Str -> N -> N = compoundN taken from mkN can be added later if need be
|
||||||
|
-- Relational nouns ("daughter of x") need a preposition.
|
||||||
|
|
||||||
|
prepN2 : N -> Prep -> N2 ;
|
||||||
|
|
||||||
|
-- The most common preposition is "of", and the following is a
|
||||||
|
-- shortcut for regular relational nouns with "of".
|
||||||
|
|
||||||
|
regN2 : N -> N2 ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- iregA : (free,freely : Str) -> A ;
|
||||||
|
regA : Str -> A = \s -> lin A (MorphoGus.regA s) ;
|
||||||
|
-- pregA : Str -> A = \s -> lin A (MorphoGus.pregA s) ;
|
||||||
|
iregA : (fat,fatter : Str) -> A =\a,b -> lin A (MorphoGus.iregA a b);
|
||||||
|
mkA = overload {
|
||||||
|
mkA : Str -> A = \a -> lin A (regA a);-- |lin A (pregA a) ;
|
||||||
|
mkA : (fat,fatter : Str) -> A =\a,b -> lin A (iregA a b);
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepA2 : A -> Prep -> A2 ;
|
||||||
|
|
||||||
|
mkA2 = overload {
|
||||||
|
mkA2 : A -> Prep -> A2 = prepA2 ;
|
||||||
|
mkA2 : A -> Str -> A2 = \a,p -> prepA2 a (mkPrep p) ;
|
||||||
|
mkA2 : Str -> Prep -> A2 = \a,p -> prepA2 (regA a) p;
|
||||||
|
mkA2 : Str -> Str -> A2 = \a,p -> prepA2 (regA a) (mkPrep p);
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-}
|
||||||
|
regV=MorphoGus.regV ;
|
||||||
|
|
||||||
|
mkV = overload {
|
||||||
|
mkV : Str -> V =\v ->lin V(regV v) ;
|
||||||
|
mkV : Str -> V -> V = prefixV
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
prefixV : Str -> V -> V = \p,v -> lin V { s = \\b,vform => p + v.s! b ! vform } ;
|
||||||
|
mkV2 = overload {
|
||||||
|
mkV2 : V -> V2 = dirV2 ;
|
||||||
|
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
||||||
|
mkV2 : V -> Prep -> V2 = prepV2;
|
||||||
|
mkV2 : V -> Str -> V2 = \v,p -> prepV2 v (mkPrep p) ;
|
||||||
|
mkV2 : Str -> Prep -> V2 = \v,p -> prepV2 (regV v) p ;
|
||||||
|
mkV2 : Str -> Str -> V2 = \v,p -> prepV2 (regV v) (mkPrep p)
|
||||||
|
};
|
||||||
|
|
||||||
|
prepPrepV3 : V -> Prep -> Prep -> V3 ;
|
||||||
|
dirV3 : V -> Prep -> V3 ;
|
||||||
|
dirdirV3 : V -> V3 ;
|
||||||
|
|
||||||
|
mkV3 = overload {
|
||||||
|
mkV3 : V -> Prep -> Prep -> V3 = prepPrepV3 ;
|
||||||
|
mkV3 : V -> Prep -> V3 = dirV3 ;
|
||||||
|
mkV3 : V -> Str -> V3 = \v,s -> dirV3 v (mkPrep s);
|
||||||
|
mkV3 : Str -> Str -> V3 = \v,s -> dirV3 (regV v) (mkPrep s);
|
||||||
|
mkV3 : V -> V3 = dirdirV3 ;
|
||||||
|
mkV3 : Str -> V3 = \v -> dirdirV3 (regV v) ;
|
||||||
|
} ;
|
||||||
|
-}
|
||||||
|
mkConj = overload {
|
||||||
|
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
|
||||||
|
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
||||||
|
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
|
||||||
|
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
|
regPN : Str ->Gender -> PN ;
|
||||||
|
nounPN : N -> PN ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
3
src/egekusii/PhraseGus.gf
Normal file
3
src/egekusii/PhraseGus.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete PhraseGus of Phrase = CatGus ** PhraseBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
|
|
||||||
2
src/egekusii/QuestionGus.gf
Normal file
2
src/egekusii/QuestionGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete QuestionGus of Question = CatGus ** QuestionBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
2
src/egekusii/RelativeGus.gf
Normal file
2
src/egekusii/RelativeGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete RelativeGus of Relative = CatGus ** RelativeBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
7
src/egekusii/ResGus.gf
Normal file
7
src/egekusii/ResGus.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
|
|
||||||
|
|
||||||
|
instance ResGus of ResBantu = DiffGus, CommonBantu ** open Prelude in {
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
3
src/egekusii/SentenceGus.gf
Normal file
3
src/egekusii/SentenceGus.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete SentenceGus of Sentence = CatGus ** SentenceBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
|
|
||||||
236
src/egekusii/StructuralGus.gf
Normal file
236
src/egekusii/StructuralGus.gf
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
concrete StructuralGus of Structural = CatGus **
|
||||||
|
open MorphoGus, ParadigmsGus,
|
||||||
|
(C = ConstructX), Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
above_Prep = mkPrep "igoro" ;
|
||||||
|
after_Prep = mkPrep "itina" ;
|
||||||
|
all_Predet = {s = \\g => MorphoGus.Allpredetprefix g + "onsi"} ;
|
||||||
|
almost_AdA = mkAdA "ang'e " ;
|
||||||
|
almost_AdN = mkAdN "vakuvi " ;
|
||||||
|
although_Subj = ss "ona kau" ;
|
||||||
|
always_AdV = mkAdV "botambe " ;
|
||||||
|
and_Conj = mkConj "na" ;
|
||||||
|
because_Subj = ss "nundu" | ss "ni kwithiwa" ;
|
||||||
|
before_Prep = mkPrep "mbee" |mkPrep "vau mbeange" ;
|
||||||
|
behind_Prep = mkPrep "itina" ;
|
||||||
|
between_Prep = mkPrep "kati" ;
|
||||||
|
both7and_DConj = mkConj "eli" "na";
|
||||||
|
but_PConj = ss "korende" ;
|
||||||
|
by8agent_Prep = mkPrep "kwa" ;
|
||||||
|
by8means_Prep = mkPrep "kwa" ;
|
||||||
|
|
||||||
|
during_Prep = mkPrep "during" ;
|
||||||
|
either7or_DConj = mkConj "kana" singular ;
|
||||||
|
everybody_NP = regNP "kila umwe" G1 singular ;
|
||||||
|
every_Det = {s = table {Obj g => "" ;
|
||||||
|
Sub => "kila" };
|
||||||
|
n= Sg
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- mkDeterminerSpec singular "every" "everyone" False ;
|
||||||
|
everything_NP = regNP "ase oboamo" G1 singular ; --gender confirm
|
||||||
|
everywhere_Adv = mkAdv "ase oboamo" ;
|
||||||
|
few_Det = {s = table {Obj g => Few_prefix g + "nini" ;
|
||||||
|
Sub => [] };
|
||||||
|
n= Pl
|
||||||
|
} ;
|
||||||
|
-- mkDeterminer plural "few" ;
|
||||||
|
--- first_Ord = ss "first" ; DEPRECATED
|
||||||
|
for_Prep = mkPrep "aera" ;
|
||||||
|
from_Prep = mkPrep "kuma" ;
|
||||||
|
he_Pron = mkPron "ere" "je" G1 Sg P3 ;
|
||||||
|
here_Adv = mkAdv "vaa" ;
|
||||||
|
here7to_Adv = mkAdv ["kuvika vaa"] ;
|
||||||
|
here7from_Adv = mkAdv ["kuma vaa"] ;
|
||||||
|
how_IAdv = ss "ata" | ss "nzia myau" ;
|
||||||
|
how8much_IAdv = ss "mala meana" ;
|
||||||
|
--how8many_IDet = mkDeterminer plural ["mala meana"] ;
|
||||||
|
if_Subj = ss "enthwa" ;
|
||||||
|
in8front_Prep = mkPrep ["mbee wa"] ;
|
||||||
|
i_Pron =mkPron "inche" "ne" G1 Sg P1 ;
|
||||||
|
in_Prep = mkPrep "in" ;
|
||||||
|
it_Pron ={ s=\\c=>"yo"; poss=\\n,g=> ""; a=Ag G4 Sg P3};-- mkPron "yo" ""G4 Sg P3 ;
|
||||||
|
|
||||||
|
less_CAdv = C.mkCAdv "ninangi" "kwi" ;
|
||||||
|
much_Det, many_Det = { s = table {
|
||||||
|
Obj g => Many_prefix g + "nge" ;
|
||||||
|
Sub => []} ;
|
||||||
|
n= Pl
|
||||||
|
} ;
|
||||||
|
more_CAdv = C.mkCAdv "mbeange" "kwi" ; -- more should be a function beccause og Gender
|
||||||
|
-- most_Predet = {s = \\g => MorphoGus.Mostpredetprefix g + "ingi"} ;
|
||||||
|
|
||||||
|
{-} must_VV = {
|
||||||
|
s = table {
|
||||||
|
VVF VInf => ["have to"] ;
|
||||||
|
VVF VPres => "must" ;
|
||||||
|
VVF VPPart => ["had to"] ;
|
||||||
|
VVF VPres2Part => ["having to"] ;
|
||||||
|
VVF VPast => ["had to"] ; --# notpresent
|
||||||
|
VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||||
|
VVPresNeg => "mustn't"
|
||||||
|
} ;
|
||||||
|
p = [] ;
|
||||||
|
typ = VVAux
|
||||||
|
|
||||||
|
} ; -}
|
||||||
|
---b no_Phr = ss "no" ;
|
||||||
|
no_Utt = ss "yaya" ;
|
||||||
|
on_Prep = mkPrep "iulu wa" ;
|
||||||
|
---- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
|
||||||
|
only_Predet = {s = \\g => "tu" } ;
|
||||||
|
or_Conj = mkConj "kana" singular ;
|
||||||
|
otherwise_PConj = ss "otherwise" ;
|
||||||
|
--part_Prep = mkPrep "" ;
|
||||||
|
please_Voc = ss "ame" ;
|
||||||
|
part_Prep, possess_Prep = let
|
||||||
|
questo : ParadigmsGus.Number => MorphoGus.Gender => Str = table {
|
||||||
|
Sg => \\g=> case <g> of {
|
||||||
|
<G1>| <G2 > => "bwo" ;
|
||||||
|
<G3 > => "ya";
|
||||||
|
<G4 > => "ria";
|
||||||
|
<G5 > => "kia"; --
|
||||||
|
<G6 > => "rwa";
|
||||||
|
<G7> => "ka";
|
||||||
|
<G8> => "bwa";
|
||||||
|
<G9> => "kwa";
|
||||||
|
<G10> => "a"
|
||||||
|
};
|
||||||
|
|
||||||
|
Pl => \\g=> case <g> of{
|
||||||
|
<G1> => "ba" ;
|
||||||
|
<G2 > => "ya" ;
|
||||||
|
<G3 >|<G6 > => "cia";
|
||||||
|
<G4 > |<G8>|<G9>|<G10> => "a";
|
||||||
|
<G5 > => "bi"; --
|
||||||
|
<G7> => "bia"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in { s= questo} ;
|
||||||
|
quite_Adv = mkAdv "o muno" ;
|
||||||
|
she_Pron = mkPron "ere" "je" G1 Sg P3 ;
|
||||||
|
|
||||||
|
so_AdA = mkAdA "so" ;
|
||||||
|
somebody_NP = regNP " o mundu " G1 singular ;
|
||||||
|
someSg_Det = { s = table {Obj g => Some_prefix g ;
|
||||||
|
Sub => [] } ;
|
||||||
|
n= Sg
|
||||||
|
} ;
|
||||||
|
somePl_Det = {s = table {Obj g => Some_prefix g ;
|
||||||
|
Sub => [] };
|
||||||
|
n= Pl
|
||||||
|
} ;
|
||||||
|
something_NP = regNP "o kindu" G1 singular ; --confirm gender
|
||||||
|
somewhere_Adv = mkAdv "o vandu" ;
|
||||||
|
that_Quant = let
|
||||||
|
questo : ParadigmsGus.Number => MorphoGus.Gender => Str = table {
|
||||||
|
Sg => \\g=> case <g> of {
|
||||||
|
<G1> => "aria";
|
||||||
|
<G2> => "oria";
|
||||||
|
<G4> => "riira";
|
||||||
|
<G5> => "keria";
|
||||||
|
<G3> => "eria";
|
||||||
|
<G6> => "roria";
|
||||||
|
<G7> => "karia";
|
||||||
|
<G8> => "boria";
|
||||||
|
<G9> => "koria";
|
||||||
|
<G10> => "aria"
|
||||||
|
};
|
||||||
|
|
||||||
|
Pl => \\g=> case <g> of{
|
||||||
|
<G1> => "baria" |"abuo";
|
||||||
|
<G2> => "eria"|"eyio";
|
||||||
|
<G4> | <G8> => "aria"|"ayio"; --confirm gendder 8
|
||||||
|
<G5> => "baria" |"ebio";
|
||||||
|
<G3> | <G6> => "ciria"|"ecio";
|
||||||
|
<G7> => "biiraa" |"ebio";
|
||||||
|
<G9> => "aria" |"eyio";
|
||||||
|
<G10> => "ayio"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
s = questo ;
|
||||||
|
} ;
|
||||||
|
there_Adv = mkAdv "vau" ;
|
||||||
|
there7to_Adv = mkAdv "vau" ;
|
||||||
|
there7from_Adv = mkAdv ["kuma vau"] ;
|
||||||
|
therefore_PConj = ss "kwoou" ;
|
||||||
|
they_Pron =mkPron "barabwo" "bo" G1 Pl P3 ;
|
||||||
|
|
||||||
|
this_Quant = let
|
||||||
|
questo : ParadigmsGus.Number => MorphoGus.Gender => Str = table {
|
||||||
|
Sg => \\g=> case <g> of {
|
||||||
|
<G1> => "oyo";
|
||||||
|
<G2> => "oyo";
|
||||||
|
<G4> => "eri";
|
||||||
|
<G5> => "eke";
|
||||||
|
<G3> => "eye";
|
||||||
|
<G6> => "oro";
|
||||||
|
<G7> => "aka";
|
||||||
|
<G8> => "obo";
|
||||||
|
<G9> => "oko";
|
||||||
|
<G10> => "aa"
|
||||||
|
};
|
||||||
|
|
||||||
|
Pl => \\g=> case <g> of{
|
||||||
|
<G1> => "aba";
|
||||||
|
<G2> => "eye";
|
||||||
|
<G4> => "aya";
|
||||||
|
<G5> |<G7> => "ebi";
|
||||||
|
<G3> |<G6> => "eci";
|
||||||
|
<G8> |<G9> => " aya";
|
||||||
|
<G10> => "aa"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
in {
|
||||||
|
s = questo ;
|
||||||
|
} ;
|
||||||
|
through_Prep = mkPrep "kuvitila" ;
|
||||||
|
too_AdA = mkAdA "too" ;
|
||||||
|
to_Prep = mkPrep "kuvika" ;
|
||||||
|
under_Prep = mkPrep "itheo" ;
|
||||||
|
very_AdA = mkAdA "muno" ;
|
||||||
|
-- want_VV = mkVV (regV "enda") ;
|
||||||
|
we_Pron =mkPron "intwe" "ito" G1 Pl P1 ;
|
||||||
|
|
||||||
|
--whatPl_IP = mkIP "ata" "ata" plural ;
|
||||||
|
-- whatSg_IP = mkIP "ata" "ata" singular ;
|
||||||
|
when_IAdv = ss "when" ;
|
||||||
|
when_Subj = ss "when" ;
|
||||||
|
where_IAdv = ss "where" ;
|
||||||
|
which_IQuant = {s = \\_ => "which"} ;
|
||||||
|
---b whichPl_IDet = mkDeterminer plural ["which"] ;
|
||||||
|
---b whichSg_IDet = mkDeterminer singular ["which"] ;
|
||||||
|
-- whoPl_IP = mkIP "uu" "whom" "whose" plural ;
|
||||||
|
-- whoSg_IP = mkIP "who" "whom" "whose" singular ;
|
||||||
|
why_IAdv = ss "why" ;
|
||||||
|
without_Prep = mkPrep "nza" ;
|
||||||
|
with_Prep = mkPrep "vamwe na" ;
|
||||||
|
--yes_Phr = ss "ii" ;
|
||||||
|
yes_Utt = ss "eee" ;
|
||||||
|
youSg_Pron = mkPron "aye" "o" G1 Sg P2 ;
|
||||||
|
|
||||||
|
youPol_Pron,youPl_Pron = mkPron "inwe" "no" G1 Pl P3 ;
|
||||||
|
not_Predet = {s = \\g => "nongi"} ;
|
||||||
|
--no_Quant = {s = \\g,n => nonExist} ;
|
||||||
|
if_then_Conj = mkConj "ethiwa" "indi" singular ;
|
||||||
|
nobody_NP = regNP "obosa" G1 singular ;
|
||||||
|
nothing_NP = regNP "obosa" G1 singular ; --confirm gender
|
||||||
|
|
||||||
|
at_least_AdN = mkAdN "at least" ;
|
||||||
|
at_most_AdN = mkAdN "at most" ;
|
||||||
|
except_Prep = mkPrep "ate o" ;
|
||||||
|
as_CAdv = C.mkCAdv "nundu" "ta" ;
|
||||||
|
|
||||||
|
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
||||||
|
that_Subj = ss "ati" ;
|
||||||
|
lin language_title_Utt = ss "egekusii" ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
2
src/egekusii/VerbGus.gf
Normal file
2
src/egekusii/VerbGus.gf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
concrete VerbGus of Verb = CatGus ** VerbBantu with
|
||||||
|
(ResBantu = ResGus);
|
||||||
Reference in New Issue
Block a user