diff --git a/languages.csv b/languages.csv
index 6fddd409..fd209503 100644
--- a/languages.csv
+++ b/languages.csv
@@ -4,6 +4,7 @@ Amh,Amharic,amharic,,,,,n,n,,n
Ara,Arabic,arabic,,,,,,y,,y
Bul,Bulgarian,bulgarian,,,y,,,,,y
Cat,Catalan,catalan,Romance,,y,,,,y,y
+Cgg,Rukiga,rukiga,,,y,y,n,n,y,y
Chi,Chinese (simplified),chinese,,,,,,,,y
Cze,Czech,czech,,,,,,n,,y
Dan,Danish,danish,Scand,,y,,,,,y
diff --git a/src/prelude/Coordination.gf b/src/prelude/Coordination.gf
index 33d7b805..706bc547 100644
--- a/src/prelude/Coordination.gf
+++ b/src/prelude/Coordination.gf
@@ -3,25 +3,43 @@ resource Coordination = open Prelude in {
param
ListSize = TwoElem | ManyElem ;
-oper
+oper
+ -- Type of [X] for any X whose lincat is {s : Str}.
+ -- example : ListX = {s1 = "a , b" ; s2 = "c"}
ListX = {s1,s2 : Str} ;
- twoStr : (x,y : Str) -> ListX = \x,y ->
+ -- Helper funs for twoSS and conjSS
+ twoStr : (x,y : Str) -> ListX = \x,y ->
{s1 = x ; s2 = y} ;
- consStr : Str -> ListX -> Str -> ListX = \comma,xs,x ->
+ consStr : Str -> ListX -> Str -> ListX = \comma,xs,x ->
{s1 = xs.s1 ++ comma ++ xs.s2 ; s2 = x } ;
- twoSS : (_,_ : SS) -> ListX = \x,y ->
+ -- Create a ListX from two Xs. Example:
+ -- x = {s = "here"} ;
+ -- y = {s = "there"} ;
+ -- twoSS x y ==> {s1 = "here" ; s2 = "there"}
+ twoSS : (_,_ : SS) -> ListX = \x,y ->
twoStr x.s y.s ;
- consSS : Str -> ListX -> SS -> ListX = \comma,xs,x ->
+
+ -- Add new X to a ListX, along with a separator. Example:
+ -- comma = ","
+ -- xs = {s1 = "here" ; s2 = "there"}
+ -- x = {s = "everywhere"}
+ -- consSS comma xs x ==> {s1 = "here , there" ; s2 = "everywhere"}
+ consSS : Str -> ListX -> SS -> ListX = \comma,xs,x ->
consStr comma xs x.s ;
Conjunction : Type = SS ;
ConjunctionDistr : Type = {s1 : Str ; s2 : Str} ;
+ -- Form an X from Conjunction and ListX. Example:
+ -- or = {s = "and"}
+ -- xs = {s1 = "here , there" ; s2 = "everywhere"}
+ -- conjunctX or xs = {s = "here, there and everywhere"}
conjunctX : Conjunction -> ListX -> Str = \or,xs ->
xs.s1 ++ or.s ++ xs.s2 ;
-
+
+ -- Like conjunctX, but conjunction has two parts: "both here and there"
conjunctDistrX : ConjunctionDistr -> ListX -> Str = \or,xs ->
or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2 ;
@@ -33,7 +51,10 @@ oper
-- all this lifted to tables
- ListTable : PType -> Type = \P -> {s1,s2 : P => Str} ;
+ -- Type for a table with the given parameter P on the LHS.
+ -- For example, if the lincat for X is {s : Number => Str},
+ -- then the lincat for [X] should be ListTable Number, which expands to {s1, s2 : Number => Str}.
+ ListTable : PType -> Type = \P -> {s1,s2 : P => Str} ;
twoTable : (P : PType) -> (_,_ : {s : P => Str}) -> ListTable P = \_,x,y ->
{s1 = x.s ; s2 = y.s} ;
diff --git a/src/rukiga/CatCgg.gf b/src/rukiga/CatCgg.gf
index 4022333e..419b3dd7 100644
--- a/src/rukiga/CatCgg.gf
+++ b/src/rukiga/CatCgg.gf
@@ -6,7 +6,7 @@ concrete CatCgg of Cat = CommonX -[Adv,IAdv, AdA]**
lincat
- Imp = {s : Res. ImpPol=> Str} ;
+ Imp = {s : Res.ImpPol=> Str} ;
QS = {s : Str} ;
-- Note: SS is a shorthand for {s:Str}, defined in Prelude.gf
@@ -34,7 +34,7 @@ lincat
V,VS, VQ, VA = Res.Verb ; --change to {verb : Str ; comp = []} -- one-place verb e.g. "sleep"
V2,V2Q, V2S = Res.Verb2;
V2A,V3 = Res.Verb3; -- three-place verb e.g. "show"
-
+ V2V = Res.Verb ** {comp,c3 : Str ; typ : Res.VVType} ;
VP = Res.VerbPhrase ; -- verb phrase e.g. "is very warm"
N = Res.Noun ; -- common noun e.g. "house"
@@ -92,9 +92,9 @@ lincat
Digits = {s : Res.CardOrd => Res.Agreement=>Str ; n : Res.Number ; tail : Px.DTail} ;
Ord = {s :Res.Agreement=>Str; position:Res.Position} ;
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
-
+ A2 = Res.Adjective ** { c2 : Str ; isPre : Bool} ;
DAP = Res.Determiner ;
- N2 = Res.Noun ** {c2 : Res.Agreement =>Str}; -- relational noun e.g. "son"
+ N2 = Res.Noun ** {c2 : Res.Agreement =>Str}; -- relational noun e.g. "son"
Prep = Res.Preposition; -- preposition, or just case e.g. "in"
N3 = N2 ** {c3 : Res.Agreement =>Str};
VV = Res.Verb ** {inf:Str; whenUsed: Res.VVMood}; --inf is the other verb
@@ -106,6 +106,10 @@ linref
VP =\vp -> vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap;
VPSlash =\vpslash -> vpslash.s ++ BIND ++ vpslash.pres;
+lindef
+ A2 = \s -> {s = s; position = Res.Post; isProper = False;
+ isPrep = False; isNeg = False;c2 = ""; isPre = True};
+
--1 Cat: the Category System
diff --git a/src/rukiga/IdiomCgg.gf b/src/rukiga/IdiomCgg.gf
index ebc7b4d0..d2b32968 100644
--- a/src/rukiga/IdiomCgg.gf
+++ b/src/rukiga/IdiomCgg.gf
@@ -1,8 +1,11 @@
--# -path=.:../prelude:../abstract:../common
concrete IdiomCgg of Idiom = CatCgg **
- open Prelude, ResCgg in {
+ open Prelude,Predef, ResCgg in {
+
+lin
+ ImpPl1 vp = {s="tu" ++ BIND ++ vp.s ++ BIND ++ vp.pres ++ BIND ++ "6e"}; -- let's go
{-
--1 Idiom: Idiomatic Expressions
diff --git a/src/rukiga/LexiconCgg.gf b/src/rukiga/LexiconCgg.gf
index 1baa3e48..a7e03527 100644
--- a/src/rukiga/LexiconCgg.gf
+++ b/src/rukiga/LexiconCgg.gf
@@ -24,7 +24,7 @@ lin
computer_N = mkN "kanyabwêngye" ZERO_ZERO ; --kanyabwêngye, embiikabwengye, kompyuta
cow_N = mkN "ente" N_N ;
dog_N = mkN "embwa" N_N ;
- --person_N = mkN "omuntu" "abantu" MU_BA ;
+ person_N = mkN "omuntu" MU_BA ;
eye_N = mkN "eriisho" RI_MA;
fire_N = mkN "omuriro" MU_MI ;
fish_N = mkN "eky'ényanja" KI_BI ;
@@ -67,28 +67,27 @@ lin
paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places???
--Adjectives
- bad_A = mkAdjective "bi" Post False False; --False means the adjective is a stem and comes after the complete noun
- --beautiful_A = mkAdjective "rungi" False;
- big_A = mkAdjective "hango" Post False False;
- black_A = mkAdjective "kwirangura" Post False False;
- blue_A = mkAdjective "buuru" Post True True ;
- clean_A = mkAdjective "yonjo" Post False False; --: A ;
- cold_A = mkAdjective "kufuka" Post False False; --: A ;
- correct_A = mkAdjective "hikire" Post False False; --: A ;
- good_A =mkAdjective "rungi" Post False False; --: A ;
- heavy_A = mkAdjective "kuremeera" Post False False; --: A ; --notice ri as a verb is
- hot_A = mkAdjective "kwosya" Post False False; -- rikutagata -- problematic words like hot we need a new set of clitics
- new_A = mkAdjective "sya" Post False False; --: A ;
- old_A = mkAdjective "kúru" Post False False; --: A ;
- ready_A = mkAdjective "eteekateekire" Post False False; --: A ;
- red_A = mkAdjective "kutukura" Post False False; --: A ;
- small_A = mkAdjective "kye" Post False False;
- warm_A = mkAdjective "kutagata" Post False False;--: A ;
- white_A = mkAdjective "rikwera" Post False False;--: A ;
- yellow_A = mkAdjective "kinekye" Post True True;--: A ; or yero, or kyenju
- young_A = mkAdjective "to" Post False False;--: A ;
- green_A =mkAdjective "kijubwe" Post False True;
- thin_A = mkAdjective "kye" Post False False;
+ bad_A = mkAdjective "bi" Post False False False; --False means the adjective is a stem and comes after the complete noun
+ big_A = mkAdjective "hango" Post False False False;
+ black_A = mkAdjective "kwirangura" Post False False False;
+ blue_A = mkAdjective "buuru" Post True True False ;
+ clean_A = mkAdjective "yonjo" Post False False False ; --: A ;
+ cold_A = mkAdjective "kufuka" Post False False False ; --: A ;
+ correct_A = mkAdjective "hikire" Post False False False; --: A ;
+ good_A =mkAdjective "rungi" Post False False False; --: A ;
+ heavy_A = mkAdjective "kuremeera" Post False False False; --: A ; --notice ri as a verb is
+ hot_A = mkAdjective "kwosya" Post False False False; -- rikutagata -- problematic words like hot we need a new set of clitics
+ new_A = mkAdjective "sya" Post False False False; --: A ;
+ old_A = mkAdjective "kúru" Post False False False; --: A ;
+ ready_A = mkAdjective "eteekateekire" Post False False False; --: A ;
+ red_A = mkAdjective "kutukura" Post False False False; --: A ;
+ small_A = mkAdjective "kye" Post False False False;
+ warm_A = mkAdjective "kutagata" Post False False False;--: A ;
+ white_A = mkAdjective "rikwera" Post False False False;--: A ;
+ yellow_A = mkAdjective "kinekye" Post True True False;--: A ; or yero, or kyenju
+ young_A = mkAdjective "to" Post False False False;--: A ;
+ green_A =mkAdjective "kijubwe" Post False True False;
+ thin_A = mkAdjective "kye" Post False False False;
--ditransitive verbs
bite_V2 = mkV2 "rum";
@@ -149,7 +148,7 @@ lin
--beg_V2V : V2V ;
--Adverbs
now_Adv = mkAdv "hati" AgrNo;
- --far_Adv = mkAdv "hare";
+ far_Adv = mkAdv "hare" AgrNo;
today_Adv = mkAdv "erizooba" AgrNo;
@@ -158,298 +157,256 @@ lin
distance_N3 = mkN3 (mkN "orugyendo" ZERO_BU) (lin Prep (mkPrep "kurunga" "" False)) (lin Prep (mkPrep "mpáka" "" False)); --could orugyendo work in its place?
alas_Interj ={s="ryakareeba"; }; --: Interj ;
-
-
--- New Lexicon
switch8off_V2 = mkV2 "raza" "za" "riize";
television_N = mkN "TV" N_N;
doctor_N = mkN "omushaho" MU_BA;
- clever_A =mkAdjective "amagyezi" Post False True;
- laugh_V = mkV "sheka";
-
+ clever_A =mkAdjective "amagyezi" Post False True False;
+ laugh_V = mkV "shek";
+ beautiful_A = mkAdjective "rungi" Post False False False;
airplane_N = mkN "endegye" N_N;
-{--
- answer_V2S
- apartment_N
- art_N
- ashes_N
- ask_V2Q
- back_N
- bank_N
- bark_N
- beautiful_A
- beg_V2V
- belly_N
- blow_V
- bone_N
- boot_N
- boss_N
- breast_N
- breathe_V
- broad_A
- brother_N2
- brown_A
- burn_V
- butter_N
- camera_N
- cap_N
- carpet_N
- ceiling_N
- cheese_N
- church_N
- coat_N
- country_N
- cousin_N
- day_N
- dig_V
- dirty_A
- doctor_N
- door_N
- dry_A
- dull_A
- dust_N
- ear_N
- earth_N
- easy_A2V
- egg_N
- empty_A
- enemy_N
- factory_N
- fall_V
- far_Adv
- fat_N
- feather_N
- fight_V2
- fingernail_N
- float_V
- floor_N
- flow_V
- fly_V
- fog_N
- foot_N
- forest_N
- forget_V2
- freeze_V
- fridge_N
- fruit_N
- full_A
- fun_AV
- garden_N
- glove_N
- gold_N
- grass_N
- guts_N
- hair_N
- hand_N
- harbour_N
- hat_N
- hate_V2
- head_N
- hear_V2
- heart_N
- hill_N
- hit_V2
- hold_V2
- horn_N
- hunt_V2
- husband_N
- ice_N
- important_A
- industry_N
- iron_N
- king_N
- knee_N
- know_V2
- lake_N
- lamp_N
- leaf_N
- learn_V2
- leather_N
- leave_V2
- left_Ord
- leg_N
- lie_V
- like_V2
- listen_V2
- liver_N
- long_A
- lose_V2
- louse_N
- love_N
- married_A2
- moon_N
- mother_N2
- mountain_N
- mouth_N
- name_N
- narrow_A
- near_A
- neck_N
- newspaper_N
- night_N
- nose_N
- number_N
- oil_N
- open_V2
- paint_V2A
- paper_N
- peace_N
- pen_N
- person_N
- planet_N
- plastic_N
- play_V2
- policeman_N
- priest_N
- probable_AS
- pull_V2
- push_V2
- put_V2
- queen_N
- question_N
- radio_N
- rain_N
- rain_V0
- religion_N
- restaurant_N
- right_Ord
- road_N
- rock_N
- roof_N
- root_N
- rope_N
- rotten_A
- round_A
- rub_V2
- rubber_N
- salt_N
- sand_N
- school_N
- science_N
- scratch_V2
- seed_N
- seek_V2
- sew_V
- sharp_A
- shirt_N
- shoe_N
- shop_N
- short_A
- silver_N
- sing_V
- sister_N
- sit_V
- skin_N
- sky_N
- smell_V
- smoke_N
- smooth_A
- snake_N
- snow_N
- sock_N
- song_N
- speak_V2
- spit_V
- split_V2
- squeeze_V2
- stab_V2
- stand_V
- steel_N
- stick_N
- stone_N
- stop_V
- stove_N
- straight_A
- student_N
- stupid_A
- suck_V2
- sun_N
- swell_V
- switch8on_V2
- table_N
- tail_N
- teacher_N
- thick_A
- think_V
- throw_V2
- tie_V2
- tongue_N
- tooth_N
- turn_V
- ugly_A
- uncertain_A
- university_N
- village_N
- vomit_V
- war_N
- wash_V2
- watch_V2
- wet_A
- wide_A
- wife_N
- win_V2
- wind_N
- window_N
- wing_N
- wipe_V2
- wonder_VQ
- wood_N
- worm_N
- write_V2
-
---}
-year_N = mkN "omwaka" "emyaka" MU_MI;
+ year_N = mkN "omwaka" "emyaka" MU_MI;
+
+-- New Lexicon
+ {-
+ Perhaps create an adverb form whose
+ surface realisation comes from verb tense e.g nagyenzire implies I have alredy gone.
+ -}
+ already_Adv = mkAdv "" AgrNo; -- Already is realized as a verb form
+ --answer_V2S = mkV2S (mkV "garu" "kamu" "kiremu") noPrep;
+ apartment_N = mkN "apatimenti" "apatimenti" N_N;
+ art_N = mkN "aati" "aati" N_N;
+ ashes_N = mkN "eiju" "eiju" N_N;
+ --ask_V2Q = mkV2Q (mkV2 "bunza" "za" "rize") noPrep;
+ back_N = mkN "omugongo" MU_MI;
+ bank_N = mkN "banka" "banka" N_N;
+ bark_N = mkN "ask for the Rukiga equivalent of bark" N_N; --TODO find actual word
+ beg_V2V = mkV2V (mkV "shab" "a" "ire") noPrep toP ;
+ belly_N = mkN "eibondo" "amabondo" I_MA ;
+ blow_V = mkV "hag" "a" "ire" ;
+ bone_N = mkN "eigufa" "amagufa" I_MA ;
+ boot_N = mkN "buuntu" "buuntu" N_N ;
+ boss_N = mkN "mukama" "bakama" MU_BA ;
+ breast_N = mkN "eibere" "amabere" I_MA ;
+ breathe_V = mkV "is" "a" "ire";
+ broad_A = mkAdjective "TODO : Ask for the right word for broad" Post False False False;
+ --Note: younger brother. mukuru and others
+ --brother_N2 = mkN2 (mkN "murumuna" "barumuna" MU_BA) (mkPrep "" "" True) ;
+ newspaper_N = mkN "eihurire" I_MA;
+ night_N = mkN "ekiro" N_ZERO;
+ nose_N = mkN "enyindo" N_N;
+ --number_N = mkN "enamba" N_N -- TODO look out for the correct word
+ oil_N = mkN "amajuta" N_N;
+ open_V2 = mkV2 "yingura" "ura" "wire";
+ brown_A = mkAdjective "TODO: Get the right word for brown" Post False True False;
+ burn_V = mkV "batur" "a" "ire";
+ butter_N = mkN "amajuta g'ente" "amajuta g'ente" N_N;
+ camera_N = mkN "kamera" "kamera" ZERO_ZERO;
+ cap_N = mkN "TODO-enkofiira" "enkofiira" N_N;
+ carpet_N = mkN "kapeti" "kapeti" ZERO_ZERO;
+ ceiling_N = mkN "TO-DO:silingi" "TO-DO:silingi" N_N;
+ cheese_N = mkN "TO-DO" "TO-DO" N_N;
+ church_N = mkN "ekelezia" "amakelezia" N_N;
+ coat_N = mkN "kabuti" "kabuti" ZERO_ZERO;
+ country_N = mkN "eihanga" "amahanga" I_MA;
+ cousin_N = mkN "munyanyako" "banyanyako" MU_BA;
+ day_N = mkN "eizooba" "amazoba" I_MA;
+ dig_V = mkV "hiing" "a" "ire";
+ dirty_A = mkAdjective "rofa" Post False False False;
+ door_N = mkN "orwigi" "enyigi" RU_N;
+ dry_A = mkAdjective "yoma" Post False False False;
+ dull_A = mkAdjective "TODO: find out word for dull" Post False False False;
+ dust_N = mkN "omucuucu" "omucuucu" ZERO_ZERO;
+ ear_N = mkN "okutu" "amatu" KU_MA;
+ earth_N = mkN "ensi" "ensi" N_N;
+ easy_A2V = mkA2V "yaguhi" Post False False False;
+ egg_N = mkN "eihuri" "amahuri" I_MA;
+ empty_A = mkAdjective "rimu busha" Post False True False;
+ enemy_N = mkN "TODO : cofirm omurabe" "TODO : cofirm abarabe" MU_BA;
+ factory_N = mkN "TODO : cofirm fakatore" "TODO : cofirm fakatore" N_N;
+ fall_V = mkV "gw" "a" "ire";
+ fat_N = mkN "ebishaju" "ebishaju" ZERO_ZERO;
+ feather_N = mkN "ekyoya" "ebyoya" KI_BI;
+ fight_V2 = mkV2 "rwan" "a" "ire";
+ fingernail_N = mkN "ekyara ky'engaro" "ebyara by'engaro" KI_BI;
+ --float_V
+ --floor_N
+ flow_V = mkV "TODO: confirm himintuk" "a" "ire";
+ fly_V = mkV "guruk" "a" "ire";
+ fog_N = mkN "TODO word for fog" "TODO word for fog" N_N;
+ foot_N = mkN "ekigyere" "ebigyere" KI_BI;
+ forest_N = mkN "eihamba" "amahamba" I_MA;
+ forget_V2 = mkV2 "yebw" "a" "ire";
+ freeze_V = mkV "kwat" "a" "sire";
+ fridge_N = mkN "firigi" "firigi" ZERO_ZERO;
+ fruit_N = mkN "ekijuma" "ebijuma" KI_BI;
+ full_A = mkAdjective "injwire" Post False True False;
+ --fun_AV = mkAdjective
+ garden_N = mkN "omusiri" "emisiri" MU_MI;
+ glove_N = mkN "gilavu" "gilavu" ZERO_ZERO;
+ gold_N = mkN "TODO:feza" "TODO:feza" ZERO_ZERO;
+ grass_N = mkN "akanyaasi" "obunyaasi" KA_BU;
+ guts_N = mkN "orubondo" "amabondo" RU_MA;
+ hair_N = mkN "eishokye" "eishokye" N_N;
+ hand_N = mkN "omukono" "emikono" MU_MI;
+ -- harbour_N
+ hate_V2 = mkV2 "kwag" "a" "ire";
+ head_N = mkN "omutwe" MU_MI;
+ hear_V2 = mkV2 "hurir" "a" "e";
+ heart_N = mkN "omutima" "emitima" MU_MI;
+ hill_N = mkN "orushozi" "enshozi" N_N;
+ hit_V2 = mkV2 "kangaa" "ta" "sire";
+ hold_V2 = mkV2 "kwa" "ta" "sire";
+ horn_N = mkN "eihembe" "amahembe" I_MA;
+ hunt_V2 = mkV2 "hiig" "a" "ire";
+ husband_N = mkN "iba" "biba" ZERO_ZERO;
+ -- ice_N
+ important_A = mkAdjective "omugasho" Post False True False;
+ --industry_N =
+ iron_N = mkN "ekyoma ebirikurunga omu butare" "ebyoma ebirikurunga omu butare" ZERO_ZERO;
+ king_N = mkN "omugabe" MU_BA;
+ knee_N = mkN "okuju" "amaju" KU_MA;
+ know_V2 = mkV2 "many" "a" "ire";
+ lake_N = mkN "enyanja" "enyanja" N_N;
+ lamp_N = mkN "entara" "entara" N_N;
+ leaf_N = mkN "ibabi" "amababi" I_MA;
+ learn_V2 = mkV2 "yeg" "a" "ire";
+ leather_N = mkN "oruhu" "empu" RU_N; --I think plural should be oruhu again
+ leave_V2 = mkV2 "rug" "a" "ire";
+ left_Ord = mkOrd "bumosho";
+ leg_N = mkN "okuguru" "amaguru" KU_MA;
+ lie_V = mkV "beih" "a" "ire";
+ like_V2 = mkV2 "kun" "da" "zire";
+ listen_V2 = mkV2 "huri" "iriza" "riize";
+ liver_N = mkN "ekine" "ebine" KI_BI;
+ long_A = mkAdjective "raingwa" Post False False False;
+ --lose_V2 = mkV2 ""
+ louse_N = mkN "omura" "emira" MU_MI;
+ love_N = mkN "rukundo" "rukundo" ZERO_ZERO;
+ -- married_A2
+ moon_N = mkN "okwezi" "emwezi" KU_MA;
+ --mother_N2 = mkN2 (mkN "mama" ZERO_BAA) (lin Prep (mkPrep [] [] True)) ;
+ --mountain_N = mkN
+ mouth_N = mkN "omunwa" "eminwa" MU_MI;
+ name_N = mkN "eiziina" "amaziina" I_MA;
+ narrow_A = mkAdjective "kye" Post False False False;
+ near_A = mkAdjective "hihi" Pre False True False; -- the preposition is "na"
+ neck_N = mkN "ebisya" "ebisya" ZERO_ZERO;
+ -- paint_V2A
+ paper_N = mkN "orupapura" "empapura" RU_N;
+ peace_N = mkN "obusingye" "obusingye" ZERO_BU;
+ pen_N = mkN "akacumu" "obucumu" KA_BU;
+ planet_N = mkN "ensi" "ensi" N_N;
+ plastic_N = mkN "pulasitika" "pulasitika" ZERO_ZERO;
+ play_V2 = mkV2 "zaan" "a" "ire";
+ policeman_N = mkN "omupolisi" "abapolisi" MU_BA;
+ priest_N = mkN "omuhongyerezi" "abahongyerezi" MU_BA;
+ -- probable_AS
+ pull_V2 = mkV2 "kuru" "ra" "ire";
+ push_V2 = mkV2 "sindik" "a" "ire";
+ put_V2 = mkV2 "t" "a" "ire";
+ queen_N = mkN "Kwini" "baakwini" ZERO_BAA;
+ question_N = mkN "ekibuzo" "ebibuzo" KI_BI;
+ radio_N = mkN "radiyo" "radiyo" ZERO_ZERO;
+ rain_N = mkN "enjura" "enjura" ZERO_N;
+ -- rain_V0
+ religion_N = mkN "endiini" "endiini" N_N;
+ restaurant_N = mkN "hooteeri" "hooteeri" ZERO_ZERO;
+ right_Ord = mkOrd "buryo";
+ road_N = mkN "orugundo" "engundo" RU_N;
+ -- rock_N
+ --roof_N = mkN ""
+ root_N = mkN "omuzi" "emizi" MU_MI;
+ rope_N = mkN "omuguha" "emiguha" MU_MI;
+ rotten_A = mkAdjective "njuzire" Post False False False;
+ -- round_A
+ rub_V2 = mkV2 "harabur" "a" "ire";
+ -- rubber_N
+ salt_N = mkN "omwonyo" "emyonyo" MU_MI;
+ sand_N = mkN "omushenyi" MU_MI;
+ school_N = mkN "eishomero" I_MA;
+ science_N = mkN "sayansi" "sayansi" ZERO_ZERO;
+ scratch_V2 = mkV2 "ha" "ra" "ire";
+ seed_N = mkN "ensingo" "ensigo" N_N;
+ seek_V2 = mkV2 "kyenuuz" "a" "ire";
+ sew_V = mkV "ruk" "a" "ire";
+ sharp_A = mkAdjective "shazire" Post False False False;
+ shirt_N = mkN "esaati" "esaati" ZERO_ZERO; --TODO: confirm this entry
+ shoe_N = mkN "enkaito" "enkaito" N_N; --TODO : confirm the existence of this entry
+ shop_N = mkN "eduuka" "eduuka" ZERO_ZERO;
+ short_A = mkAdjective "gufu" Post False False False;
+ --silver_N
+ sing_V = mkV "yeshogor" "ora" "wire"; --TODO : confirm this word and the conjugation
+ sister_N = mkN "munyanyazi" "banyanyanzi" MU_BA;
+ sit_V = mkV "shutam" "a" "ire";
+ --skin_N = mkN "omubiri" "emibiri" MU_MI; This is wrong
+ sky_N = mkN "eiguru" "eiguru" ZERO_ZERO;
+ smell_V = mkV "kag" "a" "ire";
+ smoke_N = mkN "omwika" "emyiika" MU_MI;
+ --smooth_A
+ snake_N = mkN "enjoka" "enjoka" N_N;
+ -- snow_N
+ sock_N = mkN "sitokisi" "sitokisi" ZERO_ZERO;
+ song_N = mkN "ekyeshongoro" "ebyeshongoro" KI_BI;
+ speak_V2 = mkV2 "gamba";
+ spit_V = mkV "cwer" "a" "ire";
+ split_V2 = mkV2 "gangabura";
+ squeeze_V2 =mkV2 "imat" "a" "si";
+ stab_V2 = mkV2 "cumi" "ta" "sire"; --edit for Runyankore
+ stand_V = mkV "yemerera" "ra" "ire";
+ -- steel_N
+ stick_N = mkN "omunyafu" "eminyafu" MU_MI;
+ stone_N = mkN "eibare" "amabara" I_MA;
+ stop_V = mkV "komya" "ya" "ize";
+ stove_N = mkN "sitoovu" "sitoovu" ZERO_ZERO;
+ straight_A = mkAdjective "gorwire" Post False False False;
+ student_N = mkN "omwana w'eishomero" "abaana b'eishomero" MU_BA;
+ stupid_A = mkAdjective "himbagire" Post False False False;
+ suck_V2 = mkV2 "komaguza" "za" "ize";
+ sun_N = mkN "omushana" "omushana" MU_ZERO;
+ swell_V = mkV "bimba";
+ switch8on_V2 = mkV2 "ya" "sya" "kise";
+ table_N = mkN "emeeza" "emeeza" N_N;
+ tail_N = mkN "omukira" "emikira" MU_MI;
+ teacher_N = mkN "omushomesa" "abashomesa" MU_BA;
+ -- thick_A
+ --think_V = mkV
+ throw_V2 = mkV2 "naga";
+ tie_V2 = mkV2 "siba";
+ tongue_N = mkN "orurimi" RU_N;
+ tooth_N = mkN "erino" "amino" RI_MA;
+ turn_V = mkV "hinduka";
+ ugly_A = mkAdjective "bi" Post False False False; --I think I should add another boolean for copulative version
+ uncertain_A = mkAdjective "manyirwe" Post False False True; -- we need to investigate the place of negative adjectives i.e those that come from positive words
+ university_N = mkN "yunivasite" "yunivasite" ZERO_ZERO;
+ village_N = mkN "ekyalo" "ebyalo" KI_BI;
+ vomit_V = mkV "tanaka";
+ war_N = mkN "orutaro" "entaro" RU_N;
+ wash_V2 = mkV2 "yozya" "zya" "yogize";
+ watch_V2 = mkV2 "reeba";
+ wet_A = mkAdjective "jubire" Post False False False;
+ wide_A = mkAdjective "hango" Post False False False;
+ wife_N = mkN "omukyara" "abakyara" MU_BA;
+ win_V2 = mkV2 "singa";
+ wind_N = mkN "omuyaga" "emiyaga" MU_MI;
+ window_N = mkN "eidirisa" "eidirisa" N_N;
+ wing_N = mkN "eipapa" "amapapa" I_MA;
+ wipe_V2 = mkV2 "sim" "ura" "wire";
+ --wonder_VQ = mkV2Q (mkV2 "tanga" "ara" "ire") noPrep;
+ wood_N = mkN "ekiti" "ebiti" KI_BI;
+ --worm_N
+ write_V2 = mkV2 "handika";
+
+
+
-- End of New Lexicon
oper
- aboutP = mkPrep "about" ;
- atP = mkPrep "at" ;
- forP = mkPrep "for" ;
+ aboutP = mkPrep "TODO : find rukiga equivalent of about" "" False ;
+ atP = mkPrep "TODO : find rukiga equivalent of at" "" False ;
+ forP = mkPrep "TODO : find rukiga equivalent of for" "" False;
fromP = mkPrep "kurunga" "" False;
inP = mkPrep "omu" "omuri" False;
onP = mkPrep "aha" "ahari" False;
- toP = mkPrep "aha" [] False;
-
-
-
-
- {-
- --Old LexiconCgg.gf
- burn_V = mkV "sya" ;
- die_V = mkV "fa" ;
- fly_V = mkV "guruka" ;
- run_V = mkV "iruka" ;
- sleep_V = mkV "byama" ;
- walk_V = mkV "tabula" ;
-
- bird_N = mkN "ekinyonyi" KI_BI ;
- boat_N = mkN "eryato" RI_MA ;
- book_N = mkN "ekitabo" KI_BI ;
- boy_N = mkN "omwojo" "abojo" MU_BA ;
- car_N = mkN "emootoka" N_N ;
- chair_N = mkN "entebbe" N_N;
- cloud_N = mkN "ekikyu" KI_BI ;
- person_N = mkN "omuntu" "abantu" MU_BA ;
- girl_N = mkN "omwishiki" MU_BA ;
- shoe_N = mkN "ekaito" N_N ;
- table_N = mkN "emeza" N_N ;
- bad_A = mkAdjective "bi" False; --False means the adjective is a stem and comes after the complet noun
- beautiful_A = mkAdjective "rungi" False;
- far_Adv = mkAdv "hare";
- now_Adv = mkAdv "hati";
- today_Adv = mkAdv "erizooba";
- bite_V2 = mkV2 "ruma";
- break_V2 = mkV2 "henda";
- buy_V2 = mkV2 "gura";
- close_V2 = mkV2 "kinga";
- count_V2 = mkV2 "bara";
- cut_V2 = mkV2 "shara";
- do_V2 = mkV2 "kora";
- drink_V2 = mkV2 "nywa";
- eat_V2 = mkV2 "rya";
- fear_V2 = mkV2 "tiina";
-
--------------------------Differences Rukiga only--------------------
-airplane_N : mkN "endegye" N_N;
--}
+ toP = mkPrep ("ku" ++ Predef.BIND) [] False;
+ --noPrep = mkPrep [] [] False;
}
diff --git a/src/rukiga/NounCgg.gf b/src/rukiga/NounCgg.gf
index 9d9eb41f..41aa22b8 100644
--- a/src/rukiga/NounCgg.gf
+++ b/src/rukiga/NounCgg.gf
@@ -39,7 +39,7 @@ lin
};
True => {
s = \\ num, ns => (cn.s ! num ! ns) ++
- mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.s ! AgP3 Sg KI_BI;
+ mkGenPrepNoIV (AgP3 num cn.gender) ++ ap.s ! AgP3 Sg KI_BI;
gender = cn.gender; nounCat = cn.nounCat
}
};
@@ -210,9 +210,9 @@ SentCN cn sc = {s = \\ n, ns => cn.s!n!ns ++ sc.s; gender = cn.gender; nounCat
-- (New 13/3/2013 AR; Structural.possess_Prep and part_Prep should be deprecated in favour of these.)
--PossNP : CN -> NP -> CN ; -- house of Paris, house of mine
- PossNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
+ PossNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIV np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
--PartNP : CN -> NP -> CN ; -- glass of wine
- PartNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIVClitic np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
+ PartNP cn np ={s =\\n,ns => cn.s! n ! ns ++ mkGenPrepNoIV np.agr ++ np.s ! Nom; gender = cn.gender; nounCat = cn.nounCat};
{-
--1 Noun: Nouns, noun phrases, and determiners
diff --git a/src/rukiga/NumeralCgg.gf b/src/rukiga/NumeralCgg.gf
index 87168fd8..1af17162 100644
--- a/src/rukiga/NumeralCgg.gf
+++ b/src/rukiga/NumeralCgg.gf
@@ -125,7 +125,7 @@ lin pot3plus n m = let
n : Number
} ;
- mkOrdinal : Str -> Agreement => Str =\c -> \\agr => mkGenPrepWithIVClitic ! agr ++ c;
+ mkOrdinal : Str -> Agreement => Str =\c -> \\agr => mkGenPrepWithIV ! agr ++ c;
{-
--1 Numerals
diff --git a/src/rukiga/ParadigmsCgg.gf b/src/rukiga/ParadigmsCgg.gf
index 3480876c..278b01ec 100644
--- a/src/rukiga/ParadigmsCgg.gf
+++ b/src/rukiga/ParadigmsCgg.gf
@@ -1,5 +1,21 @@
--# -path=.:../prelude:../abstract:../common
+--1 Rukiga Lexical Paradigms
+--
+-- David Bamutura 2017--2020
+-- based on the English Paradigms file.
+-- This is an API for the user of the resource grammar
+-- for adding lexical items. It gives functions for forming
+-- expressions of open categories: nouns, adjectives, verbs.
+--
+-- Closed categories (determiners, pronouns, conjunctions) are
+-- accessed through the resource syntax API, $Structural.gf$.
+--
+-- The structure of functions for each word class $C$ is the following:
+-- first we give a handful of patterns that aim to cover all
+-- regular cases. Then we give a worst-case function $mkC$, which serves as an
+-- escape to construct the most irregular words of type $C$.
+
resource ParadigmsCgg =
open (Predef=Predef), ResCgg, CatCgg, Prelude in {
@@ -27,12 +43,14 @@ oper
mkV : Str -> Verb
= \root -> lin V (smartVerb root); --{s =root; pres =[]; perf = []; morphs= mkVerbMorphs; isRegular = True}; --only those verbs whose conjugation involves change of last letter and are done in the same way in both runyankore and rukiga
mkV : Str -> Str ->Str -> Verb
- = \root, restPres, restPerf ->lin V (mkVerb root restPres restPerf); --{s =root; pres =restPres; perf = restPerf; morphs= mkVerbMorphs; isRegular = False};
+ = \root, restPres, restPerf ->lin V (mkVerb root restPres restPerf);
+ mkV : Str -> Str ->Str ->Str -> Bool -> Verb
+ = \root, restPres, restPerf, p, bool ->lin V (mkVerbV2X root restPres restPerf p bool);
};
mkV2 = overload {
- mkV2 : Str -> Verb2 = \root ->mkV root ** {comp =[]};
- mkV2 : Str -> Str ->Str -> Verb2 = \root, s1, s2 ->mkV root s1 s2 ** {comp =[]};
+ mkV2 : Str -> V2 = \root ->dirV2 (smartVerb root); --** {comp =[] ; isCompN2 = False};
+ mkV2 : Str -> Str ->Str -> V2 = \root, s1, s2 ->dirV2 (mkVerb root s1 s2); --** {comp =[] ; isCompN2 = False};
};
mkV3 = overload {
mkV3 : Str -> Verb3 = \root ->mkV2 root ** {comp2 =[]};
@@ -43,37 +61,38 @@ oper
--3 Relational nouns
- mkN2 : overload {
- mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
- mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
- mkN2 : N -> Str -> N2 ; -- access to --%
- mkN2 : N -> Prep -> N2 ; -- e.g. access to
- mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
- } ;
+ -- mkN2 : overload {
+ -- --mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
+ -- --mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
+ -- --mkN2 : N -> Str -> N2 ; -- access to --%
+ -- mkN2 : N -> Prep -> N2 ; -- e.g. access to
+ -- --mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
+ -- } ;
- --3 Relational nouns
-
- mkN2 : overload {
- mkN2 : Str -> N2; -- reg. noun, prep. "of" --%
- mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
- mkN2 : N -> Str -> N2 ; -- access to --%
- mkN2 : N -> Prep -> N2 ; -- e.g. access to
- mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
+ mkN2 = overload {
+ mkN2 : N -> Prep -> N2 = prepN2 ;
+ --mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPrep s);
+ --mkN2 : Str -> Str -> N2 = \n,s -> prepN2 (regN n) (mkPrep s);
+ --mkN2 : N -> N2 = \n -> prepN2 n (mkPrep "of") ;
+ --mkN2 : Str -> N2 = \s -> prepN2 (regN s) (mkPrep "of")
} ;
- mkN2 : N -> Prep -> N2 ;
- mkN2 : N -> Prep -> N2 = \n,p -> case p.isGenPrep of{
+ -- mkN2 : N -> Prep -> N2 = \n,p -> case p.isGenPrep of{
+ -- False => lin N2 (n ** {c2 =\\_=> p.s}) ;
+ -- True => lin N2 (n ** {c2 = mkGenPrepWithIV }) --avoiding lock_C fields
+ -- };
+ prepN2 : N -> Prep -> N2 = \n,p -> case p.isGenPrep of{
False => lin N2 (n ** {c2 =\\_=> p.s}) ;
- True => lin N2 (n ** {c2 = mkGenPrepWithIVClitic}) --avoiding lock_C fields
+ True => lin N2 (n ** {c2 = mkGenPrepWithIV }) --avoiding lock_C fields
};
-- 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
mkN3 = \n,p,q -> case
of{
=> lin N3 ( lin N2 (n ** {c2 =\\_=> p.s}) ** {c3 =\\_=> q.s}); --method of avoiding lock_C fields
- => n ** {c2 = mkGenPrepWithIVClitic ; c3 =\\_=> q.s; lock_N2 = <>;lock_N3 = <>} ;
- => n ** {c2 =\\_=> p.s ; c3 = mkGenPrepWithIVClitic; lock_N2 = <>;lock_N3 = <>} ;
- => n ** {c2 = mkGenPrepWithIVClitic; c3 = mkGenPrepWithIVClitic; lock_N2 = <>; lock_N3 = <>}
+ => n ** {c2 = mkGenPrepWithIV ; c3 =\\_=> q.s; lock_N2 = <>;lock_N3 = <>} ;
+ => n ** {c2 =\\_=> p.s ; c3 = mkGenPrepWithIV; lock_N2 = <>;lock_N3 = <>} ;
+ => n ** {c2 = mkGenPrepWithIV; c3 = mkGenPrepWithIV; lock_N2 = <>; lock_N3 = <>}
};
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
@@ -84,206 +103,160 @@ oper
mkVA : V -> VA ; -- e.g. become (AP)
mkVA v = lin VA v ;
- {-
- prepV2 v p = lin V2 {s = v.s ; p = v.p ; c2 = p.s ; isRefl = v.isRefl} ;
- dirV2 v = prepV2 v noPrep ;
-
- --2 Prepositions
---
--- A preposition as used for rection in the lexicon, as well as to
--- build $PP$s in the resource API, just requires a string.
- mkPrep : Str -> Prep ; -- e.g. "in front of"
- --mkPost : Str -> Prep ; -- e.g. "ago"
- noPrep : Prepostion; -- no preposition
- noPrep = mkPrep [] ;
- -}
- {-
- --V2V verbs
+ mkV2S : V -> Prep -> V2S ; -- e.g. tell (NP) (that S)
+ mkV2S v p = lin V2S (prepV2 v p) ;
+ --mkPrep : Str -> Str ->Bool -> Preposition ; -- e.g. "in front of"
+ mkPrep : Str -> Str ->Bool -> Prep;
+ mkPrep first other bool = lin Prep {
+ s = first ;
+ other = other;
+ isGenPrep = bool
+ };
+ prepV2 : V -> Prep -> V2 ;
+ prepV2 v p = lin V2 {s = v.s ;
+ pres = v.pres ;
+ perf = v.perf ;
+ isPresBlank = v.isPresBlank ;
+ isPerfBlank = v.isPerfBlank;
+ isRegular = v.isRegular;
+ p = v.p ;
+ isRefl = v.isRefl;
+ comp = p.s;
+ isCompN2 = p.isGenPrep}; --; isRefl = v.isRefl} ;
+ dirV2 : V -> V2 = \v -> prepV2 v noPrep ;
+ noPrep = mkPrep [] [] False;
+ --2 Prepositions
+ --
+ -- A preposition as used for rection in the lexicon, as well as to
+ -- build $PP$s in the resource API, just requires a string.
+
+ -- mkPrep : Str -> Str ->Bool -> Prep ; -- e.g. "in front of"
+ -- noPrep : Prep; -- no preposition
+ -- noPrep = mkPrep [] [] False;
+
+ --mkVQ : V -> VQ ; -- e.g. wonder (QS)
+ mkV2Q : V -> Prep -> V2Q ; -- e.g. ask (NP) (QS)
+ mkV2Q v p = lin V2Q (prepV2 v p) ;
+
+ --V2V verbs
mkV2V = overload {
- mkV2V : Str -> V2V = \s -> lin V2V (dirV2 (regV s) ** {c3 = [] ; typ = VVAux}) ;
+ -- mkV2V : Str -> V2V = \s -> lin V2V (dirV2 (mkV s) ** {c3 = [] ; typ = VVAux}) ;
mkV2V : V -> V2V = \v -> lin V2V (dirV2 v ** {c3 = [] ; typ = VVAux}) ;
mkV2V : V -> Prep -> Prep -> V2V = \v,p,t -> lin V2V (prepV2 v p ** {c3 = t.s ; typ = VVAux}) ;
- } ;
+ } ;
+ -- Verbs with a particle.
+-- The particle, such as in "switch on", is given as a string.
- mkV2V : overload {
- mkV2V : Str -> V2V ;
- mkV2V : V -> V2V ;
- mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (noPrep NP) (to VP)
- } ;
-
- -}
- --mkV = overload {
- --mkV : (cry : Str) -> V
- --= \cry -> lin V (mkVerb cry) ; -- what does it mean to create a lin on the fly
- --};
-
-
-{- Note: The following is copied from the file swahili/ParadigmsSwa.gf
-
---1 Swahili Lexical Paradigms
-
---2 Parameters
---
--- To abstract over gender names, we define the following identifiers.
-
-oper
- Animacy : Type ;
-
- animate : Animacy ;
- inanimate : Animacy ;
-
--- 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 ;
-
--- To abstract over nounclass names, we define the following.
+ partV : V -> Str -> V ; -- with particle, e.g. switch + on
+ partV v p = lin V {s = v.s ;
+ pres = v.pres;
+ perf = v.perf;
+ isPresBlank = v.isPresBlank;
+ isPerfBlank = v.isPerfBlank;
+ isRegular = v.isRegular;
+ p = p ;
+ isRefl = v.isRefl
+ } ;
+ partV2 : V2 -> Str -> V2 ; -- with particle, e.g. switch + on
+ partV2 v p = lin V2 {s = v.s ;
+ pres = v.pres;
+ perf = v.perf;
+ isPresBlank = v.isPresBlank;
+ isPerfBlank = v.isPerfBlank;
+ isRegular = v.isRegular;
+ p = p ;
+ isRefl = v.isRefl;
+ comp = []; isCompN2 = False} ;
- Gender : Type ;
+ -- mkVA : V -> VA ; -- e.g. become (AP)
+ -- mkV2A : overload {
+ -- mkV2A : V -> V2A ; -- e.g. paint (NP) (AP)
+ -- mkV2A : V -> Prep -> V2A ; -- backwards compatibility
+ -- mkV2A : V -> Prep -> Prep -> V2A ; -- e.g. strike (NP) as (AP)
+ -- } ;
+ -- mkVQ : V -> VQ ; -- e.g. wonder (QS)
+ -- mkV2Q : V -> Prep -> V2Q ; -- e.g. ask (NP) (QS)
- m_wa : Gender ;
- m_mi : Gender ;
- ji_ma : Gender ;
- e_ma : Gender ;
- ma_ma : Gender ;
- ki_vi : Gender ;
- e_e : Gender ;
- u_u : Gender ;
- u_ma : Gender ;
- u_e : Gender ;
+ -- mkAS : A -> AS ; --%
+ -- mkA2S : A -> Prep -> A2S ; --%
+ -- mkAV : A -> AV ; --%
+ -- mkA2V : A -> Prep -> A2V ; --%
-
+-- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
+-- $V0$ is just $V$; the second argument is treated as adverb.
---2 Nouns
+ V0 : Type ; --%
+ AS, A2S, AV, A2V : Type ; --%
--- Worst case: give all four forms and the semantic gender.
+--2 Other categories
- mkN : (mtu,watu : Str) -> Gender -> Animacy -> N ;
-
--- The regular function captures the variants for nouns depending on Gender and Number
-
- regN : Str -> Gender -> Animacy -> N ;
-
--- In practice the worst case is just: give singular and plural nominative.
-
-
- mk2N : (mtu , watu : Str) -> Gender -> Animacy -> N ;
- mk2N x y g anim = mkNounIrreg x y g anim ** {lock_N = <>};
-
- mkN2 : N -> Prep -> N2 ;
- mkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p.s ; lock_N2 = <>} ;
-
- mkPrep : Str -> Prep ;
--- mkPrep p = {s = p ; c = CPrep PNul ; isDir = False ; lock_Prep = <>} ;
- mkPrep p = {s = p ; lock_Prep = <>} ;
-
-
---3 Relational nouns
---
--- Relational nouns ("fille de x") need a case and a preposition.
-
--- All nouns created by the previous functions are marked as
--- $nonhuman$. If you want a $human$ noun, wrap it with the following
--- function:
-
--- genderN : Gender -> N -> N ;
-
--- For regular adjectives, the adverbial form is derived. This holds
--- even for cases with the variation "happy - happily".
-
- regA : Str -> A ;
-
--- If comparison is formed by "kuliko", as usual in Swahili,
--- the following pattern is used:
-
- compADeg : A -> A ;
+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.
---.
- Animacy = ResSwa.Animacy ;
- Number = ResSwa.Number ;
- Case = ResSwa.Case ;
- Gender = ResSwa.Gender ;
- animate = AN ;
- inanimate = IN ;
- singular = Sg ;
- plural = Pl ;
- nominative = Nom ;
- locative = Loc ;
- m_wa = g1_2 ;
- m_mi = g3_4 ;
- ji_ma = g5_6 ;
- e_ma = g5a_6 ;
- ma_ma = g6 ;
- ki_vi = g7_8 ;
- e_e = g9_10 ;
- u_u = g11 ;
- u_ma = g11_6 ;
- u_e = g11_10 ;
- VForm = ResSwa.VForm ;
--- regN x g anim = mkNomReg x g anim ** {lock_N = <>} ;
+-- Rearrange this document in future so that a paradigms file is
+-- as should be i.e with an abstract part and a a part with
+-- definitions
+ mkOrd : Str -> Ord = \s -> lin Ord { s = \\_=>s; position = Post};
+ V0 : Type = V ;
+ AS, A2S, AV : Type = A ;
+ A2V : Type = A2 ;
+ mkV0 : V -> V;
+ mkV0 v = v ;
+ mkA2 : Str -> Position -> Bool -> Bool ->Bool-> A2V = \a2, pos, isProper, isPrep,isNeg ->
+ lin A2V ((mkAdjective a2 pos isProper isPrep isNeg) ** {c2 = ""; isPre = True});
+ --mkA2V : A -> A2V;
+ --mkA2V a = lin A2V (a * {c2 = ""; isPre = True});
+ mkA2V : Str -> Position -> Bool -> Bool ->Bool-> A2 =\a2, pos, isProper, isPrep,isNeg -> lin A2 ((mkAdjective a2 pos isProper isPrep isNeg) ** {c2 = ""; isPre = True});
- regN = \x,g,anim ->
- mkNomReg x g anim ** {lock_N = <>} ;
+
+ -- Adverbs modifying numerals
--- mkN x y g anim = mkNounIrreg x y g anim ** {lock_N = <>} ;
- mkN = \x,y,g,anim ->
- mkNounIrreg x y g anim ** {lock_N = <>} ;
-
--- Adjectives
+ mkAdN : Str -> AdN ; -- e.g. approximately
+ mkCAdv : Str -> CAdv ;
+ mkAdN x = lin AdN (ss x) ;
+ mkCAdv x = lin CAdv (ss x ** {p = []}) ;
- regA a = compADeg {
- s = \\_ => (mkAdjective a).s ;
- lock_A = <>} ;
+ 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) --%
+ } ;
- compADeg a =
- {
- s = table {
- Posit => a.s ! Posit ;
- _ => \\f => a.s ! Posit ! f ++ "kuliko"
- } ;
- lock_A = <>} ;
-
--- Verbs
- regV : Str -> V ;
- regV = \enda -> mkV enda ** {s1 = [] ; lock_V = <>} ;
+ mkConj = overload {
+ mkConj : Str -> Conj = \y -> mk2Conj [] y Pl ; -- when you have simply and
+ mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
+ mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y Pl ; -- when you have both ... and ...
+ mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
+ } ;
-{--
- mkV2 = overload {
- mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
- mkV2 : V -> V2 = dirV2 ;
- mkV2 : V -> Prep -> V2 = mmkV2
- } ;
+ mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
+ lin Conj {s = \\_=>x; s2 = y; n = n};
- mmkV2 : V -> Prep -> V2 ;
- mmkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
- dirV2 : V -> V2 = \v -> mmkV2 v "na" ;
---}
+ --2 Adverbs
---2 Adverbs
+ -- Adverbs are not inflected. Most lexical ones have position
+ -- after the verb. Some can be preverbal (e.g. "always").
--- Adverbs are not inflected. Most lexical ones have position
--- after the verb.
+ mkAdv : Str -> AgrExist -> Adv ; -- e.g. today
+
+ --mkAdV : Str -> AdV ; -- e.g. always
- mkAdv : Str -> Adv ;
- mkAdv x = ss x ** {lock_Adv = <>} ;
+ -- Adverbs modifying adjectives and sentences can also be formed.
--}
+ mkAdA : Str -> Position -> AdA ; -- e.g. quite
+ --mkCAdv : Str -> Str -> Str -> CAdv ; -- more than/no more than
+ mkAdv x agrEx = lin Adv {s = x ; agr = agrEx } ;
+ mkAdA x pos = lin AdA {s = x ; position = pos } ; -- e.g. quite
}
diff --git a/src/rukiga/PhraseCgg.gf b/src/rukiga/PhraseCgg.gf
index 92b6e3fb..72f19571 100644
--- a/src/rukiga/PhraseCgg.gf
+++ b/src/rukiga/PhraseCgg.gf
@@ -9,7 +9,9 @@ lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
NoPConj = {s = ""} ;
+ PConjConj conj = {s = conj.s ! AConj Other} ;
NoVoc = {s = ""} ;
+ VocNP np = {s=np.s !Nom} ;
-- Utterances are formed from sentences, questions, and imperatives.
UttNP np = {s= np.s!Acc}; --: NP -> Utt ;
@@ -31,8 +33,14 @@ lin
--UttAdv : Adv -> Utt ; -- here
UttAdv adv = {s= adv.s};
- --can be improved upon
- UttVP vp = {s = vp.adv ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++vp.comp2 ++ vp.ap };
+ -- better but can be improved upon
+ UttVP vp = case of {
+ => {s = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres ++ vp.adV};
+ =>{s = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres ++ vp.adv};
+ <_, _,_,True,False> => {s = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres ++ vp.comp};
+ <_, _,_,True, True> => {s = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres ++ vp.comp ++ vp.comp2};
+ <_, _,_,_, _> => {s = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres}
+ };
UttAP ap = {s=ap.s!(AgP3 Sg KI_BI)};
diff --git a/src/rukiga/ResCgg.gf b/src/rukiga/ResCgg.gf
index 1c09e640..3766eca2 100644
--- a/src/rukiga/ResCgg.gf
+++ b/src/rukiga/ResCgg.gf
@@ -40,6 +40,8 @@ param
ImpPol = ImpPos | ImpNeg;
INumber = ISg | IPl | INeut;
+ -- copied from the English Resource Grammar
+ VVType = VVAux | VVInf | VVPresPart ; -- can do / try to do / start doing
{-
--there are several and i.e.
-- na (two nouns, 2 Noun Phrases, 2 Pronouns, 2 relative subject clauses, )
@@ -54,7 +56,7 @@ param
AgrExist = AgrNo | AgrYes Agreement;
--Position = PostDeterminer | PreDeterminer ;
Position = Post | Pre;
- Variants = V1|V2;
+ --Variants = V1|V2;
--Functional forms of the regular verb
Mood = Infinitive | Imperative | Subjunctive | Perfective;
VerbCat = Simple | Prepositional | Causative;
@@ -115,7 +117,22 @@ oper
isPerfBlank = False;
--morphs = mkVerbMorphs;
isRegular = False;
+ p = [];
+ isRefl = False
};
+ -- creates a verb of type that has particles (prepositions or
+ --adverbials. this is for phrasal verbs)
+ mkVerbV2X : Str ->Str ->Str ->Str -> Bool->Verb = \rad, end1,end2, p, bool ->{
+ s = rad;
+ pres = end1;
+ perf = end2;
+ isPresBlank = False;
+ isPerfBlank = False;
+ --morphs = mkVerbMorphs;
+ isRegular = False;
+ p = p;
+ isRefl = bool
+ };
--These are regular verbs with {a-ire} entry in the dictionary
smartVerb : Str ->Verb = \rad ->{
s = rad;
@@ -125,6 +142,8 @@ oper
isPresBlank = False;
isPerfBlank = False;
isRegular = True;
+ p = [];
+ isRefl = False
};
{- Smart paradigm
@@ -158,7 +177,7 @@ oper
< "e" + "ki" + stem, KI_BI > => mkNoun omuntu (combine_morphemes "ebi" stem) g ;
< "e" + "ki" + stem, KI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
- < "e" + "i" + stem, I_MA > => mkNoun omuntu (combine_morphemes "ama" "") g ;
+ < "e" + "i" + stem, I_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
< "e" + "i" + stem, I_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
< "e" + "ri" + stem, RI_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
< "e" + "ri" + stem, RI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
@@ -169,7 +188,7 @@ oper
--< _ ,ZERO_MA > => mkNoun omuntu ("ama" + stem) g (Predef.drop 1 omuntu);
--< _ ,> => mkNoun omuntu omuntu g (Predef.drop 1 omuntu);
<_ , ZERO_BAA> => mkNoun omuntu ("baa" + omuntu) g ;
- < _ ,_ > => mkNoun omuntu omuntu g-- improve as we go on.
+ < _ ,_ > => mkNoun omuntu omuntu g -- improve as we go on.
};
@@ -544,8 +563,8 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
_ => mkClitic "-" -- Hopefully exhausted all forms
};
- Adverb = {s :Str; agr : AgrExist} ;
- mkAdv: Str -> AgrExist -> Adverb =\str, agr ->{s=str; agr=agr};
+ Adverb : Type = {s :Str; agr : AgrExist} ;
+
--dealing with the adjective
{-
The Adjective can be before the noun for TRUE or
@@ -571,9 +590,14 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
--AdjectivalPhrase : Type {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;
AdjectivalPhrase : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
--Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
- Adjective : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool};
- mkAdjective: Str -> Position -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep ->
- { s = a ; position = pos ; isPre = False; isProper = isProper; isPrep = isPrep};
+ Adjective : Type = {s : Str ;
+ position : Position;
+ isProper : Bool;
+ isPrep: Bool;
+ isNeg : Bool -- this is for specifying that uncertain is the negative of certain
+ };
+ mkAdjective: Str -> Position -> Bool -> Bool ->Bool-> Adjective = \ a , pos, isProper, isPrep,isNeg ->
+ { s = a ; position = pos ; isPre = False; isProper = isProper; isPrep = isPrep; isNeg = isNeg};
{-
TO DO:
@@ -679,35 +703,35 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
-- TThis is for demonstrative pronouns which can also be use as Quantifiers
-- How can it be done without code repeation?
mkThis = table{
- AgMUBAP1 Sg => mkClitic "ogu";
- AgMUBAP1 Pl => mkClitic "aba" ;
- AgMUBAP2 Sg => mkClitic "ogu"; --probably an error check your grammar book
- AgMUBAP2 Pl => mkClitic "aba" ;
- AgP3 Sg MU_BA => mkClitic "ogu";
- AgP3 Pl MU_BA => mkClitic "aba" ;
- AgP3 Pl ZERO_BU => mkClitic "obu" ;
- AgP3 Sg BU_MA => mkClitic "obu" ;
- AgP3 Pl (KA_BU | RU_BU) => mkClitic "obu" ;
- AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "ebi" ;
- AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "aga";
- AgP3 Sg ZERO_MA => mkClitic "aga";
- AgP3 ( Pl) HA => mkClitic "aha" ; -- of place HA
- AgP3 ( Pl) MU => mkClitic "omu" ; -- of place MU
- AgP3 ( Pl) KU => mkClitic "oku" ; -- of place KU
- AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "eri" ;
- AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "aka" ;
- AgP3 Sg KI_BI => mkClitic "eki" ;
- AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "oku" ;
- AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "ogu" ;
- AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "oru" ;
- AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "otu" ;
- AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "egi" ;
- AgP3 Pl ZERO_MI =>mkClitic "egi" ;
- AgP3 Pl MU_MI => mkClitic "egi";
- AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "ezi" ;
- AgP3 Sg GU_GA => mkClitic "ogu" ;
- AgP3 Pl GU_GA => mkClitic "aga" ;
- _ => mkClitic "XXXThisThese" -- error checking for any case not catered for
+ AgMUBAP1 Sg => "ogu";
+ AgMUBAP1 Pl => "aba" ;
+ AgMUBAP2 Sg => "ogu"; --probably an error check your grammar book
+ AgMUBAP2 Pl => "aba" ;
+ AgP3 Sg MU_BA => "ogu";
+ AgP3 Pl MU_BA => "aba" ;
+ AgP3 Pl ZERO_BU => "obu" ;
+ AgP3 Sg BU_MA => "obu" ;
+ AgP3 Pl (KA_BU | RU_BU) => "obu" ;
+ AgP3 Pl (KI_BI | ZERO_BI) => "ebi" ;
+ AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "aga";
+ AgP3 Sg ZERO_MA => "aga";
+ AgP3 ( Pl) HA => "aha" ; -- of place HA
+ AgP3 ( Pl) MU => "omu" ; -- of place MU
+ AgP3 ( Pl) KU => "oku" ; -- of place KU
+ AgP3 Sg (I_ZERO | I_MA | RI_MA) => "eri" ;
+ AgP3 Sg (KA_ZERO | KA_BU) => "aka" ;
+ AgP3 Sg KI_BI => "eki" ;
+ AgP3 Sg (KU_ZERO | KU_MA) => "oku" ;
+ AgP3 Sg (MU_MI | MU_ZERO) => "ogu" ;
+ AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "oru" ;
+ AgP3 Pl (ZERO_TU | KA_TU) => "otu" ;
+ AgP3 Sg (ZERO_ZERO | N_N) => "egi" ;
+ AgP3 Pl ZERO_MI => "egi" ;
+ AgP3 Pl MU_MI => "egi";
+ AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "ezi" ;
+ AgP3 Sg GU_GA => "ogu" ;
+ AgP3 Pl GU_GA => "aga" ;
+ _ => "XXXThisThese" -- error checking for any case not catered for
};
@@ -915,69 +939,69 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
_ => mkClitic "XX" -- error checking for any case not catered for
};
- -- Genetive Preposition: simple "of" without Initila vowel
- mkGenPrepNoIVClitic : Agreement -> Str = \a -> case a of {
- AgMUBAP1 n => mkClitics "wa" "ba" n;
- --AgMUBAP1 Pl => "aba" ;
- AgMUBAP2 n => mkClitics "wa" "ba" n; --probably an error check your grammar book
- --AgMUBAP2 Pl => "aba" ;
- AgP3 n MU_BA => mkClitics "wa" "ba" n;
- --AgP3 Pl MU_BA => "aba" ;
- AgP3 Pl ZERO_BU => mkClitic "bwa" ;
- AgP3 Sg BU_MA => mkClitic "bwa" ;
- AgP3 Pl (KA_BU | RU_BU) => mkClitic "bwa" ;
- AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "bya" ;
- AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "ga";
- AgP3 (Sg | Pl) HA => mkClitic "ha" ; -- of place HA
- AgP3 (Sg | Pl) MU => mkClitic "mwa" ; -- of place MU
- AgP3 (Sg | Pl) KU => mkClitic "ya" ; -- of place KU
- AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "rya" ;
- AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "ka" ;
- AgP3 Sg KI_BI => mkClitic "kya" ;
- AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "kwa" ;
- AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "gwa" ;
- AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "rwa" ;
- AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "twa" ;
- AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "ya" ;
- AgP3 Pl ZERO_MI =>mkClitic "ya" ;
- AgP3 Pl MU_MI => mkClitic "emi";
- AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "za" ;
- AgP3 Sg GU_GA => mkClitic "gwa" ;
- AgP3 Pl GU_GA => mkClitic "ga" ;
- _ => mkClitic "Error mkGenPrepNoIVClitic" -- error checking for any case not catered for
+ -- Genetive Preposition: simple "of" without Initila vowel. It does not combine
+ mkGenPrepNoIV : Agreement -> Str = \a -> case a of {
+ AgMUBAP1 Sg => "wa";
+ AgMUBAP1 Pl => "ba" ;
+ AgMUBAP2 Sg => "wa" ; --probably an error check your grammar book
+ AgMUBAP2 Pl => "ba" ;
+ AgP3 Sg MU_BA => "wa" ;
+ AgP3 Pl MU_BA => "ba" ;
+ AgP3 Pl ZERO_BU => "bwa" ;
+ AgP3 Sg BU_MA => "bwa" ;
+ AgP3 Pl (KA_BU | RU_BU) => "bwa" ;
+ AgP3 Pl (KI_BI | ZERO_BI) => "bya" ;
+ AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "ga";
+ AgP3 (Sg | Pl) HA => "ha" ; -- of place HA
+ AgP3 (Sg | Pl) MU => "mwa" ; -- of place MU
+ AgP3 (Sg | Pl) KU => "ya" ; -- of place KU
+ AgP3 Sg (I_ZERO | I_MA | RI_MA) => "rya" ;
+ AgP3 Sg (KA_ZERO | KA_BU) => "ka" ;
+ AgP3 Sg KI_BI => "kya" ;
+ AgP3 Sg (KU_ZERO | KU_MA) => "kwa" ;
+ AgP3 Sg (MU_MI | MU_ZERO) => "gwa" ;
+ AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "rwa" ;
+ AgP3 Pl (ZERO_TU | KA_TU) => "twa" ;
+ AgP3 Sg (ZERO_ZERO | N_N) => "ya" ;
+ AgP3 Pl ZERO_MI => "ya" ;
+ AgP3 Pl MU_MI => "emi";
+ AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "za" ;
+ AgP3 Sg GU_GA => "gwa" ;
+ AgP3 Pl GU_GA => "ga" ;
+ _ => "Error mkGenPrepNoIV" -- error checking for any case not catered for
};
-- Genetive Preposition: simple "of" with Initil vowel
- mkGenPrepWithIVClitic : Agreement => Str = table {
- AgMUBAP1 n => mkClitics "owa" "aba" n;
- --AgMUBAP1 Pl => "aba" ;
- AgMUBAP2 n => mkClitics "owa" "aba" n; --probably an error check your grammar book
- --AgMUBAP2 Pl => "aba" ;
- AgP3 n MU_BA => mkClitics "owa" "aba" n;
- --AgP3 Pl MU_BA => "aba" ;
- AgP3 Pl ZERO_BU => mkClitic "obwa" ;
- AgP3 Sg BU_MA => mkClitic "obwa" ;
- AgP3 Pl (KA_BU | RU_BU) => mkClitic "obwa" ;
- AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "ebya" ;
- AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "aga";
- AgP3 (Sg | Pl) HA => mkClitic "aha" ; -- of place HA
- AgP3 (Sg | Pl) MU => mkClitic "amwa" ; -- of place MU
- AgP3 (Sg | Pl) KU => mkClitic "aya" ; -- of place KU
- AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "arya" ;
- AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "aka" ;
- AgP3 Sg KI_BI => mkClitic "ekya" ;
- AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "okwa" ;
- AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "ogwa" ;
- AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "orwa" ;
- AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "otwa" ;
- AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "eya" ;
- AgP3 Pl ZERO_MI =>mkClitic "eya" ;
- AgP3 Pl MU_MI => mkClitic "emi";
- AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "eza" ;
- AgP3 Sg GU_GA => mkClitic "ogwa" ;
- AgP3 Pl GU_GA => mkClitic "aga" ;
- _ => mkClitic "Error mkGenPrepWithIVClitic" -- error checking for any case not catered for
+ mkGenPrepWithIV : Agreement => Str = table {
+ AgMUBAP1 Sg => "owa" ;
+ AgMUBAP1 Pl => "aba" ;
+ AgMUBAP2 Sg => "owa" ; --probably an error check your grammar book
+ AgMUBAP2 Pl => "aba" ;
+ AgP3 Sg MU_BA => "owa" ;
+ AgP3 Pl MU_BA => "aba" ;
+ AgP3 Pl ZERO_BU => "obwa" ;
+ AgP3 Sg BU_MA => "obwa" ;
+ AgP3 Pl (KA_BU | RU_BU) => "obwa" ;
+ AgP3 Pl (KI_BI | ZERO_BI) => "ebya" ;
+ AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => "aga";
+ AgP3 (Sg | Pl) HA => "aha" ; -- of place HA
+ AgP3 (Sg | Pl) MU => "amwa" ; -- of place MU
+ AgP3 (Sg | Pl) KU => "aya" ; -- of place KU
+ AgP3 Sg (I_ZERO | I_MA | RI_MA) => "arya" ;
+ AgP3 Sg (KA_ZERO | KA_BU) => "aka" ;
+ AgP3 Sg KI_BI => "ekya" ;
+ AgP3 Sg (KU_ZERO | KU_MA) => "okwa" ;
+ AgP3 Sg (MU_MI | MU_ZERO) => "ogwa" ;
+ AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => "orwa" ;
+ AgP3 Pl (ZERO_TU | KA_TU) => "otwa" ;
+ AgP3 Sg (ZERO_ZERO | N_N) => "eya" ;
+ AgP3 Pl ZERO_MI => "eya" ;
+ AgP3 Pl MU_MI => "emi";
+ AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) => "eza" ;
+ AgP3 Sg GU_GA => "ogwa" ;
+ AgP3 Pl GU_GA => "aga" ;
+ _ => "Error in mkGenPrepWithIVClitic : no pattern matched" -- error checking for any case not catered for
};
@@ -1253,14 +1277,15 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
-- Structural
-- prepositions sometimes have two kinds, near or far i.e omu or omuri
- -- ho
- Preposition = {s,other : Str; isGenPrep : Bool};
- mkPrep : Str -> Str ->Bool -> Preposition = \ first, other, isGenPrep -> {
- s = first ;
- other = other;
- isGenPrep = isGenPrep
- };
+ -- We provide for two kinds: near and distal plus a status checker for
+ -- genitive prepositions
+
+ Preposition : Type = {s : Str; other : Str; isGenPrep : Bool};
+
NounPhrase : Type = {s :Case => Str; agr : Agreement};
+
+ --NounPhrase : Type = {s : Number=> NounState => Str; agr : Agreement};
+
{-
Operation to create Noun Phrases from a Determiner and Nouns.
In Runyankore and Rukiga, depending on the particular Determiner,
@@ -1308,7 +1333,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
--morphs: VFormMini => VerbMorphPos=> Str;
isPresBlank : Bool;
isPerfBlank : Bool;
- isRegular:Bool
+ isRegular: Bool;
+ p : Str; -- some verbs have particles such as prepositions and adverbial that give the verb a meaning different from what would be automatically deduced
+ isRefl : Bool
};
GVerb : Type = {
@@ -1327,7 +1354,7 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
Because of the fusion, I have deffered including this in
the compPrep. Actually, it is going to be empty in the next version
-}
- Verb2 : Type = Verb ** {comp:Str};
+ Verb2 : Type = Verb ** {comp: Str; isCompN2: Bool};
Verb3 : Type = Verb2 ** {comp2 : Str} ;
{-
Given a root, can you form the different verbforms?
@@ -1354,7 +1381,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
adv:Str;
containsAdv: Bool;
adV:Str;
- containsAdV:Bool
+ containsAdV:Bool;
+ containsComp : Bool;
+ containsComp2 : Bool
};
-- in VP formation, all verbs are lifted to GVerb, but morphology doesn't need to know this
verb2gverb : Verb ->Str -> GVerb = \v, ba -> {
@@ -1385,7 +1414,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
--morphs= mkVerbMorphs;
isPresBlank = True;
isPerfBlank = True;
- isRegular=False
+ isRegular=False;
+ p = [];
+ isRefl = False
};
mkBecome : Verb ={
s = "b" ;
@@ -1394,7 +1425,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
isPresBlank = False;
isPerfBlank = False;
--morphs= mkVerbMorphs;
- isRegular=False
+ isRegular=False;
+ p = [];
+ isRefl = False
};
@@ -1538,7 +1571,7 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
glue: Str -> Str ->Str =\ x, y -> x ++ BIND ++ y;
--Concatenates two strings for the genetive case
- glueGen: Agreement ->Str = \ a -> mkGenPrepNoIVClitic a ++ BIND ++ mkGenAdjSuffix a;
+ glueGen: Agreement ->Str = \ a -> mkGenPrepNoIV a ++ BIND ++ mkGenAdjSuffix a;
--Number determining element
Numer : Type = { s: Agreement => Str ; n : Number; numeralExists:Bool};
@@ -1558,7 +1591,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
adv:Str;
containsAdv:Bool;
adV:Str;
- containsAdV:Bool
+ containsAdV:Bool;
+ containsComp : Bool;
+ containsComp2 : Bool
}; --comp is empty
@@ -1589,10 +1624,11 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
param
CompSource = NounP | ADverb | AdjP | CommonNoun;
oper
- Comp : Type = {s:Str; source : CompSource };
+ Comp : Type = {s:Str; source : CompSource};
--Conjunctions
+ -- arguments to conjunctions determine which version is used
Conjunction : Type = {s : AgrConj =>Str ;s2 : Str ; n : Number} ;
-- For $Numeral$.
diff --git a/src/rukiga/SentenceCgg.gf b/src/rukiga/SentenceCgg.gf
index 3d6f5e5d..e63ab5bf 100644
--- a/src/rukiga/SentenceCgg.gf
+++ b/src/rukiga/SentenceCgg.gf
@@ -51,9 +51,9 @@ lin
};
{-Note: when I use pol.s instead of ti, the word alignment instead becomes worse-}
=> case cl.isPerfBlank of {
- True => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ Predef.BIND ++ "ra" ++
+ True => {s = subj ++ "ta" ++ Predef.BIND ++ clitic ++ Predef.BIND ++ "ra" ++
Predef.BIND ++ root ++ Predef.BIND ++ "ire" ++ compl};
- False => {s = subj ++ "ti" ++ Predef.BIND ++ clitic ++ "ra" ++ Predef.BIND ++
+ False => {s = subj ++ "ta" ++ Predef.BIND ++ clitic ++ "ra" ++ Predef.BIND ++
root ++ Predef.BIND ++ pastRestOfVerb ++ compl}
};
@@ -281,8 +281,8 @@ lin
- PredVP np vp = case of {
- => {
+ PredVP np vp = case of {
+ => {
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
subjAgr = np.agr;
pres = vp.pres;
@@ -293,16 +293,15 @@ lin
isPerfBlank = vp.isPerfBlank;
{-
inf = mkVerbInrf vp.root;
- pres = mkVerbPres vp.root;
- past = mkVerbPast vp.root;
- presPart = mkVerbPresPart vp.root;
- pastPart = mkVerbPastPart vp.root; -- subject
- -}
+ pres = mkVerbPres vp.root;
+ past = mkVerbPast vp.root;
+ presPart = mkVerbPresPart vp.root;
+ pastPart = mkVerbPastPart vp.root; -- subject
+ -}
--root = vp.root ;
compl = vp.adV
};
-
- <_, _> => {
+ => {
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
subjAgr = np.agr;
pres = vp.pres;
@@ -313,13 +312,71 @@ lin
isPerfBlank = vp.isPerfBlank;
{-
inf = mkVerbInrf vp.root;
- pres = mkVerbPres vp.root;
- past = mkVerbPast vp.root;
- presPart = mkVerbPresPart vp.root;
- pastPart = mkVerbPastPart vp.root; -- subject
+ pres = mkVerbPres vp.root;
+ past = mkVerbPast vp.root;
+ presPart = mkVerbPresPart vp.root;
+ pastPart = mkVerbPastPart vp.root; -- subject
+ -}
+ --root = vp.root ;
+ compl = vp.adv
+ };
+
+ <_, _,_,True,False> => {
+ s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
+ subjAgr = np.agr;
+ pres = vp.pres;
+ perf = vp.perf;
+ root = vp.s;
+ --morphs = vp.morphs;
+ isPresBlank = vp.isPresBlank;
+ isPerfBlank = vp.isPerfBlank;
+ {-
+ inf = mkVerbInrf vp.root;
+ pres = mkVerbPres vp.root;
+ past = mkVerbPast vp.root;
+ presPart = mkVerbPresPart vp.root;
+ pastPart = mkVerbPastPart vp.root; -- subject
-}
--root = vp.root ;
compl = mkSubjClitic np.agr ++ vp.comp --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
+ };
+ <_, _,_,True, True> => {
+ s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
+ subjAgr = np.agr;
+ pres = vp.pres;
+ perf = vp.perf;
+ root = vp.s;
+ --morphs = vp.morphs;
+ isPresBlank = vp.isPresBlank;
+ isPerfBlank = vp.isPerfBlank;
+ {-
+ inf = mkVerbInrf vp.root;
+ pres = mkVerbPres vp.root;
+ past = mkVerbPast vp.root;
+ presPart = mkVerbPresPart vp.root;
+ pastPart = mkVerbPastPart vp.root; -- subject
+ -}
+ --root = vp.root ;
+ compl = mkSubjClitic np.agr ++ vp.comp ++ vp.comp2 --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
+ };
+ <_, _,_,_, _> => {
+ s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
+ subjAgr = np.agr;
+ pres = vp.pres;
+ perf = vp.perf;
+ root = vp.s;
+ --morphs = vp.morphs;
+ isPresBlank = vp.isPresBlank;
+ isPerfBlank = vp.isPerfBlank;
+ {-
+ inf = mkVerbInrf vp.root;
+ pres = mkVerbPres vp.root;
+ past = mkVerbPast vp.root;
+ presPart = mkVerbPresPart vp.root;
+ pastPart = mkVerbPastPart vp.root; -- subject
+ -}
+ --root = vp.root ;
+ compl = [] --mkSubjClitic np.agr ++ Predef.BIND ++ vp.comp
}
};--: NP -> VP -> Cl ; -- John walks / John does not walk
diff --git a/src/rukiga/StructuralCgg.gf b/src/rukiga/StructuralCgg.gf
index f2e092a5..1ae12767 100644
--- a/src/rukiga/StructuralCgg.gf
+++ b/src/rukiga/StructuralCgg.gf
@@ -6,7 +6,7 @@ concrete StructuralCgg of Structural = CatCgg **
{-variants
NOTE: Please add them to the abstract syntax, ask aarne
- or creat you own abstract Lexicon which inherits from the
+ or creat your own abstract Lexicon which inherits from the
standard one. See how english does it. i.e. use DictCggAbs.gf for the funs.
and DictCgg.gf for the lins.
@@ -15,14 +15,15 @@ concrete StructuralCgg of Structural = CatCgg **
lin
--Determiner : Type = {s : Str ; s2: Agreement=>Str; ntype : NounState ; num : Number ; pos : Position; doesAgree: Bool };
- a_Det = {s =[] ; s2 = \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; --: Det ; indefinite singular ---s
- aPl_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Pl; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; -- : Det ;indefinite plural ---s
- the_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; --: Det ; -- definite singular ---s thePl_Det = {s =[]; ntype = Complete; num = Pl; pos = PreDeterminer}; --: Det ;definite plural ---s
-
+ --a_Det = {s =[] ; s2 = \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; --: Det ; indefinite singular ---s
+ --aPl_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Pl; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; -- : Det ;indefinite plural ---s
+ --the_Det = {s =[]; s2= \\_ => []; ntype = Complete; num = Sg; pos = Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False}; --: Det ; -- definite singular ---s thePl_Det = {s =[]; ntype = Complete; num = Pl; pos = PreDeterminer}; --: Det ;definite plural ---s
+ -- 1 Determiners
every_Det = {s ="buri"; s2 = \\_ => []; ntype=Incomplete; num=Sg; pos=Pre; doesAgree = False; numeralS=\\_=>[]; numeralExists = False} ;
few_Det = {s="kye"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=Post; doesAgree = False; numeralS=\\_=>[]; numeralExists = False} ;
many_Det ={s="ingi"; s2 = \\_ => []; ntype =Complete; num=Pl; pos=Post; doesAgree = False; numeralS=\\_=>[]; numeralExists = False} ;
+ -- 2 Pronouns
i_Pron = {s = table{Gen => glueGen (AgMUBAP1 Sg); _=> mkSStand (AgMUBAP1 Sg)}; third = \\_,_=>[]; agr = AgrYes (AgMUBAP1 Sg)};--mkPron "nyowe" "nyowe" (AgMUBAP1 Sg);
youSg_Pron = {s = table{Gen => glueGen (AgMUBAP2 Sg); _=>mkSStand (AgMUBAP2 Sg)}; third = \\_,_=>[]; agr = AgrYes(AgMUBAP2 Sg)};--mkPron "iwe" "we" (AgMUBAP2 Sg);
he_Pron, she_Pron = {s = table{Gen => glueGen (AgP3 Sg MU_BA); _=>mkSStand (AgP3 Sg MU_BA)}; third = \\_,_=>[]; agr = AgrYes(AgP3 Sg MU_BA)};--mkPron "uwe" "uwe" (AgP3 Sg MU_BA);
@@ -35,7 +36,9 @@ lin
third = \\agr => table{Gen =>glueGen agr; _ => mkSStand agr};
agr = AgrNo
}; --mkPron "kyo" "kyo" (AgP3 Sg KI_BI); -- should form an it_Pron_NClass in extra module
-
+ youPol_Pron = {s = table{Gen => glueGen (AgMUBAP2 Pl); _=>mkSStand (AgMUBAP2 Pl)}; third = \\_,_=>[]; agr =AgrYes (AgMUBAP2 Pl)};--mkPron "imwe" "imwe" (AgMUBAP2 Pl);
+ -- 3 Prepositions
+ above_Prep = mkPrep "ahinguru ya" [] False;
behind_Prep = mkPrep "enyuma ya" [] False;
between_Prep =mkPrep "hagati ya" [] False;
to_Prep = mkPrep "aha" [] False;
@@ -45,16 +48,33 @@ lin
on_Prep = mkPrep "aha" "ahari" False;
in8front_Prep = mkPrep "enyuma ya" [] False; --: Prep ; -- in front of
+ by8agent_Prep = mkPrep "by8agent_Prep" [] False ; -- when you meet by, use the passive of the verb
+ by8means_Prep = mkPrep "by8means_Prep" [] False;
+ during_Prep = mkPrep "omu" "omuri" False;
+ except_Prep = mkPrep "kwihaho" [] False;
+ for_Prep = mkPrep "for_Prep: would need paraphrasing" [] False;
+
+
+ {-
+ the word before is realised as a phrase in RR.
+ We use the negative version of the verb
+ used in the main clause.
+ it is always paraphrased. Let us put a hint for post processing
+ -}
+ before_Prep = mkPrep "PostProcess_before_proximal" "PostProcess_before_distal" False;
---na --please this string varies with vowels use combine_morphemes or
---combine_words when using it.
+ --na --please this string varies with vowels use combine_morphemes or
+ --combine_words when using it.
with_Prep = mkPrep "na" [] False;
from_Prep =mkPrep "kurunga" "" False;
under_Prep = mkPrep "hansi ya" "" False;
after_Prep = mkPrep "omu maisho" "" False; --: Prep ;
-
- ---Structural
+ part_Prep = mkPrep "part_Prep=of:Disambiguate" [] False; -- suspect "part of"
+ possess_Prep = mkPrep [] [] True; -- of is a huge table we should not be carrying arround
+ through_Prep = mkPrep "raba omu" [] False;
+ without_Prep = mkPrep "tiine" [] False;
+ -- 4 Conjunctions
{-
--there are several and i.e.
-- na (two nouns, 2 Noun Phrases, 2 Pronouns, 2 relative subject clauses, )
@@ -97,9 +117,16 @@ lin
s2 =[];
n = Sg
};
+ if_then_Conj = mkConj "kuri" [] Sg;
+ -- Distributed Conjunction
+ both7and_DConj = mkConj "mbi" "na";
+ either7or_DConj = mkConj "mwe ahari" "nari" Sg;
have_V2 ={s= "in"; pres="e"; perf ="e"; isPresBlank = False;
- isPerfBlank = False; morphs = mkVerbMorphs; comp = []; isRegular=False}; --: V2 ;
+ isPerfBlank = False;
+ p = []; isRefl = False;
+ morphs = mkVerbMorphs; comp = []; isCompN2 = False;
+ isRegular=False}; --: V2 ;
{-
All Predeterminers are given here.
@@ -136,6 +163,12 @@ lin
always_AdV = {s = "obutóòsha"; agr = AgrNo};
everywhere_Adv = {s = "hóòna"; agr = AgrNo}; -- adverb of place.
here_Adv = {s = "hanu"; agr = AgrNo};
+ here7from_Adv = mkAdv "here7from_Adv:findout" AgrNo;
+ quite_Adv = mkAdA "quite_Adv:findout" Post;
+ there7from_Adv = mkAdv "there7from_Adv:findout" AgrNo;
+ there7to_Adv = mkAdv "there7to_Adv:findout" AgrNo;
+ here7to_Adv = mkAdv "here7to_Adv:findout" AgrNo;
+ there_Adv = mkAdv "hari" AgrNo;
{-End of Adverbs Adverbs-}
{-Begining of Quantifiers-}
@@ -168,8 +201,9 @@ lin
whoPl_IP = { s= "ha"; n = IPl; isVerbSuffix = True; requiresIPPrefix = False; aux="ni"; endOfSentence = True} ;--: IP ; -- who (plural)
whoSg_IP = { s= "ha"; n = ISg; isVerbSuffix = True; requiresIPPrefix = False; aux="ni"; endOfSentence = True}; --: IP ; -- who (singular)
--You may need to use booleans to indicate that you need these tables rather than carrying them.
+ --interogative adverbs
how_IAdv = {s ="ta"; requiresSubjPrefix = True; endOfSentence =True}; --: IAdv ;
- --how8much_IAdv = {s ="kwiga"; s2requireSubjPrefix = True};--: IAdv ;
+ how8much_IAdv = {s ="kwigana"; requiresSubjPrefix = True; endOfSentence =True};--: IAdv ;
when_IAdv = {s ="ryari"; requiresSubjPrefix = False; endOfSentence =True}; --: IAdv ;
where_IAdv = {s ="nkahe"; requiresSubjPrefix = False; endOfSentence =True}; --: IAdv ;
@@ -208,28 +242,51 @@ lin
numeralS=\\_=>[];
numeralExists = False
};--: Det ;
+
+ much_Det =
+ {
+ s =[];
+ s2 =\\agr => "ingi";-- mkSubjCliticTablePl ! agr ++ "mwe";
+ ntype = Complete;
+ num = Pl;
+ pos = Post;
+ doesAgree = True;
+ numeralS=\\_=>[];
+ numeralExists = False
+ };--: Det ;
+
- want_VV = {s = "yend"; pres="da"; perf = "zire"; isPresBlank = False;
- isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};
- can8know_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
- isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (capacity)
- can_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
- isPerfBlank = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (possibility)
+ want_VV = {s = "yend"; pres="da"; perf = "zire"; isPresBlank = False;
+ isPerfBlank = False; isRegular = True; p = []; isRefl = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};
+ can8know_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
+ isPerfBlank = False; isRegular = True; p = []; isRefl = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (capacity)
+ can_VV = {s = "baas"; pres="a"; perf = "ize"; isPresBlank = False;
+ isPerfBlank = False; isRegular = True; p = []; isRefl = False; morphs=mkVerbMorphs; isRegular=True; inf=[]; whenUsed = VVBoth};--: VV ; -- can (possibility)
-- must_VV used especially in the perfective mood: see dictionary entry shemerera on Pg 501 of Mpairwe
-- must has no passive form
must_VV = {s = "shemere"; pres="ra"; perf = "ire"; isPresBlank = False;
- isPerfBlank = False; morphs=mkVerbMorphs; isRegular=False; inf=[]; whenUsed = VVPerf}; --VV
- --somebody_NP = {}; --: NP ;
- --something_NP : NP ;
- --somewhere_Adv : Adv ;
+ isPerfBlank = False; isRegular = False; p = []; isRefl = False; morphs=mkVerbMorphs; isRegular=False; inf=[]; whenUsed = VVPerf}; --VV
+ everybody_NP = {s = \\_=>"buri muntu" ; agr=AgP3 Sg MU_BA};
+ everything_NP = {s = \\_=>"buri kintu" ; agr=AgP3 Sg KI_BI};
+ somebody_NP = {s = \\_=>"somebody:omuntu omwe" ; agr=AgP3 Sg MU_BA}; --: NP ;
+ something_NP = {s = \\_=>"Something:ekintu kimwe" ; agr=AgP3 Sg KI_BI} ; -- NP ;
+ nobody_NP = {s = \\_=>"tihiine muntu" ; agr=AgP3 Sg MU_BA};
+ nothing_NP = {s = \\_=>"tihiine kintu" ; agr=AgP3 Sg KI_BI};
+
+
+ -- Subjunctives
that_Subj = ss "ngu" ;
when_Subj = ss "obu";
because_Subj = ss "ahabwokuba";
-
+ although_Subj = ss "nobu";
+ if_Subj = ss "kuri";
--Adjective modifying Adverbs
almost_AdA = {s="haihi"; position=Pre}; --: AdA ;
--quite_Adv ss "kimwe"; --: AdA ; used in the pr
+ somewhere_Adv = mkAdv "hamwe ahantu" (AgrYes (AgP3 Sg HA)); -- : Adv ;
+
+
so_AdA = {s="munônga"; position=Post};--: AdA ;
too_AdA = {s="munônga"; position=Post}; --: AdA ;
very_AdA = {s="munônga"; position=Post}; --: AdA ;
@@ -239,6 +296,23 @@ lin
but_PConj = ss "báìtu"; --: PConj ; -- variants béìtu
otherwise_PConj = ss "okûndi"; --: PConj ;
therefore_PConj = ss "n'ahabwe'êkyo"; --: PConj ;
+
+
+ -- Comparative Adverb
+ as_CAdv = mkCAdv "nka" ;
+ less_CAdv = mkCAdv "kye ahari";
+ more_CAdv = mkCAdv "ingi ahari";
+
+
+ -- Adverbs modifying numerals
+ at_most_AdN = mkAdN "ekihango";
+
+ -- Utterances
+ no_Utt = ss "apaana";
+ yes_Utt = ss "yego";
+ lin language_title_Utt = ss "Rukiga" ;
+
+
{-
and_Conj : Conj ;
both7and_DConj : Conj ; -- both...and
diff --git a/src/rukiga/VerbCgg.gf b/src/rukiga/VerbCgg.gf
index 44e778ff..7fec967b 100644
--- a/src/rukiga/VerbCgg.gf
+++ b/src/rukiga/VerbCgg.gf
@@ -20,7 +20,9 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
}; --: V -> VP; -- sleep --ignoring object agreement
-- UseComp : Comp -> VP ; -- be warm means complement of a copula especially adjectival Phrase
@@ -30,7 +32,7 @@ lin
--in
case comp.source of{
AdjP => {
- s = mkBecome.s ++ BIND ++ mkBecome.pres; --Assuming there is no AP which is prepositional
+ s = mkBecome.s ; --Assuming there is no AP which is prepositional
pres =[];
perf = [];
isPresBlank = True;
@@ -45,10 +47,12 @@ lin
adv = [];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
};
- _ => {
- s = mkBecome.s ++ BIND ++mkBecome.pres++ comp.s; --Assuming there is no AP which is prepositional
+ ADverb => {
+ s = mkBecome.s ; --Assuming there is no AP which is prepositional
pres =[];
perf = [];
--morphs=\\form,morphs=>[];
@@ -60,10 +64,52 @@ lin
isCompApStem = False;
agr = AgrNo;
isRegular = False;
+ adv = comp.s;
+ containsAdv =True;
+ adV =[];
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
+ };
+ NounP => {
+ s = mkBecome.s ; --Assuming there is no AP which is prepositional
+ pres =[];
+ perf = [];
+ --morphs=\\form,morphs=>[];
+ isPresBlank = True;
+ isPerfBlank = True;
+ comp = comp.s;
+ comp2 = [];
+ ap = [];
+ isCompApStem = False;
+ agr = AgrNo;
+ isRegular = False;
adv = [];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
+ };
+ _ => {
+ s = mkBecome.s ; --Assuming there is no AP which is prepositional
+ pres =[];
+ perf = [];
+ --morphs=\\form,morphs=>[];
+ isPresBlank = True;
+ isPerfBlank = True;
+ comp = comp.s;
+ comp2 = [];
+ ap = [];
+ isCompApStem = False;
+ agr = AgrNo;
+ isRegular = False;
+ adv = [];
+ containsAdv =False;
+ adV =[];
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
}
}; --its not generating any sentence
@@ -97,7 +143,9 @@ lin
adv=[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 =False
};
--Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
Slash2V3 v3 np ={
@@ -114,7 +162,9 @@ lin
adv = [];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 =False
};
--Slash3V3 : V3 -> NP -> VPSlash ; -- give (it) to her
@@ -132,7 +182,9 @@ lin
adv = [];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = True
};
--SlashVV : VV -> VPSlash -> VPSlash ; -- want to buy
SlashVV vv vpslash ={
@@ -152,7 +204,9 @@ lin
adv = [];
containsAdv = False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
};
--SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go
@@ -176,7 +230,9 @@ lin
adv = [];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = vpslash.containsComp2
};
-- AdvVP : VP -> Adv -> VP ; -- sleep here
-- VerbPhrase: Type = {s:Str; morphs: VMorphs ; comp:Str ; isCompApStem : Bool; agr : AgrExist};
@@ -189,7 +245,7 @@ lin
isPresBlank = vp.isPresBlank;
isPerfBlank = vp.isPerfBlank;
comp = adv.s;
- comp2 = [];
+ comp2 = vp.comp2;
ap =[];
isCompApStem = False;
agr = AgrNo;
@@ -197,7 +253,9 @@ lin
adv = adv.s;
containsAdv =True;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = vp.containsComp2
};
-- AdVVP : AdV -> VP -> VP ; -- always sleep
@@ -217,7 +275,9 @@ lin
adv = [];
containsAdv =False;
adV =adV.s;
- containsAdV = True
+ containsAdV = True;
+ containsComp = vp.containsComp;
+ containsComp2 = vp.containsComp2
};
--AdvVPSlash : VPSlash -> Adv -> VPSlash ; -- use (it) here
@@ -240,7 +300,9 @@ lin
adv = adv.s;
containsAdv =True;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = vpslash.containsComp;
+ containsComp2 = vpslash.containsComp2
};
-- Adverb directly attached to verb
--AdVVPSlash : AdV -> VPSlash -> VPSlash ; -- always use (it)
@@ -262,7 +324,9 @@ lin
adv = [];
containsAdv =False;
adV =adV.s;
- containsAdV = True
+ containsAdV = True;
+ containsComp = vpslash.containsComp;
+ containsComp2 = vpslash.containsComp2
};
-- Verb phrases are constructed from verbs by providing their
-- complements. There is one rule for each verb category.
@@ -272,9 +336,14 @@ lin
--This function requires the remodelling of VP to accomodate two Verbs.
--
-}
- ComplVV vv vp = let vpPres = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres;
- in case vv.whenUsed of {
- VVPerf => {
+ ComplVV vv vp = let
+ -- restofVerbPres = case vp.isPresBlank of {
+ -- True => "a";
+ -- False => vp.pres;
+ -- };
+ vpPres = "ku" ++ BIND ++ vp.s ++ BIND ++ vp.pres;
+ in case of {
+ => {
s= vv.s ++ BIND ++ vv.perf ++ vpPres;
pres = [];--vv.pres;
perf= []; -- vv.perf;
@@ -289,9 +358,11 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = True
};
- _ => {
+ <_,True,True> => {
s= vv.s ++ BIND ++ vv.pres ++ vpPres;
pres = [];--vv.pres;
perf= [];--vv.perf;
@@ -307,7 +378,49 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = True
+ };
+ <_,True,_> => {
+ s= vv.s ++ BIND ++ vv.pres ++ vpPres;
+ pres = [];--vv.pres;
+ perf= [];--vv.perf;
+ --morphs = vv.morphs;
+ isPresBlank = True;
+ isPerfBlank = True;
+ comp=vp.comp ;
+ comp2 = [];
+ ap = [];
+ isCompApStem = False;
+ agr = AgrNo;
+ isRegular = vv.isRegular;
+ adv =[];
+ containsAdv =False;
+ adV =[];
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
+ };
+ <_,_,_> => {
+ s= vv.s ++ BIND ++ vv.pres ++ vpPres;
+ pres = [];--vv.pres;
+ perf= [];--vv.perf;
+ --morphs = vv.morphs;
+ isPresBlank = True;
+ isPerfBlank = True;
+ comp=[] ;
+ comp2 = [];
+ ap = [];
+ isCompApStem = False;
+ agr = AgrNo;
+ isRegular = vv.isRegular;
+ adv =[];
+ containsAdv =False;
+ adV =[];
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
}
};
@@ -328,7 +441,9 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
};
{-
@@ -351,7 +466,9 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = True;
+ containsComp2 = False
};
{-
@@ -379,7 +496,9 @@ lin
adv =[];
containsAdv =False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
};
-- Copula alone
@@ -393,7 +512,9 @@ lin
adv = [];
containsAdv = False;
adV =[];
- containsAdV = False
+ containsAdV = False;
+ containsComp = False;
+ containsComp2 = False
};
{-
--1 The construction of verb phrases