1
0
forked from GitHub/gf-rgl

=Added linearisations for several lexical items. The linearization type for adjectives was modified to cater for certain adjectives that are negatives of others. An example is certain and uncertain

This commit is contained in:
David Bamutura
2020-10-22 00:02:51 +03:00
parent d4aba3bded
commit 6ca4907c11
4 changed files with 293 additions and 391 deletions

View File

@@ -67,27 +67,27 @@ lin
paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places??? paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places???
--Adjectives --Adjectives
bad_A = mkAdjective "bi" Post False False; --False means the adjective is a stem and comes after the complete noun 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; big_A = mkAdjective "hango" Post False False False;
black_A = mkAdjective "kwirangura" Post False False; black_A = mkAdjective "kwirangura" Post False False False;
blue_A = mkAdjective "buuru" Post True True ; blue_A = mkAdjective "buuru" Post True True False ;
clean_A = mkAdjective "yonjo" Post False False; --: A ; clean_A = mkAdjective "yonjo" Post False False False ; --: A ;
cold_A = mkAdjective "kufuka" Post False False; --: A ; cold_A = mkAdjective "kufuka" Post False False False ; --: A ;
correct_A = mkAdjective "hikire" Post False False; --: A ; correct_A = mkAdjective "hikire" Post False False False; --: A ;
good_A =mkAdjective "rungi" Post False False; --: A ; good_A =mkAdjective "rungi" Post False False False; --: A ;
heavy_A = mkAdjective "kuremeera" Post False False; --: A ; --notice ri as a verb is heavy_A = mkAdjective "kuremeera" Post False 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 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; --: A ; new_A = mkAdjective "sya" Post False False False; --: A ;
old_A = mkAdjective "kúru" Post False False; --: A ; old_A = mkAdjective "kúru" Post False False False; --: A ;
ready_A = mkAdjective "eteekateekire" Post False False; --: A ; ready_A = mkAdjective "eteekateekire" Post False False False; --: A ;
red_A = mkAdjective "kutukura" Post False False; --: A ; red_A = mkAdjective "kutukura" Post False False False; --: A ;
small_A = mkAdjective "kye" Post False False; small_A = mkAdjective "kye" Post False False False;
warm_A = mkAdjective "kutagata" Post False False;--: A ; warm_A = mkAdjective "kutagata" Post False False False;--: A ;
white_A = mkAdjective "rikwera" Post False False;--: A ; white_A = mkAdjective "rikwera" Post False False False;--: A ;
yellow_A = mkAdjective "kinekye" Post True True;--: A ; or yero, or kyenju yellow_A = mkAdjective "kinekye" Post True True False;--: A ; or yero, or kyenju
young_A = mkAdjective "to" Post False False;--: A ; young_A = mkAdjective "to" Post False False False;--: A ;
green_A =mkAdjective "kijubwe" Post False True; green_A =mkAdjective "kijubwe" Post False True False;
thin_A = mkAdjective "kye" Post False False; thin_A = mkAdjective "kye" Post False False False;
--ditransitive verbs --ditransitive verbs
bite_V2 = mkV2 "rum"; bite_V2 = mkV2 "rum";
@@ -148,7 +148,7 @@ lin
--beg_V2V : V2V ; --beg_V2V : V2V ;
--Adverbs --Adverbs
now_Adv = mkAdv "hati" AgrNo; now_Adv = mkAdv "hati" AgrNo;
--far_Adv = mkAdv "hare"; far_Adv = mkAdv "hare" AgrNo;
today_Adv = mkAdv "erizooba" AgrNo; today_Adv = mkAdv "erizooba" AgrNo;
@@ -160,9 +160,9 @@ lin
switch8off_V2 = mkV2 "raza" "za" "riize"; switch8off_V2 = mkV2 "raza" "za" "riize";
television_N = mkN "TV" N_N; television_N = mkN "TV" N_N;
doctor_N = mkN "omushaho" MU_BA; doctor_N = mkN "omushaho" MU_BA;
clever_A =mkAdjective "amagyezi" Post False True; clever_A =mkAdjective "amagyezi" Post False True False;
laugh_V = mkV "sheka"; laugh_V = mkV "sheka";
beautiful_A = mkAdjective "rungi" Post False False; beautiful_A = mkAdjective "rungi" Post False False False;
airplane_N = mkN "endegye" N_N; airplane_N = mkN "endegye" N_N;
year_N = mkN "omwaka" "emyaka" MU_MI; year_N = mkN "omwaka" "emyaka" MU_MI;
@@ -172,11 +172,11 @@ lin
surface realisation comes from verb tense e.g nagyenzire implies I have alredy gone. 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 already_Adv = mkAdv "" AgrNo; -- Already is realized as a verb form
answer_V2S = mkV2S (mkV "garu" "kamu" "kiremu") noPrep; --answer_V2S = mkV2S (mkV "garu" "kamu" "kiremu") noPrep;
apartment_N = mkN "apatimenti" "apatimenti" N_N; apartment_N = mkN "apatimenti" "apatimenti" N_N;
art_N = mkN "aati" "aati" N_N; art_N = mkN "aati" "aati" N_N;
ashes_N = mkN "eiju" "eiju" N_N; ashes_N = mkN "eiju" "eiju" N_N;
ask_V2Q = mkV2Q (mkV2 "bunza" "za" "rize") noPrep; --ask_V2Q = mkV2Q (mkV2 "bunza" "za" "rize") noPrep;
back_N = mkN "omugongo" MU_MI; back_N = mkN "omugongo" MU_MI;
bank_N = mkN "banka" "banka" N_N; bank_N = mkN "banka" "banka" N_N;
bark_N = mkN "ask for the Rukiga equivalent of bark" N_N; --TODO find actual word bark_N = mkN "ask for the Rukiga equivalent of bark" N_N; --TODO find actual word
@@ -188,214 +188,213 @@ lin
boss_N = mkN "mukama" "bakama" MU_BA ; boss_N = mkN "mukama" "bakama" MU_BA ;
breast_N = mkN "eibere" "amabere" I_MA ; breast_N = mkN "eibere" "amabere" I_MA ;
breathe_V = mkV "is" "a" "ire"; breathe_V = mkV "is" "a" "ire";
broad_A = mkAdjective "TODO : Ask for the right word" Post False False; broad_A = mkAdjective "TODO : Ask for the right word for broad" Post False False False;
--Note: younger brother. mukuru and others --Note: younger brother. mukuru and others
brother_N2 = mkN2 (mkN "murumuna" "barumuna" MU_BA) (mkPrep "" "" True) ; --brother_N2 = mkN2 (mkN "murumuna" "barumuna" MU_BA) (mkPrep "" "" True) ;
newspaper_N = mkN "eihurire" I_MA; newspaper_N = mkN "eihurire" I_MA;
night_N = mkN "ekiro" N_ZERO; night_N = mkN "ekiro" N_ZERO;
nose_N = mkN "enyindo" N_N; nose_N = mkN "enyindo" N_N;
--number_N = mkN "enamba" N_N -- TODO look out for the correct word --number_N = mkN "enamba" N_N -- TODO look out for the correct word
oil_N = mkN "amajuta" N_N; oil_N = mkN "amajuta" N_N;
open_V2 = mkV2 "yingura" "ura" "wire"; open_V2 = mkV2 "yingura" "ura" "wire";
-- brown_A brown_A = mkAdjective "TODO: Get the right word for brown" Post False True False;
-- burn_V burn_V = mkV "batur" "a" "ire";
-- butter_N butter_N = mkN "amajuta g'ente" "amajuta g'ente" N_N;
-- camera_N camera_N = mkN "kamera" "kamera" ZERO_ZERO;
-- cap_N cap_N = mkN "TODO-enkofiira" "enkofiira" N_N;
-- carpet_N carpet_N = mkN "kapeti" "kapeti" ZERO_ZERO;
-- ceiling_N ceiling_N = mkN "TO-DO:silingi" "TO-DO:silingi" N_N;
-- cheese_N cheese_N = mkN "TO-DO" "TO-DO" N_N;
-- church_N church_N = mkN "ekelezia" "amakelezia" N_N;
-- coat_N coat_N = mkN "kabuti" "kabuti" ZERO_ZERO;
-- country_N country_N = mkN "eihanga" "amahanga" I_MA;
-- cousin_N cousin_N = mkN "munyanyako" "banyanyako" MU_BA;
-- day_N day_N = mkN "eizooba" "amazoba" I_MA;
-- dig_V dig_V = mkV "hiing" "a" "ire";
-- dirty_A dirty_A = mkAdjective "rofa" Post False False False;
-- door_N door_N = mkN "orwigi" "enyigi" RU_N;
-- dry_A dry_A = mkAdjective "yoma" Post False False False;
-- dull_A dull_A = mkAdjective "TODO: find out word for dull" Post False False False;
-- dust_N dust_N = mkN "omucuucu" "omucuucu" ZERO_ZERO;
-- ear_N ear_N = mkN "okutu" "amatu" KU_MA;
-- earth_N earth_N = mkN "ensi" "ensi" N_N;
-- easy_A2V -- easy_A2V
-- egg_N egg_N = mkN "eihuri" "amahuri" I_MA;
-- empty_A -- empty_A
-- enemy_N enemy_N = mkN "TODO : cofirm omurabe" "TODO : cofirm abarabe" MU_BA;
-- factory_N factory_N = mkN "TODO : cofirm fakatore" "TODO : cofirm fakatore" N_N;
-- fall_V fall_V = mkV "gw" "a" "ire";
-- far_Adv fat_N = mkN "ebishaju" "ebishaju" ZERO_ZERO;
-- fat_N feather_N = mkN "ekyoya" "ebyoya" KI_BI;
-- feather_N fight_V2 = mkV2 "rwan" "a" "ire";
-- fight_V2 fingernail_N = mkN "ekyara ky'engaro" "ebyara by'engaro" KI_BI;
-- fingernail_N --float_V
-- float_V --floor_N
-- floor_N flow_V = mkV "TODO: confirm himintuk" "a" "ire";
-- flow_V fly_V = mkV "guruk" "a" "ire";
-- fly_V fog_N = mkN "TODO word for fog" "TODO word for fog" N_N;
-- fog_N foot_N = mkN "ekigyere" "ebigyere" KI_BI;
-- foot_N forest_N = mkN "eihamba" "amahamba" I_MA;
-- forest_N forget_V2 = mkV2 "yebw" "a" "ire";
-- forget_V2 freeze_V = mkV "kwat" "a" "sire";
-- freeze_V fridge_N = mkN "firigi" "firigi" ZERO_ZERO;
-- fridge_N fruit_N = mkN "ekijuma" "ebijuma" KI_BI;
-- fruit_N full_A = mkAdjective "injwire" Post False True False;
-- full_A
-- fun_AV -- fun_AV
-- garden_N garden_N = mkN "omusiri" "emisiri" MU_MI;
-- glove_N --glove_N
-- gold_N gold_N = mkN "TODO:feza" "TODO:feza" ZERO_ZERO;
-- grass_N grass_N = mkN "akanyaasi" "obunyaasi" KA_BU;
-- guts_N guts_N = mkN "orubondo" "amabondo" RU_MA;
-- hair_N hair_N = mkN "eishokye" "eishokye" N_N;
-- hand_N hand_N = mkN "omukono" "emikono" MU_MI;
-- harbour_N -- harbour_N
-- hate_V2 hate_V2 = mkV2 "kwag" "a" "ire";
-- head_N head_N = mkN "omutwe" MU_MI;
-- hear_V2 hear_V2 = mkV2 "hurir" "a" "e";
-- heart_N heart_N = mkN "omutima" "emitima" MU_MI;
-- hill_N hill_N = mkN "orushozi" "enshozi" N_N;
-- hit_V2 hit_V2 = mkV2 "kangaa" "ta" "sire";
-- hold_V2 hold_V2 = mkV2 "kwa" "ta" "sire";
-- horn_N horn_N = mkN "eihembe" "amahembe" I_MA;
-- hunt_V2 hunt_V2 = mkV2 "hiig" "a" "ire";
-- husband_N husband_N = mkN "iba" "biba" ZERO_ZERO;
-- ice_N -- ice_N
-- important_A important_A = mkAdjective "omugasho" Post False True False;
-- industry_N --industry_N =
-- iron_N iron_N = mkN "ekyoma ebirikurunga omu butare" "ebyoma ebirikurunga omu butare" ZERO_ZERO;
-- king_N king_N = mkN "omugabe" MU_BA;
-- knee_N knee_N = mkN "okuju" "amaju" KU_MA;
-- know_V2 know_V2 = mkV2 "many" "a" "ire";
-- lake_N lake_N = mkN "enyanja" "enyanja" N_N;
-- lamp_N lamp_N = mkN "entara" "entara" N_N;
-- leaf_N leaf_N = mkN "ibabi" "amababi" I_MA;
-- learn_V2 learn_V2 = mkV2 "yeg" "a" "ire";
-- leather_N leather_N = mkN "oruhu" "empu" RU_N; --I think plural should be oruhu again
-- leave_V2 leave_V2 = mkV2 "rug" "a" "ire";
-- left_Ord -- left_Ord
-- leg_N leg_N = mkN "okuguru" "amaguru" KU_MA;
-- lie_V lie_V = mkV "beih" "a" "ire";
-- like_V2 like_V2 = mkV2 "kun" "da" "zire";
-- listen_V2 listen_V2 = mkV2 "huri" "iriza" "riize";
-- liver_N liver_N = mkN "ekine" "ebine" KI_BI;
-- long_A long_A = mkAdjective "raingwa" Post False False False;
-- lose_V2 --lose_V2 = mkV2 ""
-- louse_N louse_N = mkN "omura" "emira" MU_MI;
-- love_N love_N = mkN "rukundo" "rukundo" ZERO_ZERO;
-- married_A2 -- married_A2
-- moon_N moon_N = mkN "okwezi" "emwezi" KU_MA;
-- mother_N2 --mother_N2 = mkN2 (mkN "mama" ZERO_BAA) (lin Prep (mkPrep [] [] True)) ;
-- mountain_N --mountain_N = mkN
-- mouth_N mouth_N = mkN "omunwa" "eminwa" MU_MI;
-- name_N name_N = mkN "eiziina" "amaziina" I_MA;
-- narrow_A narrow_A = mkAdjective "kye" Post False False False;
-- near_A near_A = mkAdjective "hihi" Pre False True False; -- the preposition is "na"
-- neck_N neck_N = mkN "ebisya" "ebisya" ZERO_ZERO;
-- paint_V2A -- paint_V2A
-- paper_N paper_N = mkN "orupapura" "empapura" RU_N;
-- peace_N peace_N = mkN "obusingye" "obusingye" ZERO_BU;
-- pen_N pen_N = mkN "akacumu" "obucumu" KA_BU;
-- planet_N planet_N = mkN "ensi" "ensi" N_N;
-- plastic_N plastic_N = mkN "pulasitika" "pulasitika" ZERO_ZERO;
-- play_V2 play_V2 = mkV2 "zaan" "a" "ire";
-- policeman_N policeman_N = mkN "omupolisi" "abapolisi" MU_BA;
-- priest_N priest_N = mkN "omuhongyerezi" "abahongyerezi" MU_BA;
-- probable_AS -- probable_AS
-- pull_V2 pull_V2 = mkV2 "kuru" "ra" "ire";
-- push_V2 push_V2 = mkV2 "sindik" "a" "ire";
-- put_V2 put_V2 = mkV2 "t" "a" "ire";
-- queen_N queen_N = mkN "Kwini" "baakwini" ZERO_BAA;
-- question_N question_N = mkN "ekibuzo" "ebibuzo" KI_BI;
-- radio_N radio_N = mkN "radiyo" "radiyo" ZERO_ZERO;
-- rain_N rain_N = mkN "enjura" "enjura" ZERO_N;
-- rain_V0 -- rain_V0
-- religion_N religion_N = mkN "endiini" "endiini" N_N;
-- restaurant_N restaurant_N = mkN "hooteeri" "hooteeri" ZERO_ZERO;
-- right_Ord -- right_Ord
-- road_N road_N = mkN "orugundo" "engundo" RU_N;
-- rock_N -- rock_N
-- roof_N --roof_N = mkN ""
-- root_N root_N = mkN "omuzi" "emizi" MU_MI;
-- rope_N rope_N = mkN "omuguha" "emiguha" MU_MI;
-- rotten_A rotten_A = mkAdjective "njuzire" Post False False False;
-- round_A -- round_A
-- rub_V2 rub_V2 = mkV2 "harabur" "a" "ire";
-- rubber_N -- rubber_N
-- salt_N salt_N = mkN "omwonyo" "emyonyo" MU_MI;
-- sand_N sand_N = mkN "omushenyi" MU_MI;
-- school_N school_N = mkN "eishomero" I_MA;
-- science_N science_N = mkN "sayansi" "sayansi" ZERO_ZERO;
-- scratch_V2 scratch_V2 = mkV2 "ha" "ra" "ire";
-- seed_N seed_N = mkN "ensingo" "ensigo" N_N;
-- seek_V2 seek_V2 = mkV2 "kyenuuz" "a" "ire";
-- sew_V sew_V = mkV "ruk" "a" "ire";
-- sharp_A sharp_A = mkAdjective "shazire" Post False False False;
-- shirt_N shirt_N = mkN "esaati" "esaati" ZERO_ZERO; --TODO: confirm this entry
-- shoe_N shoe_N = mkN "enkaito" "enkaito" N_N; --TODO : confirm the existence of this entry
-- shop_N shop_N = mkN "eduuka" "eduuka" ZERO_ZERO;
-- short_A short_A = mkAdjective "gufu" Post False False False;
-- silver_N --silver_N
-- sing_V sing_V = mkV "yeshogor" "ora" "wire"; --TODO : confirm this word and the conjugation
-- sister_N sister_N = mkN "munyanyazi" "banyanyanzi" MU_BA;
-- sit_V sit_V = mkV "shutam" "a" "ire";
-- skin_N --skin_N = mkN "omubiri" "emibiri" MU_MI; This is wrong
-- sky_N sky_N = mkN "eiguru" "eiguru" ZERO_ZERO;
-- smell_V smell_V = mkV "kag" "a" "ire";
-- smoke_N smoke_N = mkN "omwika" "emyiika" MU_MI;
-- smooth_A --smooth_A
-- snake_N snake_N = mkN "enjoka" "enjoka" N_N;
-- snow_N -- snow_N
-- sock_N sock_N = mkN "sitokisi" "sitokisi" ZERO_ZERO;
-- song_N song_N = mkN "ekyeshongoro" "ebyeshongoro" KI_BI;
-- speak_V2 speak_V2 = mkV2 "gamba";
-- spit_V spit_V = mkV "cwer" "a" "ire";
-- split_V2 split_V2 = mkV2 "gangabura";
-- squeeze_V2 squeeze_V2 =mkV2 "imat" "a" "si";
-- stab_V2 stab_V2 = mkV2 "cumi" "ta" "sire"; --edit for Runyankore
-- stand_V stand_V = mkV "yemerera" "ra" "ire";
-- steel_N -- steel_N
-- stick_N stick_N = mkN "omunyafu" "eminyafu" MU_MI;
-- stone_N stone_N = mkN "eibare" "amabara" I_MA;
-- stop_V stop_V = mkV "komya" "ya" "ize";
-- stove_N stove_N = mkN "sitoovu" "sitoovu" ZERO_ZERO;
-- straight_A straight_A = mkAdjective "gorwire" Post False False False;
-- student_N student_N = mkN "omwana w'eishomero" "abaana b'eishomero" MU_BA;
-- stupid_A stupid_A = mkAdjective "himbagire" Post False False False;
-- suck_V2 suck_V2 = mkV2 "komaguza" "za" "ize";
-- sun_N sun_N = mkN "omushana" "omushana" MU_ZERO;
-- swell_V swell_V = mkV "bimba";
-- switch8on_V2 switch8on_V2 = mkV2 "ya" "sya" "kise";
-- table_N table_N = mkN "emeeza" "emeeza" N_N;
-- tail_N tail_N = mkN "omukira" "emikira" MU_MI;
-- teacher_N teacher_N = mkN "omushomesa" "abashomesa" MU_BA;
-- thick_A -- thick_A
-- think_V --think_V = mkV
-- throw_V2 throw_V2 = mkV2 "naga";
-- tie_V2 tie_V2 = mkV2 "siba";
-- tongue_N tongue_N = mkN "orurimi" RU_N;
-- tooth_N tooth_N = mkN "erino" "amino" RI_MA;
-- turn_V turn_V = mkV "hinduka";
-- ugly_A ugly_A = mkAdjective "bi" Post False False False; --I think I should add another boolean for copulative version
-- uncertain_A 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 university_N = mkN "yunivasite" "yunivasite" ZERO_ZERO;
-- village_N village_N = mkN "ekyalo" "ebyalo" KI_BI;
-- vomit_V vomit_V = mkV "tanaka";
-- war_N war_N = mkN "orutaro" "entaro" RU_N;
-- wash_V2 wash_V2 = mkV2 "yozya" "zya" "yogize";
-- watch_V2 watch_V2 = mkV2 "reeba";
-- wet_A wet_A = mkAdjective "jubire" Post False False False;
-- wide_A wide_A = mkAdjective "hango" Post False False False;
-- wife_N wife_N = mkN "omukyara" "abakyara" MU_BA;
-- win_V2 win_V2 = mkV2 "singa";
-- wind_N wind_N = mkN "omuyaga" "emiyaga" MU_MI;
-- window_N window_N = mkN "eidirisa" "eidirisa" N_N;
-- wing_N wing_N = mkN "eipapa" "amapapa" I_MA;
-- wipe_V2 wipe_V2 = mkV2 "sim" "ura" "wire";
-- wonder_VQ --wonder_VQ = mkV2Q (mkV2 "tanga" "ara" "ire") noPrep;
-- wood_N wood_N = mkN "ekiti" "ebiti" KI_BI;
-- worm_N --worm_N
-- write_V2 write_V2 = mkV2 "handika";

View File

@@ -1,4 +1,21 @@
--# -path=.:../prelude:../abstract:../common --# -path=.:../prelude:../abstract:../common
--# -path=.:../abstract:../../prelude:../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 = resource ParadigmsCgg =
open (Predef=Predef), ResCgg, CatCgg, Prelude in { open (Predef=Predef), ResCgg, CatCgg, Prelude in {
@@ -45,13 +62,13 @@ oper
--3 Relational nouns --3 Relational nouns
mkN2 : overload { -- mkN2 : overload {
--mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --% -- --mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
--mkN2 : N -> N2 ; -- e.g. wife of (default prep. to) -- --mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
--mkN2 : N -> Str -> N2 ; -- access to --% -- --mkN2 : N -> Str -> N2 ; -- access to --%
mkN2 : N -> Prep -> N2 ; -- e.g. access to -- mkN2 : N -> Prep -> N2 ; -- e.g. access to
--mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --% -- --mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
} ; -- } ;
mkN2 = overload { mkN2 = overload {
mkN2 : N -> Prep -> N2 = prepN2 ; mkN2 : N -> Prep -> N2 = prepN2 ;
@@ -130,187 +147,68 @@ oper
mkV2V : V -> Prep -> Prep -> V2V = \v,p,t -> lin V2V (prepV2 v p ** {c3 = t.s ; 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.
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} ;
-- 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)
mkV2V : overload { -- mkAS : A -> AS ; --%
mkV2V : Str -> V2V ; -- mkA2S : A -> Prep -> A2S ; --%
mkV2V : V -> V2V ; -- mkAV : A -> AV ; --%
mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (noPrep NP) (to VP) -- mkA2V : A -> Prep -> A2V ; --%
} ;
-} -- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
--mkV = overload { -- $V0$ is just $V$; the second argument is treated as adverb.
--mkV : (cry : Str) -> V
--= \cry -> lin V (mkVerb cry) ; -- what does it mean to create a lin on the fly
--};
V0 : Type ; --%
AS, A2S, AV, A2V : Type ; --%
{- Note: The following is copied from the file swahili/ParadigmsSwa.gf --2 Other categories
--1 Swahili Lexical Paradigms mkSubj : Str -> Subj = \s -> lin Subj {s = s} ; --%
mkInterj : Str -> Interj
--2 Parameters = \s -> lin Interj (ss s) ;
--
-- 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.
Gender : Type ;
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 ;
--2 Nouns
-- Worst case: give all four forms and the semantic gender.
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 ;
--.
--2 Definitions of paradigms --2 Definitions of paradigms
-- --
-- The definitions should not bother the user of the API. So they are -- The definitions should not bother the user of the API. So they are
-- hidden from the document. -- 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
regN = \x,g,anim -> -- definitions
mkNomReg x g anim ** {lock_N = <>} ;
-- 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
regA a = compADeg {
s = \\_ => (mkAdjective a).s ;
lock_A = <>} ;
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 = <>} ;
{--
mkV2 = overload {
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Prep -> V2 = mmkV2
} ;
mmkV2 : V -> Prep -> V2 ;
mmkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
dirV2 : V -> V2 = \v -> mmkV2 v "na" ;
--}
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position
-- after the verb.
mkAdv : Str -> Adv ;
mkAdv x = ss x ** {lock_Adv = <>} ;
-}
V0 : Type = V ;
AS, A2S, AV : Type = A ;
A2V : Type = A2 ;
} }

View File

@@ -177,7 +177,7 @@ oper
< "e" + "ki" + stem, KI_BI > => mkNoun omuntu (combine_morphemes "ebi" stem) g ; < "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" + "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" + "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_MA > => mkNoun omuntu (combine_morphemes "ama" stem) g ;
< "e" + "ri" + stem, RI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural < "e" + "ri" + stem, RI_ZERO > => mkNoun omuntu (combine_morphemes "" "") g ; -- does not exist as plural
@@ -188,7 +188,7 @@ oper
--< _ ,ZERO_MA > => mkNoun omuntu ("ama" + stem) g (Predef.drop 1 omuntu); --< _ ,ZERO_MA > => mkNoun omuntu ("ama" + stem) g (Predef.drop 1 omuntu);
--< _ ,> => mkNoun omuntu omuntu g (Predef.drop 1 omuntu); --< _ ,> => mkNoun omuntu omuntu g (Predef.drop 1 omuntu);
<_ , ZERO_BAA> => mkNoun omuntu ("baa" + omuntu) g ; <_ , 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.
}; };
@@ -590,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 ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;
AdjectivalPhrase : Type = {s : Str ; position : Position; 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 ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
Adjective : Type = {s : Str ; position : Position; isProper : Bool; isPrep: Bool}; Adjective : Type = {s : Str ;
mkAdjective: Str -> Position -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep -> position : Position;
{ s = a ; position = pos ; isPre = False; isProper = isProper; isPrep = isPrep}; 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: TO DO: