=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

@@ -94,7 +94,7 @@ lincat
Card = {s :Res.Agreement=>Str; n : Res.Number} ;
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

View File

@@ -67,27 +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
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";
@@ -148,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;
@@ -160,9 +160,9 @@ lin
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;
clever_A =mkAdjective "amagyezi" Post False True False;
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;
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.
-}
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;
art_N = mkN "aati" "aati" 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;
bank_N = mkN "banka" "banka" N_N;
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 ;
breast_N = mkN "eibere" "amabere" I_MA ;
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
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;
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
-- 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
-- door_N
-- dry_A
-- dull_A
-- dust_N
-- ear_N
-- earth_N
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
-- egg_N
egg_N = mkN "eihuri" "amahuri" I_MA;
-- 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
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
-- garden_N
-- glove_N
-- gold_N
-- grass_N
-- guts_N
-- hair_N
-- hand_N
garden_N = mkN "omusiri" "emisiri" MU_MI;
--glove_N
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
-- head_N
-- hear_V2
-- heart_N
-- hill_N
-- hit_V2
-- hold_V2
-- horn_N
-- hunt_V2
-- husband_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
-- industry_N
-- iron_N
-- king_N
-- knee_N
-- know_V2
-- lake_N
-- lamp_N
-- leaf_N
-- learn_V2
-- leather_N
-- leave_V2
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
-- leg_N
-- lie_V
-- like_V2
-- listen_V2
-- liver_N
-- long_A
-- lose_V2
-- louse_N
-- love_N
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
-- mother_N2
-- mountain_N
-- mouth_N
-- name_N
-- narrow_A
-- near_A
-- neck_N
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
-- peace_N
-- pen_N
-- planet_N
-- plastic_N
-- play_V2
-- policeman_N
-- priest_N
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
-- push_V2
-- put_V2
-- queen_N
-- question_N
-- radio_N
-- rain_N
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
-- restaurant_N
religion_N = mkN "endiini" "endiini" N_N;
restaurant_N = mkN "hooteeri" "hooteeri" ZERO_ZERO;
-- right_Ord
-- road_N
road_N = mkN "orugundo" "engundo" RU_N;
-- rock_N
-- roof_N
-- root_N
-- rope_N
-- rotten_A
--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
rub_V2 = mkV2 "harabur" "a" "ire";
-- 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
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
-- song_N
-- speak_V2
-- spit_V
-- split_V2
-- squeeze_V2
-- stab_V2
-- stand_V
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
-- 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
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
-- 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
--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";

View File

@@ -1,4 +1,21 @@
--# -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 =
open (Predef=Predef), ResCgg, CatCgg, Prelude in {
@@ -45,13 +62,13 @@ 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) --%
-- } ;
mkN2 = overload {
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}) ;
} ;
{-
-- 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 = <>} ;
regN = \x,g,anim ->
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 = <>} ;
-}
-- 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
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_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
@@ -188,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.
};
@@ -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 ; 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: