Merge pull request #398 from LauretteM/master

Updates to Zulu
This commit is contained in:
Inari Listenmaa
2022-05-12 06:22:37 +02:00
committed by GitHub
11 changed files with 199 additions and 85 deletions

View File

@@ -11,7 +11,7 @@ concrete BackwardZul of Backward = CatZul ** open ResZul,Prelude,ParamX in {
ComplV2 v2 np = {
s = table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = (VFIndic MainCl p t) ;
tp = tensePref vform v2.r v2.syl ; -- [] / zo- / zuku-
oc = objConc np.agr v2.r v2.syl ; -- [] / m -
@@ -25,7 +25,7 @@ concrete BackwardZul of Backward = CatZul ** open ResZul,Prelude,ParamX in {
True => tp ++ oc ++ r ++ obj ;
False => tp ++ r ++ obj
} ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = (VFIndic RelCl p t) ;
rc = relConc vform a v2.r ; -- o- / onga-
tp = tensePref vform v2.r v2.syl ; -- [] / zo- / zuku-

View File

@@ -46,7 +46,7 @@ concrete CatZul of Cat = CommonX - [Temp,Tense,Adv,IAdv] **
-- Verb
VP = {
s : CType => Agr => Polarity => BasicTense => Str ; -- TODO: mood
s : CType => Agr => Polarity => BasicTense => Bool => Str ; -- TODO: mood
-- oc : Str ;
comp : Str ;
iadv : Str ;

View File

@@ -71,7 +71,7 @@ concrete RelativeZul of Relative = CatZul ** open ResZul,Prelude,ParamX in {
-- ++ (tensePref vform)
-- ++ vp.oc
-- ++ vp.s!(rform vform_main reqLF)
++ vp.s!RelCl!a!p!t
++ vp.s!RelCl!a!p!t!reqLF
-- ++ relsuf
++ vp.iadv
++ vp.comp
@@ -89,7 +89,7 @@ concrete RelativeZul of Relative = CatZul ** open ResZul,Prelude,ParamX in {
-- naively removed subject
rp.s ++
-- pcp ++
vp.s!RelCl!a!p!t ++
vp.s!RelCl!a!p!t!False ++
vp.iadv ++
vp.advs
} ;
@@ -109,7 +109,7 @@ concrete RelativeZul of Relative = CatZul ** open ResZul,Prelude,ParamX in {
-- naively removed subject
rp.s ++
-- pcp ++
vp.s!RelCl!a!p!t ++
vp.s!RelCl!a!p!t!False ++
vp.iadv ++
vp.advs
} ;
@@ -124,7 +124,7 @@ concrete RelativeZul of Relative = CatZul ** open ResZul,Prelude,ParamX in {
-- naively removed subject
rp.s ++
pcp ++
vp.s!RelCl!a!p!t ++
vp.s!RelCl!a!p!t!False ++
vp.iadv ++
vp.advs
} ;
@@ -140,7 +140,7 @@ concrete RelativeZul of Relative = CatZul ** open ResZul,Prelude,ParamX in {
in
rp.s ++
-- adjpref ++
vp.s!RelCl!a!p!t
vp.s!RelCl!a!p!t!False
++ vp.iadv ++ vp.advs
} ;

View File

@@ -642,30 +642,6 @@ resource ResZul = open Prelude,Predef,ParamX in {
t = RelType
} ;
-- enumAdj : Str -> { s : AForm => Str ; empty : Str ; t : AType } = \a ->
-- {
-- s = \\_ => a ;
-- -- b = case a of {
-- -- ("kh"|"th"|"sh"|"b"|"f"|"hl")+_ => True ;
-- -- ("m"|"n")+_ => True ;
-- -- _ => False
-- -- } ;
-- empty = [] ;
-- t = EnumType
-- } ;
-- relSuf : VForm -> Bool -> Str = \longform ->
-- case longform of {
-- True => pre { #vowel => [] ; #cons => [] ; "y" => [] ; _ => "yo" } ;
-- False => []
-- } ;
rel_yo : Str = pre {
#vowel => [] ;
#cons => [] ;
_ => BIND++"yo"
} ;
rel_yo_2 : Str = BIND++"yo" ;
relSuf : VForm -> Str = \vform -> case vform of {
@@ -1204,6 +1180,11 @@ resource ResZul = open Prelude,Predef,ParamX in {
-- FutTense => subjConcLookup ! agr ! SC ++BIND++ "zobe"
-- } ;
impPref : Polarity -> Str = \pol -> case pol of {
Pos => [] ;
Neg => "u" ++BIND++ "nga" ++BIND
} ;
icomp_pref : VForm -> Agr -> Str = \vform,agr ->
let
neg1 = icompNeg1 vform ;

View File

@@ -12,8 +12,14 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
CopEq => cl_with_eq_cop_predicate np vp ;
-- VACompl => cl_with_ap_comp_predicate np vp ;
AdvComp => cl_with_adv_comp_predicate np vp ;
(NoComp | VNPCompl) => {
s = \\p,t => np.s!NFull ++ (verb_prefix vp p t np.agr) ++ vp.s!MainCl!np.agr!p!t ++ vp.comp ++ vp.iadv ++ vp.advs ;
(NoComp | VNPCompl) =>
let
longform_suffix = case vp.hasComp of {
True => False ;
False => True
}
in {
s = \\p,t => np.s!NFull ++ (verb_prefix vp p t np.agr) ++ vp.s!MainCl!np.agr!p!t!longform_suffix ++ vp.comp ++ vp.iadv ++ vp.advs ;
} ;
_ => cl_with_verb_predicate np vp
} ;
@@ -39,8 +45,8 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
in case vp.vptype of {
VNPCompl => {
s = table {
Pos => vp.s!MainCl!np.agr!Pos!impTense ++ vp.comp ++ vp.iadv ++ vp.advs ;
Neg => "unga" ++ vp.s!MainCl!np.agr!Neg!impTense ++ vp.comp ++ vp.iadv ++ vp.advs
Pos => vp.s!MainCl!np.agr!Pos!impTense!False ++ vp.comp ++ vp.iadv ++ vp.advs ;
Neg => "unga" ++ vp.s!MainCl!np.agr!Neg!impTense!False ++ vp.comp ++ vp.iadv ++ vp.advs
}
} ;
@@ -108,7 +114,7 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
subj = np.s!NFull
in
subj ++
vp.s!MainCl!np.agr!p!t
vp.s!MainCl!np.agr!p!t!False
++ vp.comp ++ vp.iadv ++ vp.advs
} ;
@@ -118,49 +124,52 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
subj = np.s!NFull ;
vform_main = VFIndic MainCl p t ;
in
subj
++ (imp_verb_prefix vp p t np.agr)
++ vp.s!MainCl!np.agr!p!t
impPref p
++ vp.s!MainCl!np.agr!p!t!False
++ vp.iadv
++ vp.comp
++ vp.advs
} ;
imp_verb_prefix : VP -> Polarity -> BasicTense -> Agr -> Str = \vp,p,t,agr ->
let
-- vow = case <vp.hasComp,vp.r,p,t> of {
vow = case <vp.hasComp,p,t,vp.r> of {
<False,Pos,PresTense,RC> => False ; -- force the compiler to understand the table
<False,Pos,PresTense,_> => False ; -- long form ya
<_,_,PresTense,RC> => False ;
<_,_,PresTense,_> => True ;
-- <_,Pos,PerfTense,RC> => False ;
-- <_,Pos,PerfTense,_> => True ;
<_,_,PastTense,RC> => False ;
<_,_,PastTense,_> => True ;
<_,_,RemPastTense,RC> => False ;
<_,_,RemPastTense,_> => True ;
<_,_,_,_> => False
} ;
vform = VFIndic MainCl p t
in
(negPref vform)
-- ++ (exclSePref vform_main)
++ (subjConc vform agr vow)
-- ++ (negPref2 vform_main)
-- ++ (tensePref vform)
;
-- imp_verb_prefix : VP -> Polarity -> BasicTense -> Agr -> Str = \vp,p,t,agr ->
-- let
-- -- vow = case <vp.hasComp,vp.r,p,t> of {
-- vow = case <vp.hasComp,p,t,vp.r> of {
-- <False,Pos,PresTense,RC> => False ; -- force the compiler to understand the table
-- <False,Pos,PresTense,_> => False ; -- long form ya
--
-- <_,_,PresTense,RC> => False ;
-- <_,_,PresTense,_> => True ;
-- -- <_,Pos,PerfTense,RC> => False ;
-- -- <_,Pos,PerfTense,_> => True ;
-- <_,_,PastTense,RC> => False ;
-- <_,_,PastTense,_> => True ;
-- <_,_,RemPastTense,RC> => False ;
-- <_,_,RemPastTense,_> => True ;
-- <_,_,_,_> => False
-- } ;
-- vform = VFIndic MainCl p t
-- in
-- (negPref vform)
-- -- ++ (exclSePref vform_main)
-- ++ (subjConc vform agr vow)
-- -- ++ (negPref2 vform_main)
-- -- ++ (tensePref vform)
-- ;
cl_with_verb_predicate : NP -> VP -> { s : Polarity => BasicTense => Str } = \np,vp -> {
s = \\p,t =>
let
subj = np.s!NFull ;
vform_main = VFIndic MainCl p t ;
longform_suffix = case vp.hasComp of {
True => False ;
False => True
}
in
subj
++ (verb_prefix vp p t np.agr)
++ vp.s!MainCl!np.agr!p!t
++ vp.s!MainCl!np.agr!p!t!longform_suffix
++ vp.iadv
++ vp.comp
++ vp.advs
@@ -209,7 +218,7 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
in
subj ++
-- pcp ++
vp.s!MainCl!np.agr!p!t
vp.s!MainCl!np.agr!p!t!False
++ vp.comp ++ vp.iadv ++ vp.advs
} ;
@@ -240,7 +249,7 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
-- ++ lfya
-- -- ++ (tensePref vform_main)
-- ++ vp.comp
vp.s!MainCl!np.agr!p!t
vp.s!MainCl!np.agr!p!t!False
++ vp.comp ++ vp.iadv ++ vp.advs
} ;

View File

@@ -5,14 +5,14 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
CopAP ap = {
s = case ap.t of {
AdjType => table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
pcp = ap_cop_pref vform a AdjType ; -- u- / uzoba / ube- / waye- / wayenge-
adjpref = adjPref a vform ; -- m-
cop_base = ap.s!(aformN a) -- khulu
in
pcp ++ adjpref ++ cop_base ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = VFIndic RelCl p t ;
rcp = (relConcCop vform a RC) ; -- o-
pcp = ap_cop_pref vform a AdjType ; -- [] / -nge- / zoba / -be- / -benge- -waye- / -wayenge-
@@ -22,13 +22,13 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
rcp ++ pcp ++ adjpref ++ cop_base
} ;
RelType => table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
pcp = ap_cop_pref vform a RelType ; -- u-
cop_base = ap.s!AF1 -- qotho
in
pcp ++ cop_base ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = VFIndic RelCl p t ;
rcp = (relConcCop vform a RC) ; -- o-
pcp = ap_cop_pref vform a RelType ; -- [] / -nge- / zoba / -benge-
@@ -46,14 +46,14 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
CopNP np = {
s = table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
pcp = (id_pre_cop_pref vform a) ; -- u- / uzoba / akazukuba
cp = (id_cop_pref np.agr) ; -- ng-
cop_base = np.s!NFull -- umfundi
in
pcp ++ cp ++ cop_base ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = VFIndic RelCl p t ;
rcp = (relConcCop vform a RC) ; -- o-
pcp = (id_pre_cop_pref vform a) ; -- [] / zoba / zukuba
@@ -71,14 +71,14 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
CopNPAssoc np = {
s = table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
pcp = (assoc_pre_cop_pref vform a) ; -- u- / uzoba
cp = (assoc_cop_pref p np.agr) ; -- ne-
cop_base = np.s!NReduced -- moto
in
pcp ++ cp ++ cop_base ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = VFIndic RelCl p t ;
rcp = (relConcCop vform a RC) ; -- o-
pcp = (assoc_pre_cop_pref vform a) ; -- [] / zoba
@@ -96,7 +96,7 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
ComplV2Nonspec v2 np = {
s = table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
tp = tensePref vform v2.r v2.syl ;
oc = objConc np.agr v2.r v2.syl ;
@@ -113,7 +113,7 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
True => tp ++ oc ++ r ++ obj ;
False => tp ++ r ++ obj
} ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = (VFIndic RelCl p t) ;
rc = relConc vform a v2.r ;
tp = tensePref vform v2.r v2.syl ;
@@ -141,7 +141,7 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
} ;
CopLoc loc = {
s = loc.s ;
s = \\c,a,p,t,l => loc.s!c!a!p!t ;
comp,advs,iadv = [] ;
hasComp = True ;
r = RC ;

View File

@@ -5,18 +5,21 @@ concrete VerbZul of Verb = CatZul ** open ResZul, Prelude, ParamX in {
lin
UseV v = {
s = table {
MainCl => \\a,p,t => let
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
tp = tensePref vform v.r v.syl ; -- [] / zo- / zuku-
r = v.s!(rform (VFIndic MainCl p t) True) -- hamba
r = v.s!(rform (VFIndic MainCl p t) l) -- hamba
-- rest of verb prefix built later (eg no "ya" with certain question words)
in tp ++ r ;
RelCl => \\a,p,t => let
RelCl => \\a,p,t,l => let
vform = VFIndic RelCl p t ;
rc = relConc vform a v.r ; -- o-
tp = tensePref vform v.r v.syl ; -- [] / zo- / zuku-
r = v.s!(rform vform True) ; -- hamba
suf = relSuf vform -- [] / -yo
r = v.s!(rform vform l) ; -- hamba
suf = case l of {
True => relSuf vform ;
False => []
} ;
in rc ++ tp ++ r ++ suf
} ;
iadv, advs, comp = [] ;
@@ -192,7 +195,7 @@ concrete VerbZul of Verb = CatZul ** open ResZul, Prelude, ParamX in {
-- }
-- } ;
AdvVP vp adv = vp ** { advs = vp.advs ++ adv.s } ;
AdvVP vp adv = vp ** { advs = vp.advs ++ adv.s ; hasComp = True } ;
-- {
-- s = vp.s ;
-- oc = vp.oc ;

View File

@@ -78,4 +78,6 @@ abstract DevLex = Cat ** {
ngaphezu_Adv : Adv ;
-- kakhulu_AdA : AdA ;
lapho_Adv : Adv ;
}

View File

@@ -76,4 +76,6 @@ concrete DevLexZul of DevLex = CatZul ** open ResZul,ParadigmsZul in {
ngaphezu_Adv = mkAdv "ngaphezu" ;
-- kakhulu_AdA = { s = "kakhulu" } ;
lapho_Adv = mkAdv "lapho" ;
}

View File

@@ -1,6 +1,64 @@
abstract MultiLex = Cat ** {
fun
big_A : A ;
bad_A : A ;
beautiful_A : A ;
better_A : A ;
bitter_A : A ;
black_A : A ;
blue_A : A ;
blunt_A : A ;
brown_A : A ;
busy_A : A ;
certain_A : A ;
cold_A : A ;
colourful_A : A ;
difficult_A : A ;
easy_A : A ;
few_A : A ;
five_A : A ;
four_A : A ;
green_A : A ;
grey_A : A ;
hard_A : A ;
holy_A : A ;
honest_A : A ;
hwvy_A : A ;
innocent_A : A ;
kind_A : A ;
light_A : A ;
long_A : A ;
many_A : A ;
most_important_A : A ;
new_A : A ;
old_A : A ;
one_A : A ;
orange_A : A ;
overcast_A : A ;
painful_A : A ;
peaceful_A : A ;
pink_A : A ;
pleasant_A : A ;
poor_A : A ;
purple_A : A ;
red_A : A ;
sharp_A : A ;
short_A : A ;
small_A : A ;
soft_A : A ;
sour_A : A ;
spotted_A : A ;
strong_A : A ;
sweet_A : A ;
tasteless_A : A ;
three_A : A ;
two_A : A ;
wet_A : A ;
white_A : A ;
wide_A : A ;
yellow_A : A ;
-- nouns
ability_N : N ;
accident_N : N ;

View File

@@ -1,6 +1,65 @@
concrete MultiLexZul of MultiLex = CatZul ** open ResZul,ParadigmsZul in {
lin
-- adjectives
big_A = mkA "khulu" ;
bad_A = mkA "bi" ;
beautiful_A = mkA "hle" ;
better_A = mkA "ngcono" ;
bitter_A = mkA "munyu" ;
black_A = mkA "mnyama" ;
blue_A = mkA "luhlaza" ;
blunt_A = mkA "buthuntu" ;
brown_A = mkA "nsundu" ;
busy_A = mkA "matasatosa" ;
certain_A = mkA "thile" ;
cold_A = mkA "makhaza" ;
colourful_A = mkA "makhwezikhwezi" ;
difficult_A = mkA "nzima" ;
easy_A = mkA "lula" ;
few_A = mkA "mbalwa" ;
five_A = mkA "hlonu" ;
four_A = mkA "ne" ;
green_A = mkA "luhlaza" ;
grey_A = mkA "mpunga" ;
hard_A = mkA "lukhuni" ;
holy_A = mkA "ngcwele" ;
honest_A = mkA "qotho" ;
hwvy_A = mkA "nzima" ;
innocent_A = mkA "msulwa" ;
kind_A = mkA "mnene" ;
light_A = mkA "lula" ;
long_A = mkA "de" ;
many_A = mkA "ningi" ;
most_important_A = mkA "mqoka" ;
new_A = mkA "sha" ;
old_A = mkA "dolo" ;
one_A = mkA "nye" ;
orange_A = mkA "sawolintshi" ;
overcast_A = mkA "mathumbenkala" ;
painful_A = mkA "buhlungu" ;
peaceful_A = mkA "thule" ;
pink_A = mkA "bomvana" ;
pleasant_A = mkA "mnandi" ;
poor_A = mkA "mpofu" ;
purple_A = mkA "bunsomi" ;
red_A = mkA "bomvu" ;
sharp_A = mkA "bukhali" ;
short_A = mkA "fushane" ;
small_A = mkA "ncane" ;
soft_A = mkA "ntofontofo" ;
sour_A = mkA "munyu" ;
spotted_A = mkA "mabalabala" ;
strong_A = mkA "qatha" ;
sweet_A = mkA "mtoti" ;
tasteless_A = mkA "duma" ;
three_A = mkA "thathu" ;
two_A = mkA "bili" ;
wet_A = mkA "manzi" ;
white_A = mkA "mhlophe" ;
wide_A = mkA "banzi" ;
yellow_A = mkA "phuzi" ;
-- nouns
ability_N = mkN "khono" C5_6 ;
accident_N = mkN "ngozi" C9_10 ;