mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
1. Created Linearization types for V2V as Res.Verb ** {comp,c3 : Str ; typ : Res.VVType} ; but however I have eerors with mkV2 overload methods and lock_C fields. I cannot seem to find out the reason for the error.
This commit is contained in:
@@ -6,14 +6,14 @@ param
|
||||
oper
|
||||
ListX = {s1,s2 : Str} ;
|
||||
|
||||
twoStr : (x,y : Str) -> ListX = \x,y ->
|
||||
twoStr : (x,y : Str) -> ListX = \x,y -> --stores two strings in a record
|
||||
{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 ->
|
||||
twoSS : (_,_ : SS) -> ListX = \x,y -> --stores two string records into one record
|
||||
twoStr x.s y.s ;
|
||||
consSS : Str -> ListX -> SS -> ListX = \comma,xs,x ->
|
||||
consSS : Str -> ListX -> SS -> ListX = \comma,xs,x -> -- Combines and a record into a record separated by a comma.
|
||||
consStr comma xs x.s ;
|
||||
|
||||
Conjunction : Type = SS ;
|
||||
@@ -33,7 +33,7 @@ oper
|
||||
|
||||
-- all this lifted to tables
|
||||
|
||||
ListTable : PType -> Type = \P -> {s1,s2 : P => Str} ;
|
||||
ListTable : PType -> Type = \P -> {s1,s2 : P => Str} ; --Type family for tables
|
||||
|
||||
twoTable : (P : PType) -> (_,_ : {s : P => Str}) -> ListTable P = \_,x,y ->
|
||||
{s1 = x.s ; s2 = y.s} ;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ;
|
||||
@@ -68,7 +68,6 @@ lin
|
||||
|
||||
--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 ;
|
||||
@@ -158,298 +157,257 @@ 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";
|
||||
|
||||
beautiful_A = mkAdjective "rungi" Post 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" Post 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
|
||||
-- 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
|
||||
-- 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
|
||||
-- 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
|
||||
-- paint_V2A
|
||||
-- paper_N
|
||||
-- peace_N
|
||||
-- pen_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
|
||||
|
||||
|
||||
|
||||
-- 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;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,12 +27,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 =[]};
|
||||
@@ -44,36 +46,37 @@ 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 : 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 : 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 <p.isGenPrep,q.isGenPrep> of{
|
||||
<False,False> => lin N3 ( lin N2 (n ** {c2 =\\_=> p.s}) ** {c3 =\\_=> q.s}); --method of avoiding lock_C fields
|
||||
<True, False> => n ** {c2 = mkGenPrepWithIVClitic ; c3 =\\_=> q.s; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<False,True> => n ** {c2 =\\_=> p.s ; c3 = mkGenPrepWithIVClitic; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<True,True> => n ** {c2 = mkGenPrepWithIVClitic; c3 = mkGenPrepWithIVClitic; lock_N2 = <>; lock_N3 = <>}
|
||||
<True, False> => n ** {c2 = mkGenPrepWithIV ; c3 =\\_=> q.s; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<False,True> => n ** {c2 =\\_=> p.s ; c3 = mkGenPrepWithIV; lock_N2 = <>;lock_N3 = <>} ;
|
||||
<True,True> => n ** {c2 = mkGenPrepWithIV; c3 = mkGenPrepWithIV; lock_N2 = <>; lock_N3 = <>}
|
||||
};
|
||||
|
||||
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
|
||||
@@ -84,27 +87,51 @@ 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 -> Preposition;
|
||||
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}) ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
{-
|
||||
|
||||
|
||||
|
||||
mkV2V : overload {
|
||||
|
||||
@@ -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
|
||||
@@ -915,69 +934,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" ;
|
||||
_ => Predef.error "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" ;
|
||||
_ => Predef.error "Error in mkGenPrepWithIVClitic : no pattern matched" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
|
||||
@@ -1253,13 +1272,11 @@ 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 ignore the distal dexis to be entered as a separate lemma
|
||||
-- Instead str for positional arguments 1 & 2 cater for prepositions that inflect with Number
|
||||
-- while str for positional argument 3 caters for those that do not inflect with Number
|
||||
Preposition : Type = {s : Str; other : Str; isGenPrep : Bool};
|
||||
|
||||
NounPhrase : Type = {s :Case => Str; agr : Agreement};
|
||||
{-
|
||||
Operation to create Noun Phrases from a Determiner and Nouns.
|
||||
@@ -1308,7 +1325,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 +1346,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?
|
||||
@@ -1385,7 +1404,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 +1415,9 @@ mkSubjPrefix : Agreement -> Str =\a ->case a of {
|
||||
isPresBlank = False;
|
||||
isPerfBlank = False;
|
||||
--morphs= mkVerbMorphs;
|
||||
isRegular=False
|
||||
isRegular=False;
|
||||
p = [];
|
||||
isRefl = False
|
||||
};
|
||||
|
||||
|
||||
@@ -1538,7 +1561,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};
|
||||
|
||||
Reference in New Issue
Block a user