forked from GitHub/gf-core
Maltese: new reduced verb implementation, using binding for pronominal suffixes
Also include some syntax stuff adapted from Angelo Zammit's dissertation.
These sections in the code are marked with [AZ]
The old verbs implementation can still be found at this point in the GitHub repo:
7b3f4a049d
This commit is contained in:
@@ -25,7 +25,7 @@ concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude in {
|
||||
|
||||
-- Sentence
|
||||
|
||||
-- Cl = {s : ResMlt.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
Cl = {s : Tense => Anteriority => Polarity => Str} ;
|
||||
-- ClSlash = {
|
||||
-- s : ResMlt.Tense => Anteriority => Polarity => Order => Str ;
|
||||
-- c2 : Str
|
||||
@@ -50,9 +50,9 @@ concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude in {
|
||||
|
||||
-- Verb
|
||||
|
||||
-- VP = ResMlt.VP ;
|
||||
-- VPSlash = ResMlt.VP ** {c2 : Str} ;
|
||||
-- Comp = {s : Agr => Str} ;
|
||||
VP = ResMlt.VP ;
|
||||
VPSlash = ResMlt.VP ;
|
||||
-- Comp = {s : Agr => Str} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
@@ -62,7 +62,8 @@ concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude in {
|
||||
-- Noun
|
||||
|
||||
CN = Noun ;
|
||||
NP = {s : NPCase => Str ; a : Agr} ;
|
||||
NP = NounPhrase ;
|
||||
Pron = Pronoun ;
|
||||
-- Pron = {s : NPCase => Str ; sp : Case => Str ; a : Agr} ;
|
||||
Det = {s : Str ; n : Num_Number ; hasNum : Bool} ;
|
||||
-- Det = {s : Str ; sp : NPCase => Str ; n : Number ; hasNum : Bool} ;
|
||||
@@ -99,20 +100,16 @@ concrete CatMlt of Cat = CommonX ** open ResMlt, Prelude in {
|
||||
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
||||
V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ;
|
||||
V3 = Verb ** {c2, c3 : Str} ;
|
||||
V, VS, VQ, VA = Verb ;
|
||||
V2, V2A, V2Q, V2S = Verb ; -- ** {c2 : Str} ;
|
||||
V3 = Verb ; -- ** {c2, c3 : Str} ;
|
||||
-- VV = {s : VVForm => Str ; typ : VVType} ;
|
||||
-- V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
||||
|
||||
-- [JJC]
|
||||
A = Adjective ** {hasComp : Bool} ; -- Does the adjective have a comparative form (e.g. ISBAĦ)?
|
||||
-- A2 = Adjective ** {c2 : Str} ;
|
||||
|
||||
-- [JJC]
|
||||
N, N3 = Noun ;
|
||||
N2 = Noun ** {c2 : Str} ;
|
||||
-- N3 = Noun ** {c2,c3 : Str} ;
|
||||
N, N2, N3 = Noun ;
|
||||
PN = ProperNoun ;
|
||||
|
||||
}
|
||||
|
||||
4147
lib/src/maltese/DictMlt.gf
Normal file
4147
lib/src/maltese/DictMlt.gf
Normal file
File diff suppressed because it is too large
Load Diff
4144
lib/src/maltese/DictMltAbs.gf
Normal file
4144
lib/src/maltese/DictMltAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete LexiconMlt of Lexicon = CatMlt **
|
||||
open Prelude, ParadigmsMlt, IrregMlt in {
|
||||
open Prelude, ParadigmsMlt, IrregMlt, DictMlt in {
|
||||
|
||||
flags
|
||||
optimize=values ;
|
||||
@@ -18,11 +18,11 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
-- alas_Interj
|
||||
-- already_Adv
|
||||
animal_N = mkN "annimal" ;
|
||||
-- answer_V2S
|
||||
answer_V2S = wiegeb_WGB_3_10033_V ;
|
||||
apartment_N = mkN "appartament" ;
|
||||
art_N = mkNNoPlural "arti" feminine ;
|
||||
-- ashes_N = mkN "rmied" ;
|
||||
-- ask_V2Q
|
||||
ask_V2Q = saqsa_SQSJ_1_7268_V ;
|
||||
baby_N = mkN "tarbija" "trabi" ;
|
||||
back_N = mkN "dahar" "dhur" ; -- pronSuffix
|
||||
bad_A = brokenA "ħażin" "hżiena" "agħar" ;
|
||||
@@ -36,10 +36,10 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
big_A = brokenA "kbir" "kbar" "ikbar" ;
|
||||
bike_N = mkN "rota" ;
|
||||
bird_N = mkN "għasfur" "għasafar" ; -- what about GĦASFURA?
|
||||
-- bite_V2
|
||||
bite_V2 = gidem_GDM_1_8009_V ;
|
||||
black_A = mkA "iswed" "sewda" "suwed" ;
|
||||
blood_N = mkN [] "demm" [] "dmija" [] ; -- pronSuffix
|
||||
-- blow_V
|
||||
blow_V = nefah_NFH_1_8966_V ;
|
||||
blue_A = sameA "blu" ;
|
||||
boat_N = mkN "dgħajsa" "dgħajjes" ;
|
||||
bone_N = mkNColl "għadam" ;
|
||||
@@ -48,15 +48,15 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
boss_N = mkN "mgħallem" "mgħallmin" ;
|
||||
boy_N = mkN "tifel" "tfal" ;
|
||||
bread_N = mkNColl "ħobż" ;
|
||||
-- break_V2
|
||||
break_V2 = kiser_KSR_1_8636_V ;
|
||||
breast_N = mkN "sider" "sdur" ; -- also ISDRA -- pronSuffix
|
||||
-- breathe_V
|
||||
broad_A = mkA "wiesgħa" "wiesgħa" "wiesgħin" ;
|
||||
brother_N2 = mkN2 (mkN "ħu" "aħwa") (mkPrep "ta'") ; -- pronSuffix
|
||||
brother_N2 = mkN2 (mkN "ħu" "aħwa") ; -- pronSuffix
|
||||
brown_A = sameA "kannella" ;
|
||||
-- burn_V
|
||||
burn_V = haraq_HRQ_1_8367_V ;
|
||||
butter_N = mkN [] "butir" [] "butirijiet" [] ;
|
||||
-- buy_V2
|
||||
buy_V2 = xtara_XRJ_8_10296_V ;
|
||||
camera_N = mkN "kamera" "kameras" ;
|
||||
cap_N = mkN "beritta" ;
|
||||
car_N = mkN "karozza" ;
|
||||
@@ -70,27 +70,27 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
city_N = mkN "belt" "bliet" feminine ; -- pronSuffix
|
||||
clean_A = brokenA "nadif" "nodfa" ;
|
||||
clever_A = regA "bravu" ;
|
||||
-- close_V2
|
||||
close_V2 = ghalaq_GHLQ_1_10530_V ;
|
||||
cloud_N = mkNColl "sħab" ;
|
||||
coat_N = mkN "kowt" "kowtijiet" ;
|
||||
cold_A = mkA "kiesaħ" "kiesħa" "kesħin" ;
|
||||
-- come_V
|
||||
computer_N = mkN "kompjuter" "kompjuters" ;
|
||||
correct_A = regA "korrett" ;
|
||||
-- count_V2
|
||||
count_V2 = ghadd_GHDD_1_10460_V ;
|
||||
country_N = mkN "pajjiż" ; -- pronSuffix
|
||||
cousin_N = mkN "kuġin" ; -- pronSuffix
|
||||
cow_N = mkN "baqra" "baqar" "baqartejn" [] [] ;
|
||||
-- cut_V2
|
||||
cut_V2 = qata'_QTGH_1_9305_V ;
|
||||
day_N = mkN "ġurnata" "ġranet" ;
|
||||
-- dig_V
|
||||
dig_V = hafer_HFR_1_8233_V ;
|
||||
dirty_A = regA "maħmuġ" ;
|
||||
distance_N3 = mkN "distanza" ;
|
||||
-- do_V2
|
||||
do_V2 = ghamel_GHML_1_10544_V ;
|
||||
doctor_N = mkN "tabib" "tobba" ; -- what about TABIBA ?
|
||||
dog_N = mkN "kelb" "klieb" ;
|
||||
door_N = mkN "bieb" "bibien" ; -- what about BIEBA ?
|
||||
-- drink_V2
|
||||
drink_V2 = xorob_XRB_1_10231_V ;
|
||||
dry_A = regA "niexef" ;
|
||||
dull_A = sameA "tad-dwejjaq" ;
|
||||
dust_N = mkNColl "trab" ; -- not sure but sounds right
|
||||
@@ -103,15 +103,15 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
enemy_N = mkN "għadu" "għedewwa" ;
|
||||
eye_N = mk5N "għajn" [] "għajnejn" "għajnejn" "għejun" feminine ; -- pronSuffix
|
||||
factory_N = mkN "fabbrika" ;
|
||||
-- fall_V
|
||||
fall_V = waqa'_WQGH_1_10070_V ;
|
||||
-- far_Adv
|
||||
fat_N = mkNColl "xaħam" ;
|
||||
father_N2 = mkN2 (mkN "missier" "missierijiet") (mkPrep "ta'") ; -- pronSuffix
|
||||
father_N2 = mkN2 (mkN "missier" "missierijiet") ; -- pronSuffix
|
||||
-- fear_V2
|
||||
-- fear_VS
|
||||
feather_N = mkNColl "rix" ;
|
||||
-- fight_V2
|
||||
-- find_V2
|
||||
fight_V2 = ggieled_GLD_6_8074_V ;
|
||||
find_V2 = sab_SJB_1_9779_V ;
|
||||
fingernail_N = mkN "difer" [] "difrejn" "dwiefer" [] ; -- pronSuffix
|
||||
fire_N = mkN "nar" "nirien" ;
|
||||
fish_N = mkNColl "ħut" ;
|
||||
@@ -119,11 +119,11 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
earth_N = mkN "art" "artijiet" feminine ;
|
||||
-- flow_V
|
||||
flower_N = mkN "fjura" ;
|
||||
-- fly_V
|
||||
fly_V = tar_TJR_1_9972_V ;
|
||||
fog_N = mkN [] "ċpar" [] [] [] ;
|
||||
foot_N = mk5N "sieq" [] "saqajn" "saqajn" [] feminine ; -- pronSuffix
|
||||
forest_N = mkN "foresta" ; -- also MASĠAR
|
||||
-- forget_V2
|
||||
forget_V2 = nesa_NSJ_1_9126_V ;
|
||||
-- freeze_V
|
||||
fridge_N = mkN "friġġ" "friġġijiet" ;
|
||||
friend_N = mkN "ħabib" "ħbieb" ; -- pronSuffix
|
||||
@@ -134,7 +134,7 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
girl_N = mkN "tifla" "tfal" ;
|
||||
-- give_V3
|
||||
glove_N = mkN "ingwanta" ;
|
||||
-- go_V
|
||||
go_V = mar_MWR_1_8918_V ;
|
||||
gold_N = mkN [] "deheb" [] "dehbijiet" [] ;
|
||||
good_A = mkA "tajjeb" "tajba" "tajbin" ;
|
||||
grammar_N = mkN "grammatika" ;
|
||||
@@ -147,13 +147,13 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
hat_N = mkN "kappell" "kpiepel" ;
|
||||
-- hate_V2
|
||||
head_N = mkN "ras" "rjus" feminine ; -- pronSuffix
|
||||
-- hear_V2
|
||||
hear_V2 = sema'_SMGH_1_9698_V ;
|
||||
heart_N = mkN "qalb" "qlub" feminine ; -- pronSuffix
|
||||
heavy_A = brokenA "tqil" "tqal" "itqal" ;
|
||||
hill_N = mkN "għolja" "għoljiet" ;
|
||||
-- hit_V2
|
||||
hit_V2 = laqat_LQT_1_8772_V ;
|
||||
-- hold_V2
|
||||
-- hope_VS
|
||||
hope_VS = xtaq_XWQ_8_10313_V ;
|
||||
horn_N = mkN "ħorn" "ħornijiet" ;
|
||||
horse_N = mkN "żiemel" "żwiemel" ;
|
||||
hot_A = brokenA "sħun" "sħan" ;
|
||||
@@ -164,9 +164,9 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
important_A = sameA "importanti" ;
|
||||
industry_N = mkN "industrija" ;
|
||||
iron_N = mk5N "ħadida" "ħadid" [] "ħadidiet" "ħdejjed" masculine ;
|
||||
-- john_PN
|
||||
-- jump_V
|
||||
-- kill_V2
|
||||
john_PN = mkPN "Ġanni" masculine singular ;
|
||||
jump_V = qabez_QBZ_1_9182_V ;
|
||||
kill_V2 = qatel_QTL_1_9312_V ;
|
||||
king_N = mkN "re" "rejjiet" ;
|
||||
knee_N = mkN "rkoppa" [] "rkopptejn" "rkoppiet" [] ; -- TODO use mkNDual -- pronSuffix
|
||||
-- know_V2
|
||||
@@ -175,29 +175,29 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
lake_N = mkN "għadira" "għadajjar" ;
|
||||
lamp_N = mkN "lampa" ;
|
||||
language_N = mkN "lingwa" ; -- lsien?
|
||||
-- laugh_V
|
||||
laugh_V = dahak_DHK_1_7688_V ;
|
||||
leaf_N = mkN "werqa" "weraq" "werqtejn" "werqiet" [] ;
|
||||
-- learn_V2
|
||||
learn_V2 = tghallem_GHLM_5_10527_V ;
|
||||
leather_N = mkN "ġilda" "ġild" [] "ġildiet" "ġlud" ; -- mkNColl "ġild" ;
|
||||
-- leave_V2
|
||||
leave_V2 = telaq_TLQ_1_9903_V ;
|
||||
-- left_Ord
|
||||
leg_N = mkN "riġel" [] "riġlejn" [] [] ; -- sieq? -- pronSuffix
|
||||
-- lie_V
|
||||
lie_V = mtedd_MDD_8_8816_V ;
|
||||
-- like_V2
|
||||
-- listen_V2
|
||||
-- live_V
|
||||
listen_V2 = sema'_SMGH_1_9698_V ;
|
||||
live_V = ghex_GHJX_1_10711_V ;
|
||||
liver_N = mkN "fwied" [] [] [] "ifdwa" ; -- pronSuffix
|
||||
long_A = brokenA "twil" "twal" "itwal" ;
|
||||
-- lose_V2
|
||||
lose_V2 = tilef_TLF_1_9895_V ;
|
||||
louse_N = mkN "qamla" "qamliet" ;
|
||||
love_N = mkN "mħabba" "mħabbiet" ; -- hmmm
|
||||
-- love_V2
|
||||
love_V2 = habb_HBB_1_8174_V ;
|
||||
man_N = mkN "raġel" "rġiel" ;
|
||||
-- married_A2
|
||||
meat_N = mkN "laħam" [] [] "laħmiet" "laħmijiet" ;
|
||||
milk_N = mkN [] "ħalib" [] "ħalibijiet" "ħlejjeb" ;
|
||||
moon_N = mkN "qamar" "oqmra" ; -- qmura?
|
||||
mother_N2 = mkN2 (mkN "omm" "ommijiet" feminine) (mkPrep "ta'") ; -- pronSuffix
|
||||
mother_N2 = mkN2 (mkN "omm" "ommijiet" feminine) ; -- pronSuffix
|
||||
mountain_N = mkN "muntanja" ;
|
||||
mouth_N = mkN "ħalq" "ħluq" ; -- pronSuffix
|
||||
music_N = mkN "musika" ; -- plural?
|
||||
@@ -213,7 +213,7 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
number_N = mkN "numru" ;
|
||||
oil_N = mkN "żejt" "żjut" ;
|
||||
old_A = brokenA "qadim" "qodma" "eqdem" ;
|
||||
-- open_V2
|
||||
open_V2 = fetah_FTH_1_7932_V ;
|
||||
-- paint_V2A
|
||||
paper_N = mkN "karta" ;
|
||||
-- paris_PN
|
||||
@@ -222,20 +222,20 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
person_N = mk5N [] "persuna" [] "persuni" [] masculine ;
|
||||
planet_N = mkN "pjaneta" ;
|
||||
plastic_N = mkNNoPlural "plastik" ;
|
||||
-- play_V
|
||||
-- play_V2
|
||||
play_V = laghab_LGHB_1_8724_V ;
|
||||
play_V2 = daqq_DQQ_1_7736_V ;
|
||||
policeman_N = mkNNoPlural "pulizija" ;
|
||||
priest_N = mkN "qassis" "qassisin" ;
|
||||
-- probable_AS
|
||||
-- pull_V2
|
||||
pull_V2 = gibed_GBD_1_8043_V ;
|
||||
-- push_V2
|
||||
-- put_V2
|
||||
put_V2 = qieghed_QGHD_3_9212_V ;
|
||||
queen_N = mkN "reġina" "rġejjen" ;
|
||||
question_N = mkN "mistoqsija" "mistoqsijiet" ; -- domanda?
|
||||
radio_N = mkN "radju" "radjijiet" ;
|
||||
rain_N = mkNNoPlural "xita" ;
|
||||
-- rain_V0
|
||||
-- read_V2
|
||||
read_V2 = qara_QRJ_1_9350_V ;
|
||||
ready_A = regA "lest" ;
|
||||
reason_N = mkN "raġun" "raġunijiet" ;
|
||||
red_A = mkA "aħmar" "ħamra" "ħomor" ;
|
||||
@@ -253,20 +253,20 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
-- rub_V2
|
||||
rubber_N = mkN "gomma" "gomom" ;
|
||||
rule_N = mkN "regola" ;
|
||||
-- run_V
|
||||
run_V = gera_GRJ_1_8131_V ;
|
||||
salt_N = mkN "melħ" "melħiet" ;
|
||||
sand_N = mkN "ramla" "ramel" [] "ramliet" "rmiel" ;
|
||||
-- say_VS
|
||||
school_N = mkN "skola" "skejjel" ;
|
||||
science_N = mkN "xjenza" ;
|
||||
-- scratch_V2
|
||||
scratch_V2 = barax_BRX_1_7504_V ;
|
||||
sea_N = mkN "baħar" [] "baħrejn" "ibħra" [] ;
|
||||
-- see_V2
|
||||
seed_N = mkN "żerriegħa" "żerrigħat" ;
|
||||
-- seek_V2
|
||||
-- sell_V3
|
||||
-- send_V3
|
||||
-- sew_V
|
||||
seek_V2 = fittex_FTX_2_7952_V ;
|
||||
sell_V3 = biegh_BJGH_1_7565_V ;
|
||||
send_V3 = baghat_BGHT_1_7412_V ;
|
||||
sew_V = hat_HJT_1_8508_V ;
|
||||
sharp_A = mkA "jaqta" "taqta" "jaqtgħu" ; -- TODO: apostrophe?
|
||||
sheep_N = mkN "nagħġa" "nagħaġ" [] "nagħġiet" [] ;
|
||||
ship_N = mkN "vapur" ;
|
||||
@@ -275,14 +275,14 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
shop_N = mkN "ħanut" "ħwienet" ;
|
||||
short_A = brokenA "qasir" "qosra" "iqsar" ;
|
||||
silver_N = mkN "fidda" "fided" ;
|
||||
-- sing_V
|
||||
sing_V = kanta_KNTJ_1_7016_V ;
|
||||
sister_N = mkN "oħt" "aħwa" feminine ; -- pronSuffix
|
||||
-- sit_V
|
||||
sit_V = pogga_PGJ_2_9157_V ;
|
||||
skin_N = mkN "ġilda" "ġildiet" ;
|
||||
sky_N = mkN "sema" "smewwiet" masculine ;
|
||||
-- sleep_V
|
||||
sleep_V = mkV "raqad" (mkRoot "r-q-d") ;
|
||||
small_A = brokenA "zgħir" "zgħar" "iżgħar" ;
|
||||
-- smell_V
|
||||
smell_V = xamm_XMM_1_10207_V ;
|
||||
smoke_N = mkN "duħħan" "dħaħen" ;
|
||||
smooth_A = regA "lixx" ;
|
||||
snake_N = mkN "serp" "sriep" ;
|
||||
@@ -290,72 +290,72 @@ concrete LexiconMlt of Lexicon = CatMlt **
|
||||
sock_N = mkN "kalzetta" ;
|
||||
song_N = mkN "kanzunetta" ;
|
||||
-- speak_V2
|
||||
-- spit_V
|
||||
-- split_V2
|
||||
spit_V = bezaq_BZQ_1_7549_V ;
|
||||
split_V2 = qasam_QSM_1_9292_V ;
|
||||
-- squeeze_V2
|
||||
-- stab_V2
|
||||
stab_V2 = mewwes_MWS_2_8921_V ;
|
||||
-- stand_V
|
||||
star_N = mkN "stilla" "stilel" ;
|
||||
steel_N = mkNNoPlural "azzar" ;
|
||||
stick_N = mkN "lasta" ;
|
||||
stone_N = mkN "ġebla" "ġebel" [] "ġebliet" "ġbiel" ;
|
||||
-- stop_V
|
||||
stop_V = waqaf_WQF_1_10067_V ;
|
||||
stove_N = mkN "kuker" "kukers" ; -- fuklar?
|
||||
straight_A = regA "dritt" ;
|
||||
student_N = mkN "student" ;
|
||||
stupid_A = mkA "iblah" "belha" "boloh" ; -- these are really nouns...
|
||||
-- suck_V2
|
||||
suck_V2 = rada'_RDGH_1_9388_V ;
|
||||
sun_N = mkN "xemx" "xmux" feminine ;
|
||||
-- swell_V
|
||||
-- swim_V
|
||||
-- switch8off_V2
|
||||
-- switch8on_V2
|
||||
swell_V = ntefah_NFH_8_8970_V ;
|
||||
swim_V = gham_GHWM_1_10750_V ;
|
||||
switch8off_V2 = tefa_TFJ_1_9960_V ;
|
||||
switch8on_V2 = xeghel_XGHL_1_10155_V ;
|
||||
table_N = mkN "mejda" "mwejjed" ;
|
||||
tail_N = mkN "denb" "dnieb" ; -- pronSuffix
|
||||
-- talk_V3
|
||||
-- teach_V2
|
||||
teach_V2 = ghallem_GHLM_2_10526_V ;
|
||||
teacher_N = mkN "għalliem" "għalliema" ; -- għalliema ?
|
||||
television_N = mkN "televixin" "televixins" ;
|
||||
thick_A = mkA "oħxon" "ħoxna" "ħoxnin" "eħxen" ;
|
||||
thin_A = brokenA "rqiq" "rqaq" "rqaq" ;
|
||||
-- think_V
|
||||
-- throw_V2
|
||||
-- tie_V2
|
||||
think_V = haseb_HSB_1_8387_V ;
|
||||
throw_V2 = waddab_WDB_2_10027_V ;
|
||||
tie_V2 = qafel_QFL_1_9206_V ;
|
||||
-- today_Adv
|
||||
tongue_N = mkN "lsien" "ilsna" ; -- pronSuffix
|
||||
tooth_N = mkN "sinna" [] [] "sinniet" "snien" ; -- darsa? -- pronSuffix
|
||||
train_N = mkN "ferrovija" ;
|
||||
-- travel_V
|
||||
tree_N = mkN "siġra" "siġar" [] "siġriet" [] ;
|
||||
-- turn_V
|
||||
turn_V = dar_DWR_1_7803_V ;
|
||||
ugly_A = mkA "ikrah" "kerha" "koroh" ; -- ikreh?
|
||||
uncertain_A = regA "inċert" ;
|
||||
-- understand_V2
|
||||
-- understand_V2 --- missing from dict
|
||||
university_N = mkN "università" "universitàjiet" ;
|
||||
village_N = mkN "raħal" "rħula" ; -- villaġġ ? -- pronSuffix
|
||||
-- vomit_V
|
||||
vomit_V = qala'_QLGH_1_9223_V ;
|
||||
-- wait_V2
|
||||
-- walk_V
|
||||
walk_V = mexa_MXJ_1_8926_V ;
|
||||
war_N = mkN "gwerra" "gwerrer" ;
|
||||
warm_A = hot_A ;
|
||||
-- wash_V2
|
||||
wash_V2 = hasel_HSL_1_8395_V ;
|
||||
-- watch_V2
|
||||
water_N = mkN "ilma" "ilmijiet" masculine ;
|
||||
wet_A = mkA "mxarrab" "mxarrba" "mxarrbin" ;
|
||||
white_A = mkA "abjad" "bajda" "bojod" ;
|
||||
wide_A = broad_A ;
|
||||
wife_N = mkN "mara" "nisa" ; -- pronSuffix MARTI
|
||||
-- win_V2
|
||||
win_V2 = rebah_RBH_1_9371_V ;
|
||||
wind_N = mkN "riħ" [] [] "rjieħ" "rjiħat" ;
|
||||
window_N = mkN "tieqa" "twieqi" ;
|
||||
wine_N = mkN [] "nbid" [] [] "nbejjed" ;
|
||||
wing_N = mkN "ġewnaħ" "ġwienaħ" ;
|
||||
-- wipe_V2
|
||||
wipe_V2 = mesah_MSH_1_8881_V ;
|
||||
woman_N = mkN "mara" "nisa" ;
|
||||
-- wonder_VQ
|
||||
wood_N = mkN "injam" "injamiet" ;
|
||||
worm_N = mkN "dudu" "dud" [] "dudiet" "dwied" ; -- duda
|
||||
-- write_V2
|
||||
write_V2 = kiteb_KTB_1_8641_V ;
|
||||
year_N = mkN "sena" [] "sentejn" "snin" [] ; -- pronSuffix SNINI (only plural though!)
|
||||
yellow_A = mkA "isfar" "safra" "sofor" ;
|
||||
young_A = small_A ;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,22 +12,17 @@ concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {
|
||||
lin
|
||||
-- Det -> CN -> NP
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ++ cn.s ! numnum2nounnum det.n ! NRegular ;
|
||||
s = \\c => det.s ++ cn.s ! numnum2nounnum det.n ;
|
||||
a = case (numnum2nounnum det.n) of {
|
||||
Singular _ => AgP3Sg cn.g ;
|
||||
_ => AgP3Pl
|
||||
}
|
||||
-- s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ;
|
||||
-- a = agrgP3 det.n cn.g
|
||||
Singular _ => mkAgr cn.g Sg P3 ;
|
||||
_ => mkAgr cn.g Pl P3
|
||||
} ;
|
||||
isPron = False ;
|
||||
} ;
|
||||
|
||||
-- Quant -> Num -> Det
|
||||
DetQuant quant num = {
|
||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! NumNominative;
|
||||
-- sp = \\c => case num.hasCard of {
|
||||
-- False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ;
|
||||
-- True => quant.sp ! num.hasCard ! num.n ! npNom ++ num.s ! npcase2case c
|
||||
-- } ;
|
||||
n = num.n ;
|
||||
hasNum = num.hasCard
|
||||
} ;
|
||||
@@ -35,18 +30,37 @@ concrete NounMlt of Noun = CatMlt ** open ResMlt, Prelude in {
|
||||
-- Quant
|
||||
DefArt = {
|
||||
s = \\hasCard,n => artDef ;
|
||||
-- sp = \\hasCard,n => case <n,hasCard> of {
|
||||
-- <Sg,False> => table { NCase Gen => "its"; _ => "it" } ;
|
||||
-- <Pl,False> => table { NCase Nom => "they"; NPAcc => "them"; NCase Gen => "theirs" } ;
|
||||
-- _ => \\c => artDef
|
||||
-- }
|
||||
} ;
|
||||
IndefArt = {
|
||||
s = \\hasCard,n => artIndef ;
|
||||
} ;
|
||||
|
||||
-- PN -> NP
|
||||
UsePN pn = {
|
||||
s = \\c => pn.s ;
|
||||
a = pn.a ;
|
||||
isPron = False ;
|
||||
} ;
|
||||
|
||||
-- Pron -> NP
|
||||
UsePron p = {
|
||||
-- s = \\npcase => (p.s ! Personal).c1 ;
|
||||
s = table {
|
||||
Nom => (p.s ! Personal).c1 ;
|
||||
CPrep => (p.s ! Suffixed Acc).c1
|
||||
} ;
|
||||
a = p.a ;
|
||||
isPron = True ;
|
||||
} ;
|
||||
|
||||
-- Num
|
||||
NumSg = {s = \\c => []; n = Num_Sg ; hasCard = False} ;
|
||||
NumPl = {s = \\c => []; n = Num_Pl ; hasCard = False} ;
|
||||
|
||||
-- N -> CN
|
||||
UseN n = n ;
|
||||
|
||||
-- N2 -> CN
|
||||
UseN2 n = n ;
|
||||
|
||||
-- Card
|
||||
|
||||
@@ -20,7 +20,7 @@ resource ParadigmsMlt = open
|
||||
|
||||
oper
|
||||
|
||||
{- ===== Parameters ===== -}
|
||||
{- Parameters --------------------------------------------------------- -}
|
||||
|
||||
-- Abstraction over gender names
|
||||
Gender : Type ;
|
||||
@@ -31,7 +31,10 @@ resource ParadigmsMlt = open
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
|
||||
{- ===== Noun Paradigms ===== -}
|
||||
singular : Number = Sg ;
|
||||
plural : Number = Pl ;
|
||||
|
||||
{- Noun paradigms ----------------------------------------------------- -}
|
||||
|
||||
-- Helper function for inferring noun plural from singulative
|
||||
-- Nouns with collective & determinate forms should not use this...
|
||||
@@ -177,19 +180,17 @@ resource ParadigmsMlt = open
|
||||
-- gender = inferNounGender sing ;
|
||||
gender = Masc ; -- Collective noun is always treated as Masculine
|
||||
in
|
||||
mk5N sing coll [] det [] gender ;
|
||||
mk5N sing coll [] det [] gender ;
|
||||
|
||||
-- Build a noun using 5 forms, and a gender
|
||||
mk5N : (_,_,_,_,_ : Str) -> Gender -> N ;
|
||||
mk5N = \sing,coll,dual,det,ind,gen ->
|
||||
-- lin N (mkNoun sing coll dual det ind gen) ;
|
||||
lin N (mkNoun
|
||||
(nullSuffixTable sing)
|
||||
(nullSuffixTable coll)
|
||||
(nullSuffixTable dual)
|
||||
(nullSuffixTable det)
|
||||
(nullSuffixTable ind)
|
||||
gen) ;
|
||||
mk5N = \sing,coll,dual,det,ind,gen -> lin N (mkNoun sing coll dual det ind gen) ;
|
||||
|
||||
-- Make a proper noun
|
||||
mkPN : Str -> Gender -> Number -> ProperNoun = \name,g,n -> {
|
||||
s = name ;
|
||||
a = mkAgr g n P3 ;
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- Correctly abbreviate definite prepositions and join with noun
|
||||
@@ -253,7 +254,6 @@ resource ParadigmsMlt = open
|
||||
|
||||
});
|
||||
|
||||
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> Prep -> N2 = prepN2 ;
|
||||
mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPrep s);
|
||||
@@ -272,140 +272,30 @@ resource ParadigmsMlt = open
|
||||
noPrep = mkPrep [] ;
|
||||
|
||||
|
||||
{- ===== Verb paradigms ===== -}
|
||||
{-
|
||||
-- Takes a verb as a string determined derived form
|
||||
-- Params: "Mamma" (Perf Per3 Sg Masc) as string (eg KITEB or ĦAREĠ)
|
||||
classifyDerivedVerb : Str -> Root -> Pattern -> VDerivedForm = \mamma,root,patt ->
|
||||
case mamma of {
|
||||
{- Verb paradigms ----------------------------------------------------- -}
|
||||
|
||||
-- Form I
|
||||
--- form III verbs with long A's will get incorrectly classified as I, e.g. ĦÂRES : impossible to detect!
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + v2@#Vowel + c3@#Consonant => FormI ; -- FETAĦ
|
||||
|
||||
-- Form II
|
||||
-- c2 and c3 are equal
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + c3@#Consonant + v2@#Vowel + c4@#Consonant => -- FETTAĦ
|
||||
if_then_else VDerivedForm (pbool2bool (eqStr c2 c3)) FormII FormUnknown ;
|
||||
|
||||
-- Form III
|
||||
-- v1 is long --- anything with v1==a would have already been caught above
|
||||
c1@#Consonant + v1@("a"|"ie") + c2@#Consonant + v2@#Vowel + c3@#Consonant =>
|
||||
case <v1, patt.V1> of {
|
||||
-- <"a","a"> => FormI ; -- no vowel change; ĦAREĠ
|
||||
-- <"a",_> => FormIII ; -- ĦARES > ĦÂRES --- impossible to detect!
|
||||
<"ie","ie"> => FormI ; -- no vowel change; MIET
|
||||
_ => FormIII -- QAGĦAD > QIEGĦED
|
||||
} ;
|
||||
|
||||
-- Form IV
|
||||
"wera" => FormIV ;
|
||||
"għama" => FormIV ;
|
||||
"għana" => FormIV ;
|
||||
|
||||
-- Form V
|
||||
-- c0 is T, OR c0 and c1 are equal
|
||||
-- c2 and c3 are equal
|
||||
"t" + c1@#Consonant + v1@#Vowel + c2@#Consonant + c3@#Consonant + v2@#Vowel + c4@#Consonant => -- TWAQQAF
|
||||
if_then_else VDerivedForm (pbool2bool (eqStr c2 c3)) FormV FormUnknown ;
|
||||
c0@#DoublingConsT + c1@#DoublingConsT + v1@#Vowel + c2@#Consonant + c3@#Consonant + v2@#Vowel + c4@#Consonant => -- SARRAF
|
||||
if_then_else
|
||||
VDerivedForm
|
||||
(andB (pbool2bool (eqStr c0 c1)) (pbool2bool (eqStr c2 c3)))
|
||||
FormV FormUnknown ;
|
||||
|
||||
-- Form VI
|
||||
-- c0 is T, OR c0 and c1 are equal
|
||||
-- v1 is long
|
||||
"t" + c1@#Consonant + v1@("a"|"ie") + c2@#Consonant + v2@#Vowel + c3@#Consonant => FormVI ; -- TQIEGĦED
|
||||
c0@#DoublingConsT + c1@#DoublingConsT + v1@("a"|"ie") + c2@#Consonant + v2@#Vowel + c3@#Consonant => -- ĠĠIELED
|
||||
if_then_else VDerivedForm (pbool2bool (eqStr c0 c1)) FormVI FormUnknown ;
|
||||
|
||||
-- Form VII
|
||||
-- c0 is N, OR c0 is NT, OR c0 is N-T
|
||||
"n" + c1@#Consonant + v1@#Vowel + c2@#Consonant + v2@#Vowel + c3@#Consonant => FormVII ; -- NĦASEL
|
||||
"nt" + c1@#Consonant + _ => FormVII ; -- NTQAL
|
||||
"nt" + c1@#Vowel + _ => case root.C1 of {
|
||||
"n" => FormVIII ; -- NTESA (N-S-J)
|
||||
_ => FormVII -- NTIŻEN (W-Ż-N)
|
||||
} ;
|
||||
"nst" + _ => FormVII ; -- NSTAB
|
||||
"nxt" + _ => FormVII ; -- NXTAMM
|
||||
|
||||
-- Form VIII
|
||||
-- c2 is T
|
||||
c1@#Consonant + "t" + v1@#Vowel + c3@#Consonant + _ =>
|
||||
case <c1, root.C1> of {
|
||||
<"s", "s"> => FormVIII ; -- STABAT (S-B-T)
|
||||
<"s", _> => FormX ; -- STAĦBA (Ħ-B-A)
|
||||
_ => FormVIII -- MTEDD, XTEĦET
|
||||
} ;
|
||||
|
||||
-- Form IX
|
||||
c1@#Consonant + c2@#Consonant + v1@("a"|"ie") + c3@#Consonant => FormIX ; -- SFAR, BLIEH
|
||||
|
||||
-- Form X
|
||||
"st" + v1@#Vowel + c2@#Consonant + c2@#Consonant + _ => FormX ; -- STAGĦĠEB, STAQSA
|
||||
|
||||
-- boqq
|
||||
_ => FormUnknown
|
||||
-- Re-export ResMlt.mkRoot
|
||||
mkRoot : Root = overload {
|
||||
mkRoot : Root = ResMlt.mkRoot ;
|
||||
mkRoot : Str -> Root = \s0 -> ResMlt.mkRoot s0 ;
|
||||
mkRoot : Str -> Str -> Str -> Root = \s0,s1,s2 -> ResMlt.mkRoot s0 s1 s2 ;
|
||||
mkRoot : Str -> Str -> Str -> Str -> Root = \s0,s1,s2,s3 -> ResMlt.mkRoot s0 s1 s2 s3 ;
|
||||
} ;
|
||||
-}
|
||||
-- Takes a verb as a string and returns the VType and root/pattern.
|
||||
-- Used in smart paradigm below and elsewhere.
|
||||
-- Params: "Mamma" (Perf Per3 Sg Masc) as string (eg KITEB or ĦAREĠ)
|
||||
classifyVerb : Str -> VerbInfo = \mamma ->
|
||||
case mamma of {
|
||||
|
||||
-- Defective, BELA'
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + v2@#Vowel + c3@( "għ" | "'" ) =>
|
||||
mkVerbInfo (Weak Defective) FormI (mkRoot c1 c2 "għ") (mkPattern v1 v2) ;
|
||||
|
||||
-- Lacking, MEXA
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + v2@#Vowel =>
|
||||
mkVerbInfo (Weak Lacking) FormI (mkRoot c1 c2 "j") (mkPattern v1 v2) ;
|
||||
|
||||
-- Hollow, SAB
|
||||
-- --- determining of middle radical is not right, e.g. SAB = S-J-B
|
||||
c1@#Consonant + v1@"a" + c3@#Consonant =>
|
||||
mkVerbInfo (Weak Hollow) FormI (mkRoot c1 "w" c3) (mkPattern v1) ;
|
||||
c1@#Consonant + v1@"ie" + c3@#Consonant =>
|
||||
mkVerbInfo (Weak Hollow) FormI (mkRoot c1 "j" c3) (mkPattern v1) ;
|
||||
|
||||
-- Weak Assimilative, WAQAF
|
||||
c1@#WeakCons + v1@#Vowel + c2@#Consonant + v2@#Vowel + c3@#Consonant =>
|
||||
mkVerbInfo (Weak Assimilative) FormI (mkRoot c1 c2 c3) (mkPattern v1 v2) ;
|
||||
|
||||
-- Strong Geminated, ĦABB --- no checking that c2 and c3 are actually equal
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + c3@#Consonant =>
|
||||
mkVerbInfo (Strong Geminated) FormI (mkRoot c1 c2 c3) (mkPattern v1) ;
|
||||
|
||||
-- Strong LiquidMedial, ŻELAQ
|
||||
c1@#Consonant + v1@#Vowel + c2@(#LiquidCons | "għ") + v2@#Vowel + c3@#Consonant =>
|
||||
mkVerbInfo (Strong LiquidMedial) FormI (mkRoot c1 c2 c3) (mkPattern v1 v2) ;
|
||||
|
||||
-- Strong Regular, QATEL
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + v2@#Vowel + c3@#Consonant =>
|
||||
mkVerbInfo (Strong Regular) FormI (mkRoot c1 c2 c3) (mkPattern v1 v2) ;
|
||||
|
||||
-- Strong Quad, QAĊĊAT
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + c3@#Consonant + v2@#Vowel + c4@#Consonant =>
|
||||
mkVerbInfo (Quad QStrong) FormI (mkRoot c1 c2 c3 c4) (mkPattern v1 v2) ;
|
||||
|
||||
-- Weak-Final Quad, PINĠA
|
||||
c1@#Consonant + v1@#Vowel + c2@#Consonant + c3@#Consonant + v2@#Vowel =>
|
||||
mkVerbInfo (Quad QWeak) FormI (mkRoot c1 c2 c3 "j") (mkPattern v1 v2) ;
|
||||
|
||||
-- Assume it is a loan verb
|
||||
_ => mkVerbInfo Loan FormUnknown
|
||||
-- Re-export ResMlt.mkPattern
|
||||
mkPattern : Pattern = overload {
|
||||
mkPattern : Pattern = ResMlt.mkPattern ;
|
||||
mkPattern : Str -> Pattern = \s0 -> ResMlt.mkPattern s0 ;
|
||||
mkPattern : Str -> Str -> Pattern = \s0,s1 -> ResMlt.mkPattern s0 s1 ;
|
||||
} ;
|
||||
|
||||
-- Return the class for a given root
|
||||
classifyRoot : Root -> VClass = \r ->
|
||||
case <r.C1,r.C2,r.C3,r.C4> of {
|
||||
<#WeakCons, #Consonant, #Consonant, ""> => Weak Assimilative ;
|
||||
<#Consonant, #WeakCons, #Consonant, ""> => Weak Hollow ;
|
||||
<#Consonant, #Consonant, #WeakCons, ""> => Weak Lacking ;
|
||||
<#WeakCons, #StrongCons, #StrongCons, ""> => Weak Assimilative ;
|
||||
<#StrongCons, #WeakCons, #StrongCons, ""> => Weak Hollow ;
|
||||
<#StrongCons, #StrongCons, #WeakCons, ""> => Weak Lacking ;
|
||||
<#StrongCons, #WeakCons, #WeakCons, ""> => Weak Lacking ;
|
||||
<#Consonant, #Consonant, "għ", ""> => Weak Defective ;
|
||||
<#Consonant, c2@#Consonant, c3@#Consonant, ""> =>
|
||||
if_then_else VClass (pbool2bool (eqStr c2 c3))
|
||||
@@ -416,91 +306,70 @@ resource ParadigmsMlt = open
|
||||
}) ;
|
||||
<#Consonant, #Consonant, #Consonant, #WeakCons> => Quad QWeak ;
|
||||
<#Consonant, #Consonant, #Consonant, #Consonant> => Quad QStrong ;
|
||||
_ => Predef.error("Cannot classify root: "++r.C1++"-"++r.C2++"-"++r.C3++"-"++r.C4) --- this should never happen
|
||||
|
||||
-- Irregular
|
||||
<"'",_,_,_> => Irregular ;
|
||||
<_,"'",_,_> => Irregular ;
|
||||
<_,_,"'",_> => Irregular ;
|
||||
<_,_,_,"'"> => Irregular ;
|
||||
|
||||
<_,_,_,""> => Predef.error("Cannot classify root:"++r.C1+"-"+r.C2+"-"+r.C3) ;
|
||||
<_,_,_,_> => Predef.error("Cannot classify root:"++r.C1+"-"+r.C2+"-"+r.C3+"-"+r.C4)
|
||||
} ;
|
||||
|
||||
-- Just get the non-suffixed forms of a verb, for quick testing
|
||||
plainVerbTable : V -> (VForm => Str) = \v ->
|
||||
\\tense => v.s ! tense ! VSuffixNone ! Pos ;
|
||||
-- plainVerbTable : V -> (VForm => Str) = \v ->
|
||||
-- \\tense => v.s ! tense ! VSuffixNone ! Pos ;
|
||||
|
||||
-- Smart paradigm for building a verb
|
||||
mkV : V = overload {
|
||||
|
||||
-- Tries to do everything just from the mamma of the verb
|
||||
-- With no root, automatically treat as loan verb
|
||||
-- Params: mamma
|
||||
mkV : Str -> V = \mamma ->
|
||||
let
|
||||
info = classifyVerb mamma ;
|
||||
in
|
||||
case info.class of {
|
||||
Strong Regular => strongV info.root info.patt ;
|
||||
Strong LiquidMedial => liquidMedialV info.root info.patt ;
|
||||
Strong Geminated => geminatedV info.root info.patt ;
|
||||
Weak Assimilative => assimilativeV info.root info.patt ;
|
||||
Weak Hollow => hollowV info.root info.patt ;
|
||||
Weak Lacking => lackingV info.root info.patt ;
|
||||
Weak Defective => defectiveV info.root info.patt ;
|
||||
Quad QStrong => quadV info.root info.patt ;
|
||||
Quad QWeak => quadWeakV info.root info.patt ;
|
||||
Loan => loanV mamma
|
||||
} ;
|
||||
mkV : Str -> V = loanV ;
|
||||
|
||||
-- Takes an explicit root, when it is not obvious from the mamma
|
||||
-- Take an explicit root, implying it is a root & pattern verb
|
||||
-- Params: mamma, root
|
||||
mkV : Str -> Root -> V = \mamma,root ->
|
||||
let
|
||||
info = classifyVerb mamma ;
|
||||
class : VClass = classifyRoot root ;
|
||||
patt : Pattern = extractPattern mamma ;
|
||||
in
|
||||
case info.class of {
|
||||
Strong Regular => strongV root info.patt ;
|
||||
Strong LiquidMedial => liquidMedialV root info.patt ;
|
||||
Strong Geminated => geminatedV root info.patt ;
|
||||
Weak Assimilative => assimilativeV root info.patt ;
|
||||
Weak Hollow => hollowV root info.patt ;
|
||||
Weak Lacking => lackingV root info.patt ;
|
||||
Weak Defective => defectiveV root info.patt ;
|
||||
Quad QStrong => quadV root info.patt ;
|
||||
Quad QWeak => quadWeakV root info.patt ;
|
||||
Loan => loanV mamma
|
||||
case class of {
|
||||
Strong Regular => strongV root patt ;
|
||||
Strong LiquidMedial => liquidMedialV root patt ;
|
||||
Strong Geminated => geminatedV root patt ;
|
||||
Weak Assimilative => assimilativeV root patt ;
|
||||
Weak Hollow => hollowV root patt ;
|
||||
Weak Lacking => lackingV root patt ;
|
||||
Weak Defective => defectiveV root patt ;
|
||||
Quad QStrong => quadV root patt ;
|
||||
Quad QWeak => quadWeakV root patt ;
|
||||
Irregular => Predef.error("Cannot use smart paradigm for irregular verb:"++mamma) ;
|
||||
Loan => loanV mamma --- this should probably be an error
|
||||
} ;
|
||||
|
||||
-- Takes takes an Imperative of the word for when it behaves less predictably
|
||||
-- Params: mamma, imperative P2Sg
|
||||
mkV : Str -> Str -> V = \mamma,imp_sg ->
|
||||
-- Params: mamma, imperative P2Sg, root
|
||||
mkV : Str -> Str -> Root -> V = \mamma,imp_sg,root ->
|
||||
let
|
||||
info = classifyVerb mamma ;
|
||||
class : VClass = classifyRoot root ;
|
||||
patt : Pattern = extractPattern mamma ;
|
||||
in
|
||||
case info.class of {
|
||||
Strong Regular => strongV info.root info.patt imp_sg ;
|
||||
Strong LiquidMedial => liquidMedialV info.root info.patt imp_sg ;
|
||||
Strong Geminated => geminatedV info.root info.patt imp_sg ;
|
||||
Weak Assimilative => assimilativeV info.root info.patt imp_sg ;
|
||||
Weak Hollow => hollowV info.root info.patt imp_sg ;
|
||||
Weak Lacking => lackingV info.root info.patt imp_sg ;
|
||||
Weak Defective => defectiveV info.root info.patt imp_sg ;
|
||||
Quad QStrong => quadV info.root info.patt imp_sg ;
|
||||
Quad QWeak => quadWeakV info.root info.patt imp_sg ;
|
||||
case class of {
|
||||
Strong Regular => strongV root patt imp_sg ;
|
||||
Strong LiquidMedial => liquidMedialV root patt imp_sg ;
|
||||
Strong Geminated => geminatedV root patt imp_sg ;
|
||||
Weak Assimilative => assimilativeV root patt imp_sg ;
|
||||
Weak Hollow => hollowV root patt imp_sg ;
|
||||
Weak Lacking => lackingV root patt imp_sg ;
|
||||
Weak Defective => defectiveV root patt imp_sg ;
|
||||
Quad QStrong => quadV root patt imp_sg ;
|
||||
Quad QWeak => quadWeakV root patt imp_sg ;
|
||||
Irregular => Predef.error("Cannot use smart paradigm for irregular verb:"++mamma) ;
|
||||
Loan => loanV mamma
|
||||
} ;
|
||||
|
||||
-- Params: mamma, root, imperative P2Sg
|
||||
-- mkV : Str -> Root -> Str -> V = \mamma,root,imp_sg ->
|
||||
-- let
|
||||
-- info = classifyVerb mamma ;
|
||||
-- in
|
||||
-- case info.class of {
|
||||
-- Strong Regular => strongV root info.patt imp_sg ;
|
||||
-- Strong LiquidMedial => liquidMedialV root info.patt imp_sg ;
|
||||
-- Strong Geminated => geminatedV root info.patt imp_sg ;
|
||||
-- Weak Assimilative => assimilativeV root info.patt imp_sg ;
|
||||
-- Weak Hollow => hollowV root info.patt imp_sg ;
|
||||
-- Weak Lacking => lackingV root info.patt imp_sg ;
|
||||
-- Weak Defective => defectiveV root info.patt imp_sg ;
|
||||
-- Quad QStrong => quadV root info.patt imp_sg ;
|
||||
-- Quad QWeak => quadWeakV root info.patt imp_sg ;
|
||||
-- Loan => loanV mamma
|
||||
-- } ;
|
||||
|
||||
-- All forms! :S
|
||||
-- mkV (Strong Regular) (FormI) (mkRoot "k-t-b") (mkPattern "i" "e") "ktibt" "ktibt" "kiteb" "kitbet" "ktibna" "ktibtu" "kitbu" "nikteb" "tikteb" "jikteb" "tikteb" "niktbu" "tiktbu" "jiktbu" "ikteb" "iktbu"
|
||||
mkV : VClass -> VDerivedForm -> Root -> Pattern -> (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> V =
|
||||
@@ -529,47 +398,35 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo class form root patt impSg ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
} ; --end of mkV overload
|
||||
|
||||
-- Some shortcut function names (haven't decided on naming yet)
|
||||
mkV_II : Str -> V = \s -> derivedV_II s ;
|
||||
mkV_III : Str -> V = \s -> derivedV_III s ;
|
||||
mkV_V : Str -> V = \s -> derivedV_V s ;
|
||||
mkV_VI : Str -> V = \s -> derivedV_VI s ;
|
||||
mkV_VII : Str -> Str -> V = \s,t -> derivedV_VII s t ;
|
||||
mkV_VIII : Str -> V = \s -> derivedV_VIII s ;
|
||||
mkV_IX : Str -> V = \s -> derivedV_IX s ;
|
||||
mkV_X : Str -> Str -> V = \s,t -> derivedV_X s t ;
|
||||
derivedV_I : Str -> V = mkV ;
|
||||
mkV_II = overload {
|
||||
mkV_II : Str -> Root -> V = \s,r -> derivedV_II s r ;
|
||||
mkV_II : Str -> Str -> Root -> V = \s,i,r -> derivedV_II s i r ;
|
||||
} ;
|
||||
mkV_III : Str -> Root -> V = \s,r -> derivedV_III s r ;
|
||||
mkV_V : Str -> Root -> V = \s,r -> derivedV_V s r ;
|
||||
mkV_VI : Str -> Root -> V = \s,r -> derivedV_VI s r ;
|
||||
mkV_VII : Str -> Str -> Root -> V = \s,t,r -> derivedV_VII s t r ;
|
||||
mkV_VIII : Str -> Root -> V = \s,r -> derivedV_VIII s r ;
|
||||
mkV_IX : Str -> Root -> V = \s,r -> derivedV_IX s r ;
|
||||
mkV_X : Str -> Root -> V = \s,r -> derivedV_X s r ;
|
||||
derivedV_I : Str -> Root -> V = mkV ;
|
||||
|
||||
-- Make a Form II verb. Accepts both Tri & Quad roots, then delegates.
|
||||
-- e.g.: derivedV_II "waqqaf"
|
||||
derivedV_II : V = overload {
|
||||
derivedV_II : Str -> V = \mammaII ->
|
||||
case mammaII of {
|
||||
-- Quad Form II
|
||||
-- "t" + #Consonant + _ => derivedV_QuadII mammaII root4 ; -- TFIXKEL
|
||||
-- #DoublingConsT + #DoublingConsT + _ => derivedV_QuadII mammaII root4 ; -- DDARDAR
|
||||
#Consonant + #Consonant + _ => derivedV_QuadII mammaII root4 where {
|
||||
mammaI4 : Str = dropPfx 1 mammaII ;
|
||||
root4 : Root = (classifyVerb mammaI4).root ;
|
||||
} ; -- DDARDAR
|
||||
|
||||
-- Tri Form II
|
||||
_ => derivedV_TriII mammaII root3 where {
|
||||
mammaI3 : Str = delCharAt 3 mammaII ; --- this works because the only verb with a duplicated GĦ is ŻAGĦGĦAR (make smaller)
|
||||
root3 : Root = (classifyVerb mammaI3).root ;
|
||||
}
|
||||
} ;
|
||||
-- e.g.: derivedV_II "waqqaf" (mkRoot "w-q-f")
|
||||
derivedV_II : Str -> Root -> V = \mammaII, root ->
|
||||
case root.C4 of {
|
||||
"" => derivedV_TriII mammaII root ;
|
||||
_ => derivedV_QuadII mammaII root
|
||||
} ;
|
||||
-- e.g.: derivedV_II "waqqaf" "waqqaf" (mkRoot "w-q-f")
|
||||
derivedV_II : Str -> Str -> Root -> V = \mammaII, imp, root ->
|
||||
case root.C4 of {
|
||||
"" => derivedV_TriII mammaII root ;
|
||||
@@ -616,155 +473,129 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
|
||||
-- Make a Form III verb
|
||||
-- e.g.: derivedV_III "qiegħed"
|
||||
-- derivedV_III : V = overload {
|
||||
derivedV_III : Str -> V = \mammaIII ->
|
||||
let
|
||||
info : VerbInfo = classifyVerb (ie2i mammaIII) ;
|
||||
vowels : Pattern = extractPattern mammaIII ;
|
||||
vowels2 : Pattern = case <info.root, vowels> of { -- see {GO pg93}
|
||||
<{C2="għ"},{V1="ie";V2="e"}> => mkPattern "e" "i" ; -- QIEGĦED > QEGĦIDKOM
|
||||
<_,{V1="ie";V2="e"}> => mkPattern "i" "i" ; -- WIEĠEB > WIĠIBKOM
|
||||
_ => vowels
|
||||
} ;
|
||||
newinfo : VerbInfo = mkVerbInfo info.class FormIII info.root vowels vowels2 mammaIII ; --- assumption: mamma III is also imperative
|
||||
in lin V {
|
||||
s = conjFormIII newinfo ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- } ;
|
||||
-- e.g.: derivedV_III "qiegħed" (mkRoot "q-għ-d")
|
||||
derivedV_III : Str -> Root -> V = \mammaIII, root ->
|
||||
let
|
||||
vowels : Pattern = extractPattern mammaIII ;
|
||||
vowels2 : Pattern = vowelChangesIE root vowels ;
|
||||
class : VClass = classifyRoot root ;
|
||||
info : VerbInfo = mkVerbInfo class FormIII root vowels vowels2 mammaIII ; --- assumption: mamma III is also imperative
|
||||
in lin V {
|
||||
s = conjFormIII info ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
-- No point having a paradigm for Form IV
|
||||
-- derivedV_IV
|
||||
|
||||
-- Make a Form V verb
|
||||
-- e.g.: derivedV_V "twaqqaf"
|
||||
-- derivedV_V : V = overload {
|
||||
derivedV_V : Str -> V = \mammaV ->
|
||||
let
|
||||
-- use the Form II conjugation, just prefixing a T
|
||||
mammaII : Str = dropPfx 1 mammaV ; -- WAQQAF
|
||||
vII : V = derivedV_II mammaII ;
|
||||
newinfo : VerbInfo = mkVerbInfo vII.i.class FormV vII.i.root vII.i.patt mammaV ;
|
||||
in lin V {
|
||||
s = table {
|
||||
VPerf agr => \\suffix,pol => pfx_T (vII.s ! VPerf agr ! suffix ! pol) ;
|
||||
VImpf (AgP1 Sg) => \\suffix,pol => pfx "ni" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP1 Sg) ! suffix ! pol))) ;
|
||||
VImpf (AgP2 Sg) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP2 Sg) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Sg Masc) => \\suffix,pol => pfx "ji" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Sg Masc) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Sg Fem) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Sg Fem) ! suffix ! pol))) ;
|
||||
VImpf (AgP1 Pl) => \\suffix,pol => pfx "ni" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP1 Pl) ! suffix ! pol))) ;
|
||||
VImpf (AgP2 Pl) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP2 Pl) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Pl) => \\suffix,pol => pfx "ji" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Pl) ! suffix ! pol))) ;
|
||||
VImp num => \\suffix,pol => pfx_T (vII.s ! VImp num ! suffix ! pol)
|
||||
} ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- } ;
|
||||
-- e.g.: derivedV_V "twaqqaf" (mkRoot "w-q-f")
|
||||
derivedV_V : Str -> Root -> V = \mammaV, root ->
|
||||
let
|
||||
-- use the Form II conjugation, just prefixing a T
|
||||
mammaII : Str = dropPfx 1 mammaV ; -- WAQQAF
|
||||
vII : V = derivedV_II mammaII root ;
|
||||
info : VerbInfo = mkVerbInfo vII.i.class FormV vII.i.root vII.i.patt mammaV ;
|
||||
in lin V {
|
||||
s = table {
|
||||
VPerf agr => pfx_T (vII.s ! VPerf agr) ;
|
||||
VImpf (AgP1 Sg) => pfx "ni" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP1 Sg)))) ;
|
||||
VImpf (AgP2 Sg) => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP2 Sg)))) ;
|
||||
VImpf (AgP3Sg Masc) => pfx "ji" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Sg Masc)))) ;
|
||||
VImpf (AgP3Sg Fem) => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Sg Fem)))) ;
|
||||
VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP1 Pl)))) ;
|
||||
VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP2 Pl)))) ;
|
||||
VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (vII.s ! VImpf (AgP3Pl)))) ;
|
||||
VImp num => pfx_T (vII.s ! VImp num)
|
||||
} ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
-- Make a Form VI verb
|
||||
-- e.g.: derivedV_VI "tqiegħed"
|
||||
-- derivedV_VI : V = overload {
|
||||
derivedV_VI : Str -> V = \mammaVI ->
|
||||
let
|
||||
-- use the Form III conjugation, just prefixing a T
|
||||
mammaIII : Str = dropPfx 1 mammaVI ; -- QIEGĦED
|
||||
vIII : V = derivedV_III mammaIII ;
|
||||
newinfo : VerbInfo = updateVerbInfo vIII.i FormVI mammaVI ;
|
||||
in lin V {
|
||||
s = table {
|
||||
VPerf agr => \\suffix,pol => pfx_T (vIII.s ! VPerf agr ! suffix ! pol) ;
|
||||
VImpf (AgP1 Sg) => \\suffix,pol => pfx "ni" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP1 Sg) ! suffix ! pol))) ;
|
||||
VImpf (AgP2 Sg) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP2 Sg) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Sg Masc) => \\suffix,pol => pfx "ji" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Sg Masc) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Sg Fem) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Sg Fem) ! suffix ! pol))) ;
|
||||
VImpf (AgP1 Pl) => \\suffix,pol => pfx "ni" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP1 Pl) ! suffix ! pol))) ;
|
||||
VImpf (AgP2 Pl) => \\suffix,pol => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP2 Pl) ! suffix ! pol))) ;
|
||||
VImpf (AgP3Pl) => \\suffix,pol => pfx "ji" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Pl) ! suffix ! pol))) ;
|
||||
VImp num => \\suffix,pol => pfx_T (vIII.s ! VImp num ! suffix ! pol)
|
||||
} ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- } ;
|
||||
-- e.g.: derivedV_VI "tqiegħed" (mkRoot "q-għ-d")
|
||||
derivedV_VI : Str -> Root -> V = \mammaVI, root ->
|
||||
let
|
||||
-- use the Form III conjugation, just prefixing a T
|
||||
mammaIII : Str = dropPfx 1 mammaVI ; -- QIEGĦED
|
||||
vIII : V = derivedV_III mammaIII root ;
|
||||
info : VerbInfo = updateVerbInfo vIII.i FormVI mammaVI ;
|
||||
in lin V {
|
||||
s = table {
|
||||
VPerf agr => pfx_T (vIII.s ! VPerf agr) ;
|
||||
VImpf (AgP1 Sg) => pfx "ni" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP1 Sg)))) ;
|
||||
VImpf (AgP2 Sg) => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP2 Sg)))) ;
|
||||
VImpf (AgP3Sg Masc) => pfx "ji" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Sg Masc)))) ;
|
||||
VImpf (AgP3Sg Fem) => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Sg Fem)))) ;
|
||||
VImpf (AgP1 Pl) => pfx "ni" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP1 Pl)))) ;
|
||||
VImpf (AgP2 Pl) => pfx "ti" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP2 Pl)))) ;
|
||||
VImpf (AgP3Pl) => pfx "ji" (pfx_T (dropPfx 1 (vIII.s ! VImpf (AgP3Pl)))) ;
|
||||
VImp num => pfx_T (vIII.s ! VImp num)
|
||||
} ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
-- Make a Form VII verb
|
||||
-- e.g.: derivedV_VII "xeħet" "nxteħet"
|
||||
-- derivedV_VII : V = overload {
|
||||
derivedV_VII : Str -> Str -> V = \mammaI,mammaVII ->
|
||||
let
|
||||
info : VerbInfo = classifyVerb mammaI ;
|
||||
c1 : Str = case mammaVII of {
|
||||
"n" + c@#C + "t" + _ => "n"+c+"t" ; -- NXT-EĦET
|
||||
"ntgħ" + _ => "ntgħ" ; -- NTGĦ-AĠEN
|
||||
"nt" + c@#C + _ => "nt"+c ; -- NTR-IFES
|
||||
"nt" + #Vowel + _ => "nt" ; -- NT-IŻEN
|
||||
"n" + c@#C + _ => "n"+c ; -- NĦ-ASEL
|
||||
_ => "nt" --- unknown case
|
||||
} ;
|
||||
newinfo : VerbInfo = mkVerbInfo info.class FormVII info.root info.patt mammaVII ;
|
||||
in lin V {
|
||||
s = conjFormVII newinfo c1 ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- } ;
|
||||
-- e.g.: derivedV_VII "xeħet" "nxteħet" (mkRoot "x-ħ-t")
|
||||
derivedV_VII : Str -> Str -> Root -> V = \mammaI, mammaVII, root ->
|
||||
let
|
||||
class : VClass = classifyRoot root ;
|
||||
vowels : Pattern = extractPattern mammaI ;
|
||||
c1 : Str = case mammaVII of {
|
||||
"n" + c@#Cns + "t" + _ => "n"+c+"t" ; -- NXT-EĦET
|
||||
"ntgħ" + _ => "ntgħ" ; -- NTGĦ-AĠEN
|
||||
"nt" + c@#Cns + _ => "nt"+c ; -- NTR-IFES
|
||||
"nt" + #Vowel + _ => "nt" ; -- NT-IŻEN
|
||||
"n" + c@#Cns + _ => "n"+c ; -- NĦ-ASEL
|
||||
_ => "nt" --- unknown case
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo class FormVII root vowels mammaVII ;
|
||||
in lin V {
|
||||
s = conjFormVII info c1 ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
-- Make a Form VIII verb
|
||||
-- e.g.: derivedV_VIII "xteħet"
|
||||
-- derivedV_VIII : V = overload {
|
||||
derivedV_VIII : Str -> V = \mammaVIII ->
|
||||
let
|
||||
mammaI : Str = delCharAt 1 mammaVIII ;
|
||||
info : VerbInfo = classifyVerb mammaI ;
|
||||
c1 : Str = info.root.C1+"t";
|
||||
newinfo : VerbInfo = updateVerbInfo info FormVIII mammaVIII ;
|
||||
in lin V {
|
||||
s = conjFormVII newinfo c1 ; -- note we use conjFormVIII !
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- } ;
|
||||
-- e.g.: derivedV_VIII "xteħet" (mkRoot "x-ħ-t")
|
||||
derivedV_VIII : Str -> Root -> V = \mammaVIII, root ->
|
||||
let
|
||||
mammaI : Str = delCharAt 1 mammaVIII ;
|
||||
class : VClass = classifyRoot root ;
|
||||
vowels : Pattern = extractPattern mammaI ;
|
||||
info : VerbInfo = mkVerbInfo class FormVIII root vowels mammaVIII ;
|
||||
c1 : Str = root.C1+"t";
|
||||
in lin V {
|
||||
s = conjFormVII info c1 ; -- note we use conjFormVII !
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
-- Make a Form IX verb
|
||||
-- e.g.: derivedV_IX "sfar"
|
||||
-- derivedV_IX : V = overload {
|
||||
derivedV_IX : Str -> V = \mammaIX ->
|
||||
case mammaIX of {
|
||||
c1@#Consonant + c2@#Consonant + v1@("ie"|"a") + c3@#Consonant =>
|
||||
let
|
||||
root : Root = mkRoot c1 c2 c3 ;
|
||||
patt : Pattern = mkPattern v1 ;
|
||||
class : VClass = classifyRoot root ;
|
||||
newinfo : VerbInfo = mkVerbInfo class FormIX root patt mammaIX ;
|
||||
in lin V {
|
||||
s = conjFormIX newinfo ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
_ => Predef.error("I don't know how to make a Form IX verb out of" ++ mammaIX)
|
||||
} ;
|
||||
-- } ;
|
||||
derivedV_IX : Str -> Root -> V = \mammaIX, root ->
|
||||
case mammaIX of {
|
||||
-- c1@#Consonant + c2@#Consonant + v1@("ie"|"a") + c3@#Consonant =>
|
||||
_ + v1@("ie"|"a"|"â") + _ =>
|
||||
let
|
||||
patt : Pattern = mkPattern v1 ;
|
||||
class : VClass = classifyRoot root ;
|
||||
info : VerbInfo = mkVerbInfo class FormIX root patt mammaIX ;
|
||||
in lin V {
|
||||
s = conjFormIX info ;
|
||||
i = info ;
|
||||
} ;
|
||||
_ => Predef.error("I don't know how to make a Form IX verb out of" ++ mammaIX)
|
||||
} ;
|
||||
|
||||
-- Make a Form X verb
|
||||
derivedV_X : V = overload {
|
||||
-- e.g.: derivedV_X "stagħġeb" (mkRoot "għ-ġ-b")
|
||||
derivedV_X : Str -> Root -> V = \mammaX,root ->
|
||||
let
|
||||
class : VClass = classifyRoot root ;
|
||||
patt : Pattern = extractPattern mammaX ;
|
||||
newinfo : VerbInfo = mkVerbInfo class FormX root patt mammaX ;
|
||||
in lin V {
|
||||
s = conjFormX newinfo ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- e.g.: derivedV_X "stagħġeb" "għ-ġ-b"
|
||||
derivedV_X : Str -> Str -> V = \mammaX,str_root ->
|
||||
let
|
||||
root : Root = mkRoot str_root ;
|
||||
class : VClass = classifyRoot root ;
|
||||
patt : Pattern = extractPattern mammaX ;
|
||||
newinfo : VerbInfo = mkVerbInfo class FormX root patt mammaX ;
|
||||
in lin V {
|
||||
s = conjFormX newinfo ;
|
||||
i = newinfo ;
|
||||
} ;
|
||||
-- e.g.: derivedV_X "stagħġeb" (mkRoot "għ-ġ-b")
|
||||
derivedV_X : Str -> Root -> V = \mammaX, root ->
|
||||
let
|
||||
class : VClass = classifyRoot root ;
|
||||
patt : Pattern = extractPattern mammaX ;
|
||||
patt2 : Pattern = vowelChangesIE root patt ;
|
||||
info : VerbInfo = mkVerbInfo class FormX root patt patt2 mammaX ;
|
||||
in lin V {
|
||||
s = conjFormX info ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
{- ~~~ Strong Verb ~~~ -}
|
||||
@@ -798,7 +629,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Strong Regular) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -838,7 +669,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Strong LiquidMedial) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -873,7 +704,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Strong Geminated) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -912,7 +743,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Weak Assimilative) (FormI) root patt patt2 (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -951,7 +782,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Weak Hollow) (FormI) root patt patt2 (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -990,7 +821,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Weak Lacking) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -1025,7 +856,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Weak Defective) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -1060,7 +891,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Quad QStrong) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -1098,7 +929,7 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Quad QWeak) (FormI) root patt (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
@@ -1116,12 +947,12 @@ resource ParadigmsMlt = open
|
||||
} ;
|
||||
info : VerbInfo = mkVerbInfo (Loan) (FormI) (imp ! Sg) ;
|
||||
in lin V {
|
||||
s = verbPolarityTable info (verbPronSuffixTable info tbl) ;
|
||||
s = tbl ;
|
||||
i = info ;
|
||||
} ;
|
||||
|
||||
|
||||
{- ===== Adjective Paradigms ===== -}
|
||||
{- Adjective paradigms ------------------------------------------------ -}
|
||||
|
||||
-- Overloaded function for building an adjective
|
||||
mkA : A = overload {
|
||||
|
||||
@@ -1,38 +1,62 @@
|
||||
-- ResMlt.gf: Language-specific parameter types, morphology, VP formation
|
||||
--
|
||||
-- Maltese Resource Grammar Library
|
||||
-- John J. Camilleri, 2012
|
||||
-- John J. Camilleri 2009 -- 2013
|
||||
-- Angelo Zammit 2012
|
||||
-- Licensed under LGPL
|
||||
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
resource ResMlt = ParamX ** open Prelude, Predef in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
{- General -------------------------------------------------------------- -}
|
||||
|
||||
param
|
||||
|
||||
{- General -}
|
||||
|
||||
Gender = Masc | Fem ;
|
||||
Gender = Masc | Fem ;
|
||||
|
||||
GenNum =
|
||||
GSg Gender -- dak, dik
|
||||
| GPl ; -- dawk
|
||||
| GPl -- dawk
|
||||
;
|
||||
|
||||
Agr =
|
||||
oper
|
||||
-- Agreement system corrected based on comments by [AZ]
|
||||
Agr : Type = { g : Gender ; n : Number ; p : Person } ;
|
||||
|
||||
mkAgr : Gender -> Number -> Person -> Agr = \g,n,p -> {g = g ; n = n ; p = p} ;
|
||||
|
||||
toVAgr : Agr -> VAgr = \agr ->
|
||||
case <agr.p,agr.n> of {
|
||||
<P1,num> => AgP1 num;
|
||||
<P2,num> => AgP2 num;
|
||||
<P3,Sg> => AgP3Sg agr.g;
|
||||
<P3,Pl> => AgP3Pl
|
||||
} ;
|
||||
|
||||
toAgr : VAgr -> Agr = \vagr ->
|
||||
case vagr of {
|
||||
AgP1 num => mkAgr Masc num P1 ; --- sorry ladies
|
||||
AgP2 num => mkAgr Masc num P2 ;
|
||||
AgP3Sg gen => mkAgr gen Pl P3 ;
|
||||
AgP3Pl => mkAgr Masc Pl P3
|
||||
} ;
|
||||
|
||||
param
|
||||
-- Agreement for verbs
|
||||
VAgr =
|
||||
AgP1 Number -- jiena, aħna
|
||||
| AgP2 Number -- inti, intom
|
||||
| AgP3Sg Gender -- huwa, hija
|
||||
| AgP3Pl -- huma
|
||||
;
|
||||
;
|
||||
|
||||
NPCase = Nom | Gen ;
|
||||
param
|
||||
NPCase = Nom | CPrep ; -- [AZ]
|
||||
|
||||
Animacy =
|
||||
Animate
|
||||
| Inanimate
|
||||
;
|
||||
-- Animacy = Animate | Inanimate ;
|
||||
|
||||
-- Definiteness =
|
||||
-- Definite -- eg IL-KARTA. In this context same as Determinate
|
||||
@@ -40,7 +64,7 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
-- ;
|
||||
|
||||
|
||||
{- Numerals -}
|
||||
{- Numeral -------------------------------------------------------------- -}
|
||||
|
||||
CardOrd = NCard | NOrd ;
|
||||
|
||||
@@ -51,60 +75,107 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
| Ten -- 20-99
|
||||
| Hund -- 100..999
|
||||
--| Thou -- 1000+
|
||||
;
|
||||
;
|
||||
|
||||
Num_Number =
|
||||
Num_Sg
|
||||
| Num_Dl
|
||||
| Num_Pl
|
||||
;
|
||||
;
|
||||
|
||||
Num_Case =
|
||||
NumNominative -- TNEJN, ĦAMSA, TNAX, MIJA
|
||||
| NumAdjectival ; -- ŻEWĠ, ĦAMES, TNAX-IL, MITT
|
||||
NumNominative -- TNEJN, ĦAMSA, TNAX, MIJA
|
||||
| NumAdjectival -- ŻEWĠ, ĦAMES, TNAX-IL, MITT
|
||||
;
|
||||
|
||||
|
||||
{- Nouns -}
|
||||
{- Nouns ---------------------------------------------------------------- -}
|
||||
|
||||
oper
|
||||
Noun : Type = {
|
||||
s : Noun_Number => Str ;
|
||||
g : Gender ;
|
||||
-- anim : Animacy ; -- is the noun animate? e.g. TABIB
|
||||
} ;
|
||||
|
||||
ProperNoun : Type = {
|
||||
s : Str ;
|
||||
a : Agr ; -- ignore a.p (always P3)
|
||||
} ;
|
||||
|
||||
NounPhrase : Type = {
|
||||
s : NPCase => Str ;
|
||||
a : Agr ;
|
||||
isPron : Bool ;
|
||||
} ;
|
||||
|
||||
param
|
||||
Noun_Sg_Type =
|
||||
Singulative -- eg ĦUTA
|
||||
| Collective -- eg ĦUT
|
||||
;
|
||||
;
|
||||
Noun_Pl_Type =
|
||||
Determinate -- eg ĦUTIET
|
||||
| Indeterminate -- eg ĦWIET
|
||||
;
|
||||
;
|
||||
Noun_Number =
|
||||
Singular Noun_Sg_Type -- eg ĦUTA / ĦUT
|
||||
| Dual -- eg WIDNEJN
|
||||
| Plural Noun_Pl_Type -- eg ĦUTIET / ĦWIET
|
||||
;
|
||||
;
|
||||
|
||||
NForm =
|
||||
NRegular -- WIĊĊ
|
||||
| NPronSuffix Agr ; -- WIĊĊU
|
||||
{- Pronoun -------------------------------------------------------------- -}
|
||||
|
||||
oper
|
||||
-- [AZ]
|
||||
Pronoun = {
|
||||
s : PronForm => {c1, c2: Str} ;
|
||||
a : Agr ;
|
||||
} ;
|
||||
|
||||
{- Verb -}
|
||||
param
|
||||
PronForm =
|
||||
Personal -- JIENA
|
||||
| Possessive -- TIEGĦI
|
||||
| Suffixed PronCase
|
||||
;
|
||||
|
||||
PronCase =
|
||||
Acc -- Accusative: rajtu
|
||||
| Dat -- Dative: rajtlu
|
||||
| Gen -- Genitive: qalbu
|
||||
;
|
||||
|
||||
{- Verb ----------------------------------------------------------------- -}
|
||||
|
||||
oper
|
||||
Verb : Type = {
|
||||
s : VForm => Str ;
|
||||
i : VerbInfo ;
|
||||
} ;
|
||||
|
||||
VerbInfo : Type = {
|
||||
class : VClass ;
|
||||
form : VDerivedForm ;
|
||||
root : Root ; -- radicals
|
||||
patt : Pattern ; -- vowels extracted from mamma
|
||||
patt2: Pattern ; -- vowel changes; default to patt (experimental)
|
||||
-- in particular, patt2 is used to indicate whether an IE sould be shortened
|
||||
-- to an I or an E (same for entire verb)
|
||||
imp : Str ; -- Imperative Sg. Gives so much information jaħasra!
|
||||
} ;
|
||||
|
||||
param
|
||||
-- Possible verb forms (tense + person)
|
||||
VForm =
|
||||
VPerf Agr -- Perfect tense in all pronoun cases
|
||||
| VImpf Agr -- Imperfect tense in all pronoun cases
|
||||
VPerf VAgr -- Perfect tense in all pronoun cases
|
||||
| VImpf VAgr -- Imperfect tense in all pronoun cases
|
||||
| VImp Number -- Imperative is always P2, Sg & Pl
|
||||
-- | VPresPart GenNum -- Present Particible for Gender/Number
|
||||
-- | VPastPart GenNum -- Past Particible for Gender/Number
|
||||
-- | VVerbalNoun -- Verbal Noun
|
||||
;
|
||||
|
||||
-- Inflection of verbs for pronominal suffixes
|
||||
VSuffixForm =
|
||||
VSuffixNone -- eg FTAĦT
|
||||
| VSuffixDir Agr -- eg FTAĦTU
|
||||
| VSuffixInd Agr -- eg FTAĦTLU
|
||||
| VSuffixDirInd GenNum Agr -- eg FTAĦTHULU. D.O. is necessarily 3rd person.
|
||||
;
|
||||
|
||||
VDerivedForm =
|
||||
FormI
|
||||
| FormII
|
||||
@@ -125,7 +196,7 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
| Weak VWeakClass
|
||||
| Quad VQuadClass
|
||||
| Loan
|
||||
-- | Irregular
|
||||
| Irregular
|
||||
;
|
||||
VStrongClass =
|
||||
Regular
|
||||
@@ -142,64 +213,138 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
QStrong
|
||||
| QWeak
|
||||
;
|
||||
-- VRomanceEnding =
|
||||
-- _ARE -- kanta
|
||||
-- | _ERE | _IRE -- vinċa, serva --- we don't need this distinction, just always use IRE
|
||||
-- ;
|
||||
-- VQuadClass =
|
||||
-- BiradicalBase
|
||||
-- | RepeatedC3
|
||||
-- | RepeatedC1
|
||||
-- | AdditionalC4
|
||||
-- ;
|
||||
|
||||
|
||||
{- Adjective -}
|
||||
|
||||
AForm =
|
||||
APosit GenNum
|
||||
| ACompar
|
||||
| ASuperl
|
||||
;
|
||||
|
||||
oper
|
||||
|
||||
{- ===== Type declarations ===== -}
|
||||
|
||||
Noun : Type = {
|
||||
s : Noun_Number => NForm => Str ;
|
||||
g : Gender ;
|
||||
-- anim : Animacy ; -- is the noun animate? e.g. TABIB
|
||||
VerbParts : Type = { stem, dir, ind, pol : Str } ;
|
||||
mkVParts = overload {
|
||||
mkVParts : Str -> Str -> VerbParts = \a,d -> {stem=a; dir=[]; ind=[]; pol=d} ;
|
||||
mkVParts : Str -> Str -> Str -> Str -> VerbParts = \a,b,c,d -> {stem=a; dir=b; ind=c; pol=d} ;
|
||||
} ;
|
||||
joinVParts : VerbParts -> Str = \vb -> vb.stem ++ vb.dir ++ vb.ind ++ vb.ind ;
|
||||
|
||||
-- [AZ]
|
||||
VP : Type = {
|
||||
s : VPForm => Anteriority => Polarity => VerbParts ; -- verb
|
||||
s2 : Agr => Str ; -- complement
|
||||
-- a1 : Str ;
|
||||
-- a2 : Str ;
|
||||
} ;
|
||||
|
||||
ProperNoun : Type = {
|
||||
s : Str ;
|
||||
g : Gender ;
|
||||
param
|
||||
-- [AZ]
|
||||
VPForm =
|
||||
VPIndicat Tense VAgr
|
||||
| VPImperat Number
|
||||
;
|
||||
|
||||
oper
|
||||
|
||||
-- [AZ]
|
||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
s2 = obj ;
|
||||
-- a1 = vp.a1 ;
|
||||
-- a2 = vp.a2 ;
|
||||
} ;
|
||||
|
||||
Verb : Type = {
|
||||
s : VForm => VSuffixForm => Polarity => Str ;
|
||||
i : VerbInfo ;
|
||||
copula_kien = {
|
||||
s : (VForm => Str) = table {
|
||||
VPerf (AgP1 Sg) => "kont" ;
|
||||
VPerf (AgP2 Sg) => "kont" ;
|
||||
VPerf (AgP3Sg Masc) => "kien" ;
|
||||
VPerf (AgP3Sg Fem) => "kienet" ;
|
||||
VPerf (AgP1 Pl) => "konna" ;
|
||||
VPerf (AgP2 Pl) => "kontu" ;
|
||||
VPerf (AgP3Pl) => "kienu" ;
|
||||
VImpf (AgP1 Sg) => "nkun" ;
|
||||
VImpf (AgP2 Sg) => "tkun" ;
|
||||
VImpf (AgP3Sg Masc) => "jkun" ;
|
||||
VImpf (AgP3Sg Fem) => "tkun" ;
|
||||
VImpf (AgP1 Pl) => "nkunu" ;
|
||||
VImpf (AgP2 Pl) => "tkunu" ;
|
||||
VImpf (AgP3Pl) => "jkunu" ;
|
||||
VImp (Pl) => "kun" ;
|
||||
VImp (Sg) => "kunu"
|
||||
} ;
|
||||
i : VerbInfo = mkVerbInfo (Irregular) (FormI) (mkRoot "k-w-n") (mkPattern "ie") ;
|
||||
} ;
|
||||
|
||||
VerbInfo : Type = {
|
||||
class : VClass ;
|
||||
form : VDerivedForm ;
|
||||
root : Root ; -- radicals
|
||||
patt : Pattern ; -- vowels extracted from mamma
|
||||
patt2: Pattern ; -- vowel changes; default to patt (experimental)
|
||||
-- in particular, patt2 is used to indicate whether an IE sould be shortened
|
||||
-- to an I or an E (same for entire verb)
|
||||
imp : Str ; -- Imperative Sg. Gives so much information jaħasra!
|
||||
-- Adapted from [AZ]
|
||||
CopulaVP : VP = {
|
||||
s = \\vpf,ant,pol =>
|
||||
case <vpf> of {
|
||||
<VPIndicat Past vagr> => polarise (copula_kien.s ! VPerf vagr) pol ;
|
||||
<VPIndicat Pres vagr> => polarise (copula_kien.s ! VImpf vagr) pol ;
|
||||
<VPImperat num> => polarise (copula_kien.s ! VImp num) pol ;
|
||||
_ => Predef.error "tense not implemented"
|
||||
} ;
|
||||
s2 = \\agr => [] ;
|
||||
} where {
|
||||
polarise : Str -> Polarity -> VerbParts = \s,pol ->
|
||||
mkVParts s (case pol of { Neg => BIND ++ "x" ; _ => [] }) ;
|
||||
} ;
|
||||
|
||||
-- [AZ]
|
||||
predV : Verb -> VP = \verb -> {
|
||||
s = \\vpf,ant,pol =>
|
||||
let
|
||||
ma = "ma" ;
|
||||
mhux = "mhux" ;
|
||||
b1 : Str -> VerbParts = \s -> mkVParts s [] ;
|
||||
b2 : Str -> VerbParts = \s -> mkVParts s (BIND ++ "x") ;
|
||||
in
|
||||
case vpf of {
|
||||
VPIndicat tense vagr =>
|
||||
let
|
||||
kien = joinVParts (CopulaVP.s ! VPIndicat Past vagr ! Simul ! pol) ;
|
||||
in
|
||||
case <tense,ant,pol> of {
|
||||
<Pres,Simul,Pos> => b1 (verb.s ! VImpf vagr) ; -- norqod
|
||||
<Pres,Anter,Pos> => b1 (kien ++ verb.s ! VImpf vagr) ; -- kont norqod
|
||||
<Past,Simul,Pos> => b1 (verb.s ! VPerf vagr) ; -- rqadt
|
||||
<Past,Anter,Pos> => b1 (kien ++ verb.s ! VPerf vagr) ; -- kont rqadt
|
||||
<Fut, Simul,Pos> => b1 ("se" ++ verb.s ! VImpf vagr) ; -- se norqod
|
||||
<Fut, Anter,Pos> => b1 (kien ++ "se" ++ verb.s ! VImpf vagr) ; -- kont se norqod
|
||||
|
||||
<Pres,Simul,Neg> => b2 (ma ++ verb.s ! VImpf vagr) ; -- ma norqodx
|
||||
<Pres,Anter,Neg> => b1 (ma ++ kien ++ verb.s ! VImpf vagr) ; -- ma kontx norqod
|
||||
<Past,Simul,Neg> => b2 (ma ++ verb.s ! VPerf vagr) ; -- ma rqadtx
|
||||
<Past,Anter,Neg> => b1 (ma ++ kien ++ verb.s ! VPerf vagr) ; -- ma kontx rqadt
|
||||
<Fut, Simul,Neg> => b1 (mhux ++ "se" ++ verb.s ! VImpf vagr) ; -- mhux se norqod
|
||||
<Fut, Anter,Neg> => b1 (ma ++ kien ++ "se" ++ verb.s ! VImpf vagr) ; -- ma kontx se norqod
|
||||
|
||||
<Cond,_,Pos> => b1 (kien ++ verb.s ! VImpf vagr) ; -- kont norqod
|
||||
<Cond,_,Neg> => b1 (ma ++ kien ++ verb.s ! VImpf vagr) -- ma kontx norqod
|
||||
} ;
|
||||
VPImperat num => b2 (verb.s ! VImp num) -- torqodx
|
||||
};
|
||||
s2 = \\agr => [] ;
|
||||
-- a1 = [] ;
|
||||
-- n2 = \\_ => [] ;
|
||||
-- a2 = [] ;
|
||||
} ;
|
||||
|
||||
{- Adjective ------------------------------------------------------------ -}
|
||||
|
||||
oper
|
||||
Adjective : Type = {
|
||||
s : AForm => Str ;
|
||||
} ;
|
||||
|
||||
param
|
||||
AForm =
|
||||
APosit GenNum
|
||||
| ACompar
|
||||
| ASuperl
|
||||
;
|
||||
|
||||
{- ===== Some character classes ===== -}
|
||||
{- Other ---------------------------------------------------------------- -}
|
||||
|
||||
oper
|
||||
|
||||
{- ~~~ Some character classes ~~~ -}
|
||||
|
||||
Letter : pattern Str = #( "a" | "b" | "ċ" | "d" | "e" | "f" | "ġ" | "g" | "għ" | "h" | "ħ" | "i" | "ie" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "ż" | "z" );
|
||||
Consonant : pattern Str = #( "b" | "ċ" | "d" | "f" | "ġ" | "g" | "għ" | "h" | "ħ" | "j" | "k" | "l" | "m" | "n" | "p" | "q" | "r" | "s" | "t" | "v" | "w" | "x" | "ż" | "z" );
|
||||
CoronalCons : pattern Str = #( "ċ" | "d" | "n" | "r" | "s" | "t" | "x" | "ż" | "z" ); -- "konsonanti xemxin"
|
||||
@@ -207,40 +352,38 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
SonorantCons : pattern Str = #( "l" | "m" | "n" | "r" ); -- See {SA pg13}. Currently unused, but see DoublingConsN below
|
||||
DoublingConsT : pattern Str = #( "ċ" | "d" | "ġ" | "s" | "x" | "ż" | "z" ); -- require doubling when prefixed with 't', eg DDUM, ĠĠORR, SSIB, TTIR, ŻŻID {GM pg68,2b} {OM pg90}
|
||||
DoublingConsN : pattern Str = #( "l" | "m" | "r" ); -- require doubling when prefixed with 'n', eg LLAĦĦAQ, MMUR, RRID {OM pg90}
|
||||
StrongCons : pattern Str = #( "b" | "ċ" | "d" | "f" | "ġ" | "g" | "għ" | "h" | "ħ" | "k" | "l" | "m" | "n" | "p" | "q" | "r" | "s" | "t" | "v" | "x" | "ż" | "z" );
|
||||
WeakCons : pattern Str = #( "j" | "w" );
|
||||
Vowel : pattern Str = #( "a" | "e" | "i" | "o" | "u" );
|
||||
VowelIE : pattern Str = #( "a" | "e" | "i" | "ie" | "o" | "u" );
|
||||
Digraph : pattern Str = #( "ie" );
|
||||
SemiVowel : pattern Str = #( "għ" | "j" );
|
||||
|
||||
V = Vowel ;
|
||||
C = Consonant ;
|
||||
LC = LiquidCons ;
|
||||
Vwl = Vowel ;
|
||||
Cns = Consonant ;
|
||||
LCns = LiquidCons ;
|
||||
|
||||
EorI : Str = "e" | "i" ;
|
||||
IorE : Str = "i" | "e" ;
|
||||
|
||||
{- ===== Roots & Patterns ===== -}
|
||||
{- ~~~ Roots & Patterns ~~~ -}
|
||||
|
||||
Pattern : Type = {V1, V2 : Str} ;
|
||||
Root : Type = {C1, C2, C3, C4 : Str} ;
|
||||
|
||||
-- Make a root object. Accepts following overloads:
|
||||
-- mkRoot
|
||||
-- mkRoot "k-t-b"
|
||||
-- mkRoot "k-t-b-l"
|
||||
-- mkoot (empty root)
|
||||
-- mkRoot "k-t-b" / mkRoot "k-t-b-l"
|
||||
-- mkRoot "k" "t" "b"
|
||||
-- mkRoot "k" "t" "b" "l"
|
||||
mkRoot : Root = overload {
|
||||
mkRoot : Root =
|
||||
{ C1=[] ; C2=[] ; C3=[] ; C4=[] } ;
|
||||
mkRoot : Str -> Root = \root ->
|
||||
case toLower root of {
|
||||
c1@#Consonant + "-" + c2@#Consonant + "-" + c3@#Consonant =>
|
||||
{ C1=c1 ; C2=c2 ; C3=c3 ; C4=[] } ; -- "k-t-b"
|
||||
c1@#Consonant + "-" + c2@#Consonant + "-" + c3@#Consonant + "-" + c4@#Consonant =>
|
||||
{ C1=c1 ; C2=c2 ; C3=c3 ; C4=c4 } ; -- "k-t-b-l"
|
||||
_ => { C1=(charAt 0 root) ; C2=(charAt 1 root) ; C3=(charAt 2 root) ; C4=(charAt 3 root) } -- "ktb" (not recommended)
|
||||
mkRoot : Str -> Root = \s ->
|
||||
case toLower s of {
|
||||
c1 + "-" + c2 + "-" + c3 + "-" + c4 => { C1=c1 ; C2=c2 ; C3=c3 ; C4=c4 } ; -- "k-t-b-l"
|
||||
c1 + "-" + c2 + "-" + c3 => { C1=c1 ; C2=c2 ; C3=c3 ; C4=[] } ; -- "k-t-b"
|
||||
_ => Predef.error("Cannot make root from:"++s)
|
||||
} ;
|
||||
mkRoot : Str -> Str -> Str -> Root = \c1,c2,c3 ->
|
||||
{ C1=toLower c1 ; C2=toLower c2 ; C3=toLower c3 ; C4=[] } ;
|
||||
@@ -302,7 +445,7 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
} ;
|
||||
|
||||
|
||||
{- ===== Conversions ===== -}
|
||||
{- ~~~ Conversions ~~~ -}
|
||||
|
||||
numnum2nounnum : Num_Number -> Noun_Number = \n ->
|
||||
case n of {
|
||||
@@ -311,13 +454,22 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
} ;
|
||||
|
||||
|
||||
{- ===== Useful helper functions ===== -}
|
||||
{- ~~~ Useful helper functions ~~~ -}
|
||||
|
||||
-- Non-existant form
|
||||
--- If changed, also see: MorphoMlt.verbPolarityTable
|
||||
noexist : Str = "NOEXIST" ;
|
||||
|
||||
-- New names for the drop/take operations
|
||||
takePfx = Predef.take ;
|
||||
dropPfx = Predef.drop ;
|
||||
takeSfx = Predef.dp ;
|
||||
dropSfx = Predef.tk ;
|
||||
--- dependent on defn of ResMlt.noexist
|
||||
takePfx : Int -> Str -> Str = \n,s -> case s of { "NOEXIST" => noexist ; _ => Predef.take n s } ;
|
||||
dropPfx : Int -> Str -> Str = \n,s -> case s of { "NOEXIST" => noexist ; _ => Predef.drop n s } ;
|
||||
takeSfx : Int -> Str -> Str = \n,s -> case s of { "NOEXIST" => noexist ; _ => Predef.dp n s } ;
|
||||
dropSfx : Int -> Str -> Str = \n,s -> case s of { "NOEXIST" => noexist ; _ => Predef.tk n s } ;
|
||||
-- takePfx = Predef.take ;
|
||||
-- dropPfx = Predef.drop ;
|
||||
-- takeSfx = Predef.dp ;
|
||||
-- dropSfx = Predef.tk ;
|
||||
|
||||
-- Get the character at the specific index (0-based).
|
||||
-- Negative indices behave as 0 (first character). Out of range indexes return the empty string.
|
||||
@@ -338,27 +490,26 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
-- } ;
|
||||
|
||||
-- Prefix with a 'n'/'t' or double initial consonant, as necessary. See {OM pg 90}
|
||||
pfx_N : Str -> Str = \s -> case takePfx 1 s of {
|
||||
pfx_N : Str -> Str = \s -> case s of {
|
||||
"" => [] ;
|
||||
m@#DoublingConsN => m + s ;
|
||||
"NOEXIST" => noexist ; --- dependent on defn of ResMlt.noexist
|
||||
m@#DoublingConsN + _ => m + s ;
|
||||
_ => "n" + s
|
||||
} ;
|
||||
pfx_T : Str -> Str = \s -> case takePfx 1 s of {
|
||||
pfx_T : Str -> Str = \s -> case s of {
|
||||
"" => [] ;
|
||||
d@#DoublingConsT => d + s ;
|
||||
"NOEXIST" => noexist ; --- dependent on defn of ResMlt.noexist
|
||||
d@#DoublingConsT + _ => d + s ;
|
||||
_ => "t" + s
|
||||
} ;
|
||||
-- This is just here to standardise
|
||||
-- pfx_J : Str -> Str = \s -> case takePfx 1 s of {
|
||||
-- "" => [] ;
|
||||
-- _ => "j" + s
|
||||
-- } ;
|
||||
pfx_J : Str -> Str = \s -> pfx "j" s ;
|
||||
|
||||
-- Generically prefix a string (avoiding empty strings)
|
||||
pfx : Str -> Str -> Str = \p,s -> case <p,s> of {
|
||||
<_, ""> => [] ;
|
||||
<"", str> => str ;
|
||||
<_, "NOEXIST"> => noexist ; --- dependent on defn of ResMlt.noexist
|
||||
<"NOEXIST", str> => str ; --- dependent on defn of ResMlt.noexist
|
||||
<px, str> => px + str
|
||||
} ;
|
||||
|
||||
@@ -368,6 +519,7 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
sfx : Str -> Str -> Str = \a,b ->
|
||||
case <a,takePfx 1 b> of {
|
||||
<"",_> => [] ;
|
||||
<"NOEXIST",_> => noexist ; --- dependent on defn of ResMlt.noexist
|
||||
<ke+"nn","n"> => ke+"n"+b ;
|
||||
<ha+"kk","k"> => ha+"k"+b ;
|
||||
<ho+"ll","l"> => ho+"l"+b ;
|
||||
@@ -436,114 +588,59 @@ resource ResMlt = ParamX - [Tense] ** open Prelude, Predef in {
|
||||
_ => [] -- ?
|
||||
} ;
|
||||
|
||||
artIndef = [] ;
|
||||
artIndef : Str =
|
||||
pre {
|
||||
"lill-" ;
|
||||
"lil" / strs { "a" ; "e" ; "i" ; "o" ; "u" ; "h" ; "għ" } ;
|
||||
"liċ-" ++ BIND / strs { "ċ" } ;
|
||||
"lid-" ++ BIND / strs { "d" } ;
|
||||
"lin-" ++ BIND / strs { "n" } ;
|
||||
"lir-" ++ BIND / strs { "r" } ;
|
||||
"lis-" ++ BIND / strs { "s" } ;
|
||||
"lit-" ++ BIND / strs { "t" } ;
|
||||
"lix-" ++ BIND / strs { "x" } ;
|
||||
"liż-" ++ BIND / strs { "ż" } ;
|
||||
"liz-" ++ BIND / strs { "z" }
|
||||
} ;
|
||||
|
||||
artDef : Str =
|
||||
pre {
|
||||
"il-" ;
|
||||
"l-" / strs { "a" ; "e" ; "i" ; "o" ; "u" ; "h" ; "għ" } ;
|
||||
"iċ-" / strs { "ċ" } ;
|
||||
"id-" / strs { "d" } ;
|
||||
"in-" / strs { "n" } ;
|
||||
"ir-" / strs { "r" } ;
|
||||
"is-" / strs { "s" } ;
|
||||
"it-" / strs { "t" } ;
|
||||
"ix-" / strs { "x" } ;
|
||||
"iż-" / strs { "ż" } ;
|
||||
"iz-" / strs { "z" }
|
||||
"l-" ++ BIND / strs { "a" ; "e" ; "i" ; "o" ; "u" ; "h" ; "għ" } ;
|
||||
"iċ-" ++ BIND / strs { "ċ" } ;
|
||||
"id-" ++ BIND / strs { "d" } ;
|
||||
"in-" ++ BIND / strs { "n" } ;
|
||||
"ir-" ++ BIND / strs { "r" } ;
|
||||
"is-" ++ BIND / strs { "s" } ;
|
||||
"it-" ++ BIND / strs { "t" } ;
|
||||
"ix-" ++ BIND / strs { "x" } ;
|
||||
"iż-" ++ BIND / strs { "ż" } ;
|
||||
"iz-" ++ BIND / strs { "z" }
|
||||
} ;
|
||||
|
||||
{- ===== Worst-case functions ===== -}
|
||||
{- ~~~ Worst-case functions ~~~ -}
|
||||
|
||||
-- Noun: Takes all forms and a gender
|
||||
-- Params:
|
||||
-- Singulative, eg KOXXA
|
||||
-- Collective, eg KOXXOX
|
||||
-- Double, eg KOXXTEJN
|
||||
-- Determinate Plural, eg KOXXIET
|
||||
-- Indeterminate Plural
|
||||
-- Gender
|
||||
-- mkNoun : (_,_,_,_,_ : NForm => Str) -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> {
|
||||
-- s = table {
|
||||
-- Singular Singulative => sing ;
|
||||
-- Singular Collective => coll ;
|
||||
-- Dual => dual ;
|
||||
-- Plural Determinate => det ;
|
||||
-- Plural Indeterminate => ind
|
||||
-- } ;
|
||||
-- g = gen ;
|
||||
-- -- anim = Inanimate ;
|
||||
-- } ;
|
||||
|
||||
-- Make a noun animate
|
||||
animateNoun : Noun -> Noun ;
|
||||
animateNoun = \n -> n ** {anim = Animate} ;
|
||||
|
||||
-- Build an empty pronominal suffix table
|
||||
nullSuffixTable : Str -> (NForm => Str) ;
|
||||
nullSuffixTable = \s -> table {
|
||||
NRegular => s ;
|
||||
NPronSuffix _ => []
|
||||
-- Singulative, eg KOXXA
|
||||
-- Collective, eg KOXXOX
|
||||
-- Double, eg KOXXTEJN
|
||||
-- Determinate Plural, eg KOXXIET
|
||||
-- Indeterminate Plural
|
||||
-- Gender
|
||||
mkNoun : (_,_,_,_,_ : Str) -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> {
|
||||
s = table {
|
||||
Singular Singulative => sing ;
|
||||
Singular Collective => coll ;
|
||||
Dual => dual ;
|
||||
Plural Determinate => det ;
|
||||
Plural Indeterminate => ind
|
||||
} ;
|
||||
g = gen ;
|
||||
-- anim = Inanimate ;
|
||||
} ;
|
||||
|
||||
-- Build a noun's pronominal suffix table
|
||||
mkSuffixTable : (NForm => Str) = overload {
|
||||
|
||||
mkSuffixTable : (_ : Str) -> (NForm => Str) = \wicc ->
|
||||
table {
|
||||
NRegular => wicc ;
|
||||
NPronSuffix (AgP1 Sg) => wicc + "i" ;
|
||||
NPronSuffix (AgP2 Sg) => wicc + "ek" ;
|
||||
NPronSuffix (AgP3Sg Masc) => wicc + "u" ;
|
||||
NPronSuffix (AgP3Sg Fem) => wicc + "ha" ;
|
||||
NPronSuffix (AgP1 Pl) => wicc + "na" ;
|
||||
NPronSuffix (AgP2 Pl) => wicc + "kom" ;
|
||||
NPronSuffix (AgP3Pl) => wicc + "hom"
|
||||
} ;
|
||||
|
||||
mkSuffixTable : (_,_,_,_,_,_,_,_ : Str) -> (NForm => Str) = \isem,ismi,ismek,ismu,isimha,isimna,isimkom,isimhom ->
|
||||
table {
|
||||
NRegular => isem ;
|
||||
NPronSuffix (AgP1 Sg) => ismi ;
|
||||
NPronSuffix (AgP2 Sg) => ismek ;
|
||||
NPronSuffix (AgP3Sg Masc) => ismu ;
|
||||
NPronSuffix (AgP3Sg Fem) => isimha ;
|
||||
NPronSuffix (AgP1 Pl) => isimna ;
|
||||
NPronSuffix (AgP2 Pl) => isimkom ;
|
||||
NPronSuffix (AgP3Pl) => isimhom
|
||||
} ;
|
||||
|
||||
} ;
|
||||
|
||||
-- mkNoun = overload {
|
||||
|
||||
-- mkNoun : (_,_,_,_,_ : Str) -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> {
|
||||
-- s = table {
|
||||
-- Singular Singulative => (nullSuffixTable sing) ;
|
||||
-- Singular Collective => (nullSuffixTable coll) ;
|
||||
-- Dual => (nullSuffixTable dual) ;
|
||||
-- Plural Determinate => (nullSuffixTable det) ;
|
||||
-- Plural Indeterminate => (nullSuffixTable ind)
|
||||
-- } ;
|
||||
-- g = gen ;
|
||||
-- -- anim = Inanimate ;
|
||||
-- } ;
|
||||
|
||||
mkNoun : (_,_,_,_,_ : NForm => Str) -> Gender -> Noun = \sing,coll,dual,det,ind,gen -> {
|
||||
s = table {
|
||||
Singular Singulative => sing ;
|
||||
Singular Collective => coll ;
|
||||
Dual => dual ;
|
||||
Plural Determinate => det ;
|
||||
Plural Indeterminate => ind
|
||||
} ;
|
||||
g = gen ;
|
||||
-- anim = Inanimate ;
|
||||
} ;
|
||||
|
||||
-- } ;
|
||||
|
||||
-- Adjective: Takes all forms (except superlative)
|
||||
-- adjective: Takes all forms (except superlative)
|
||||
-- Params:
|
||||
-- Masculine, eg SABIĦ
|
||||
-- Feminine, eg SABIĦA
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
--# -path=.:abstract:common:prelude
|
||||
|
||||
concrete SentenceMlt of Sentence = CatMlt ** open
|
||||
ResMlt,
|
||||
Prelude,
|
||||
ResMlt,
|
||||
ParamX,
|
||||
@@ -15,6 +14,24 @@ concrete SentenceMlt of Sentence = CatMlt ** open
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
-- NP -> VP -> Cl
|
||||
-- John walks
|
||||
PredVP np vp = {
|
||||
s = \\tense,ant,pol => (s ++ v ++ o)
|
||||
where {
|
||||
s = case np.isPron of {
|
||||
True => [] ; -- omit subject pronouns
|
||||
False => np.s ! Nom
|
||||
} ;
|
||||
v = joinVParts (vp.s ! VPIndicat tense (toVAgr np.a) ! ant ! pol) ;
|
||||
o = vp.s2 ! np.a ;
|
||||
-- s = if_then_Str np.isPron [] (np.s ! Nom) ; -- omit subject pronouns
|
||||
-- v = joinVParts (vp.s ! VPIndicat tense (toVAgr np.a) ! ant ! pol) ;
|
||||
-- o = vp.s2 ! np.a ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
-- Cl
|
||||
-- Imp
|
||||
-- QS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- StructuralMlt.gf: lexicon of structural words
|
||||
--
|
||||
-- Maltese Resource Grammar Library
|
||||
-- John J. Camilleri, 2012
|
||||
-- John J. Camilleri 2009 -- 2013
|
||||
-- Licensed under LGPL
|
||||
|
||||
concrete StructuralMlt of Structural = CatMlt **
|
||||
@@ -11,6 +11,141 @@ concrete StructuralMlt of Structural = CatMlt **
|
||||
optimize=all ;
|
||||
coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
{- Pronoun -------------------------------------------------------------- -}
|
||||
|
||||
he_Pron = mkPron "hu" "u" "h" "u" "h" "lu" singular P3 masculine ; --- also HUWA
|
||||
i_Pron = mkPron "jien" "i" "ja" "ni" [] "li" singular P1 masculine ; --- also JIENA
|
||||
-- it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ;
|
||||
she_Pron = mkPron "hi" "ha" singular P3 feminine ; --- also HIJA
|
||||
they_Pron = mkPron "huma" "hom" plural P3 masculine ;
|
||||
we_Pron = mkPron "aħna" "na" plural P1 masculine ;
|
||||
youSg_Pron = mkPron "int" "ek" "ok" "ek" "k" "lek" singular P2 masculine ; -- also INTI
|
||||
youPl_Pron = mkPron "intom" "kom" plural P2 masculine ;
|
||||
youPol_Pron = youSg_Pron ;
|
||||
|
||||
{- Others --------------------------------------------------------------- -}
|
||||
|
||||
-- above_Prep = mkPrep "above" ;
|
||||
-- after_Prep = mkPrep "after" ;
|
||||
-- all_Predet = ss "all" ;
|
||||
-- almost_AdA = mkAdA "almost" ;
|
||||
-- almost_AdN = mkAdN "almost" ;
|
||||
-- although_Subj = ss "although" ;
|
||||
-- always_AdV = mkAdV "always" ;
|
||||
-- and_Conj = mkConj "and" ;
|
||||
-- because_Subj = ss "because" ;
|
||||
-- before_Prep = mkPrep "before" ;
|
||||
-- behind_Prep = mkPrep "behind" ;
|
||||
-- between_Prep = mkPrep "between" ;
|
||||
-- both7and_DConj = mkConj "both" "and";
|
||||
-- but_PConj = ss "but" ;
|
||||
-- by8agent_Prep = mkPrep "by" ;
|
||||
-- by8means_Prep = mkPrep "by" ;
|
||||
-- can8know_VV, can_VV = {
|
||||
-- s = table {
|
||||
-- VVF VInf => ["be able to"] ;
|
||||
-- VVF VPres => "can" ;
|
||||
-- VVF VPPart => ["been able to"] ;
|
||||
-- VVF VPresPart => ["being able to"] ;
|
||||
-- VVF VPast => "could" ; --# notpresent
|
||||
-- VVPastNeg => "couldn't" ; --# notpresent
|
||||
-- VVPresNeg => "can't"
|
||||
-- } ;
|
||||
-- typ = VVAux
|
||||
-- } ;
|
||||
-- during_Prep = mkPrep "during" ;
|
||||
-- either7or_DConj = mkConj "either" "or" singular ;
|
||||
-- everybody_NP = regNP "everybody" singular ;
|
||||
-- every_Det = mkDeterminerSpec singular "every" "everyone" False ;
|
||||
-- everything_NP = regNP "everything" singular ;
|
||||
-- everywhere_Adv = mkAdv "everywhere" ;
|
||||
-- few_Det = mkDeterminer plural "few" ;
|
||||
-- for_Prep = mkPrep "for" ;
|
||||
-- from_Prep = mkPrep "from" ;
|
||||
-- here_Adv = mkAdv "here" ;
|
||||
-- here7to_Adv = mkAdv ["to here"] ;
|
||||
-- here7from_Adv = mkAdv ["from here"] ;
|
||||
-- how_IAdv = ss "how" ;
|
||||
-- how8much_IAdv = ss "how much" ;
|
||||
-- how8many_IDet = mkDeterminer plural ["how many"] ;
|
||||
-- if_Subj = ss "if" ;
|
||||
-- in8front_Prep = mkPrep ["in front of"] ;
|
||||
-- in_Prep = mkPrep "in" ;
|
||||
-- less_CAdv = C.mkCAdv "less" "than" ;
|
||||
-- many_Det = mkDeterminer plural "many" ;
|
||||
-- more_CAdv = C.mkCAdv "more" "than" ;
|
||||
-- most_Predet = ss "most" ;
|
||||
-- much_Det = mkDeterminer singular "much" ;
|
||||
-- must_VV = {
|
||||
-- s = table {
|
||||
-- VVF VInf => ["have to"] ;
|
||||
-- VVF VPres => "must" ;
|
||||
-- VVF VPPart => ["had to"] ;
|
||||
-- VVF VPresPart => ["having to"] ;
|
||||
-- VVF VPast => ["had to"] ; --# notpresent
|
||||
-- VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||
-- VVPresNeg => "mustn't"
|
||||
-- } ;
|
||||
-- typ = VVAux
|
||||
-- } ;
|
||||
-- no_Utt = ss "no" ;
|
||||
-- on_Prep = mkPrep "on" ;
|
||||
-- only_Predet = ss "only" ;
|
||||
-- or_Conj = mkConj "or" singular ;
|
||||
-- otherwise_PConj = ss "otherwise" ;
|
||||
-- part_Prep = mkPrep "of" ;
|
||||
-- please_Voc = ss "please" ;
|
||||
-- possess_Prep = mkPrep "of" ;
|
||||
-- quite_Adv = mkAdv "quite" ;
|
||||
-- so_AdA = mkAdA "so" ;
|
||||
-- somebody_NP = regNP "somebody" singular ;
|
||||
-- someSg_Det = mkDeterminer singular "some" ;
|
||||
-- somePl_Det = mkDeterminer plural "some" ;
|
||||
-- something_NP = regNP "something" singular ;
|
||||
-- somewhere_Adv = mkAdv "somewhere" ;
|
||||
-- that_Quant = mkQuant "that" "those" ;
|
||||
-- there_Adv = mkAdv "there" ;
|
||||
-- there7to_Adv = mkAdv "there" ;
|
||||
-- there7from_Adv = mkAdv ["from there"] ;
|
||||
-- therefore_PConj = ss "therefore" ;
|
||||
-- this_Quant = mkQuant "this" "these" ;
|
||||
-- through_Prep = mkPrep "through" ;
|
||||
-- too_AdA = mkAdA "too" ;
|
||||
-- to_Prep = mkPrep "to" ;
|
||||
-- under_Prep = mkPrep "under" ;
|
||||
-- very_AdA = mkAdA "very" ;
|
||||
-- want_VV = mkVV (regV "want") ;
|
||||
-- whatPl_IP = mkIP "what" "what" "what's" plural ;
|
||||
-- whatSg_IP = mkIP "what" "what" "what's" singular ;
|
||||
-- when_IAdv = ss "when" ;
|
||||
-- when_Subj = ss "when" ;
|
||||
-- where_IAdv = ss "where" ;
|
||||
-- which_IQuant = {s = \\_ => "which"} ;
|
||||
-- whoPl_IP = mkIP "who" "whom" "whose" plural ;
|
||||
-- whoSg_IP = mkIP "who" "whom" "whose" singular ;
|
||||
-- why_IAdv = ss "why" ;
|
||||
-- without_Prep = mkPrep "without" ;
|
||||
-- with_Prep = mkPrep "with" ;
|
||||
-- yes_Utt = ss "yes" ;
|
||||
|
||||
-- not_predet = {s = "not" ; lock_Predet = <>} ;
|
||||
-- no_Quant = mkQuant "no" "no" "none" "none" ;
|
||||
-- if_then_Conj = mkConj "if" "then" singular ;
|
||||
-- nobody_NP = regNP "nobody" singular ;
|
||||
-- nothing_NP = regNP "nothing" singular ;
|
||||
|
||||
-- at_least_AdN = mkAdN "at least" ;
|
||||
-- at_most_AdN = mkAdN "at most" ;
|
||||
|
||||
-- except_Prep = mkPrep "except" ;
|
||||
|
||||
-- as_CAdv = C.mkCAdv "as" "as" ;
|
||||
|
||||
-- have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
||||
-- that_Subj = ss "that" ;
|
||||
|
||||
lin language_title_Utt = ss "Malti" ;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- John J. Camilleri, 2012
|
||||
-- Licensed under LGPL
|
||||
|
||||
--# -path=.:abstract:common
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete SymbolMlt of Symbol = CatMlt ** open Prelude, ResMlt in {
|
||||
|
||||
|
||||
@@ -7,6 +7,28 @@
|
||||
concrete VerbMlt of Verb = CatMlt ** open Prelude, ResMlt in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
-- V -> VP ;
|
||||
UseV = predV ;
|
||||
|
||||
-- V2 -> VPSlash
|
||||
SlashV2a = predV ;
|
||||
|
||||
-- VPSlash -> NP -> VP
|
||||
ComplSlash vp np =
|
||||
case np.isPron of {
|
||||
-- Join pron to verb
|
||||
True => {
|
||||
s = \\vpf,ant,pol =>
|
||||
let bits = vp.s ! vpf ! ant ! pol in
|
||||
mkVParts (glue bits.stem (np.s ! CPrep)) bits.pol ;
|
||||
s2 = \\agr => [] ;
|
||||
} ;
|
||||
|
||||
-- Insert obj to VP
|
||||
_ => insertObj (\\agr => np.s ! CPrep) vp
|
||||
} ;
|
||||
|
||||
-- Comp
|
||||
-- VP
|
||||
-- VPSplash
|
||||
|
||||
Reference in New Issue
Block a user