1
0
forked from GitHub/gf-rgl

(zul) changes to improve coverage (VulaBula)

This commit is contained in:
Laurette Marais
2022-08-03 08:39:08 +02:00
parent f634af931e
commit e9940f32c5
22 changed files with 205 additions and 64 deletions

View File

@@ -19,6 +19,19 @@ concrete ExtraExtZul of ExtraExt =
} ;
lin
ExistNP np = {
s = let
cp = (id_cop_pref np.agr) ; -- ng-
cop_base = np.s!NFull -- umfundi
in
cp ++ cop_base ;
} ;
GreetSg = {
s = "sawubona"
} ;
GreetPl = {
s = "sanibonani"
} ;
-- PotQS pol qcl = {
-- s = pol.s ++ qcl.potqcl!pol.p!Princ ;
-- qword_pre = qcl.qword_pre ;

View File

@@ -57,7 +57,7 @@ concrete NounExtZul of NounExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
-- TODO : check mod
ApposCN cn n = {
s = \\num,nform => cn.s!num!nform ++ n.s!num!nform ;
s = \\num,nform => cn.s!num!nform ++ n.s!num!NFull ;
-- mod = \\num => n.s!num!Full ++ cn.mod!num ;
c = cn.c ; -- takes agr of cn
empty = cn.empty ;
@@ -66,7 +66,7 @@ concrete NounExtZul of NounExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
-- TODO : check mod
ApposN cn n = {
s = \\num,nform => cn.s!num!nform ++ n.s!num!nform ;
s = \\num,nform => cn.s!num!nform ++ n.s!num!NFull ;
-- mod = \\num => n.s!num!Full ++ cn.mod!num ;
c = n.c ; -- takes agr of n
empty = cn.empty ;

View File

@@ -57,7 +57,17 @@ concrete NounZul of Noun = CatZul ** open ResZul, Prelude, ParamX in {
}
} ;
-- PredetNP, PPartNP, AdvNP, ExtAdvNP : not implemented
-- PredetNP, PPartNP, ExtAdvNP : not implemented
AdvNP np adv = {
empty = np.empty ;
s = \\nform => np.s!nform ++ adv.s ;
agr = np.agr ;
i = np.i ;
proDrop = False ; -- probably right?
isPron = np.isPron ;
heavy = True
} ;
-- TODO: refactor
RelNP np rs = {

View File

@@ -6,7 +6,7 @@ concrete PChunkZul of PChunk = CatZul, CatExtZul, SymbolZul [Symb] **
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
Chunk_AP, Chunk_Adv, Chunk_S, Chunk_RS, Chunk_QS, Chunk_CN, Chunk_NP, Chunk_N, Chunk_Symb = {s: Str} ;
Chunk_Phr, Chunk_AP, Chunk_Adv, Chunk_Imp, Chunk_S, Chunk_RS, Chunk_QS, Chunk_CN, Chunk_NP, Chunk_N, Chunk_Symb = {s: Str} ;
VC = V ;
@@ -15,7 +15,9 @@ concrete PChunkZul of PChunk = CatZul, CatExtZul, SymbolZul [Symb] **
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
Phr_Chunker c = c ;
Adv_Chunker c = c ;
Imp_Chunker c = c ;
S_Chunker c = c ;
RS_Chunker c = c ;
QS_Chunker c = c ;
@@ -26,7 +28,9 @@ concrete PChunkZul of PChunk = CatZul, CatExtZul, SymbolZul [Symb] **
Postdet_Chunker c = c ;
Symb_Chunker c = c ;
Phr_Chunk p = {s = p.s } ;
Adv_Chunk a = { s = a.s } ;
Imp_Chunk i = { s = variants { i.s!Pos ; i.s!Neg} } ;
S_Chunk s = { s = s.s } ;
RS_Chunk rs = { s = rs.s!agr_vars } ;
QS_Chunk s = { s = s.qword_pre ++ s.s ++ s.qword_post } ;
@@ -39,7 +43,8 @@ concrete PChunkZul of PChunk = CatZul, CatExtZul, SymbolZul [Symb] **
NP_Nom_Chunk np = {
s = variants {
np.s!NFull ;
np.s!NReduced
np.s!NReduced ;
np.s!NLoc
}
} ;
NP_Gen_Chunk np = {

View File

@@ -72,12 +72,13 @@ resource ParadigmsZul = open
oper
mkN = overload {
mkN : (ngane : Str) -> ClassGender -> N = \n,c -> lin N (regNoun n c) ; -- "thing" nouns
mkN : (khaya, khaya : Str) -> ClassGender -> N = \n,n2,c -> lin N (mkELocN n c) ; -- "thing" nouns
mkN : (nyaka,onyakeni,eminyakeni : Str) -> ClassGender -> N = \n,ls,lp,c -> lin N (semiRegNoun n ls lp c) ;
mkN : (iso,amehlo,esweni,emehlweni : Str) -> ClassGender -> N = \ns,np,ls,lp,c -> lin N (mkNoun ns np ls lp c) ;
} ;
mkPN = overload {
mkPN : (John : Str) -> N = \n -> lin N (regNoun n C1a_2a) ;
mkPN : (John : Str) -> N = \n -> lin N (regNoun n C1a_2a) ;
mkPN : (John : Str) -> ClassGender -> N = \n,c -> lin N (regNoun n c) ; -- "thing" nouns
mkPN : (nyaka,onyakeni,eminyakeni : Str) -> ClassGender -> N = \n,ls,lp,c -> lin N (semiRegNoun n ls lp c) ;
mkPN : (iso,amehlo,esweni,emehlweni : Str) -> ClassGender -> N = \ns,np,ls,lp,c -> lin N (mkNoun ns np ls lp c) ;

19
src/zulu/PhraseExtZul.gf Normal file
View File

@@ -0,0 +1,19 @@
concrete PhraseExtZul of PhraseExt = CatZul,CatExtZul ** open ResZul, Prelude, ParamX in {
lin
DirectSpeech phr t v np = {
s = let
vform = case t.t of {
PastTense => v.s!R_e ;
PresTense => v.s!R_a ;
_ => v.s!R_a ++ "*"
} ;
in
phr.s ++ "ku" ++ BIND ++ vform ++ np.s!NFull ++ t.s
} ;
ExtPhrConj p1 p2 = {
s = p1.s ++ p2.s
} ;
}

View File

@@ -23,6 +23,6 @@ concrete PhraseZul of Phrase = CatZul ** open Prelude, ResZul in {
-- PConjConj conj = {s = conj.s2} ; ---
NoVoc = {s = []} ;
-- VocNP np = {s = frontComma ++ np.s ! npNom} ;
VocNP np = {s = np.s ! NReduced } ;
}

View File

@@ -48,16 +48,28 @@ resource ResZul = open Prelude,Predef,ParamX in {
prefix_nasal : Str -> Str = \r -> case r of {
"ph"+x => "mp" + x ;
"Ph"+x => "mP" + x ;
"bh"+x => "mb" + x ;
#nasal_de_asp+"h"+x => "n"+(take 1 r) + x ;
"Bh"+x => "mB" + x ;
(#nasal_de_asp|#nasal_de_asp_cap)+"h"+x => "n"+(take 1 r) + x ;
"hl"+x => "nhl"+x ;
"Hl"+x => "Nhl"+x ;
"h"+x => "nk"+x ;
"H"+x => "Nk"+x ;
"sh"+x => "ntsh"+x ;
"Sh"+x => "Ntsh"+x ;
"l"+x => "nd"+x ;
"L"+x => "Nd"+x ;
#nasal_m+x => "m"+r ;
#nasal_m_cap+x => "M"+r ;
#nasal_ng+x => "ng"+r ;
#nasal_ng_cap+x => "Ng"+r ;
#nasal+x => r ;
#nasal_cap+x => r ;
"p"+x => "mp" + x ;
"P"+x => "Mp" + x ;
#vowel_cap+x => "N" + r ;
#cons_cap+x => "N" + r ;
_ => "n"+r
} ;
--------------
@@ -892,49 +904,49 @@ resource ResZul = open Prelude,Predef,ParamX in {
<C1a_2a,Sg> => "ku"+root ;
<C1a_2a,Pl> => "ko"+root ;
<C3_4,Sg> => case root of {
"m"+_ => "e"+root ;
("m"|"M")+_ => "e"+root ;
_ => "em"+root
} ;
<C3_4,Pl> => "emi"+root ;
<C5_6,Sg> => case root of {
"i"+_ => "e" + (last root) ;
#vowel+_ => "el" + root ;
("i"|"I")+_ => "e" + (last root) ;
(#vowel|#vowel_cap)+_ => "el" + root ;
_ => "e"+root -- ili long form (not used?)
} ;
<C5_6,Pl> => case root of {
"i"+_ => "eme"+ (last root) ;
#vowel+_ => "em"+root ;
("i"|"I")+_ => "eme"+ (last root) ;
(#vowel|#vowel_cap)+_ => "em"+root ;
_ => "ema"+root
} ; -- ame for roots starting with i
<C7_8,Sg> => case root of {
#vowel+_ => "es"+root ;
(#vowel|#vowel_cap)+_ => "es"+root ;
_ => "esi"+root
} ; -- is for roots starting with vowel
<C7_8,Pl> => case root of {
#vowel+_ => "ez"+root ;
(#vowel|#vowel_cap)+_ => "ez"+root ;
_ => "ezi"+root -- iz for roots starting with vowel
} ;
<C9_10,Sg> => "e"+(prefix_nasal root) ; -- em for labial, en for alveolar (TODO: does this correctly split options?)
<C9_10,Pl> => "ezi"+(prefix_nasal root) ; -- izim for labial, izin for alveolar (TODO: does this correctly split options?)
<C11_10,Sg> => case root of {
#vowel+_ => "olw" + root ;
"w"+_ => "ol"+root ;
(#vowel|#vowel_cap)+_ => "olw" + root ;
("w"|"W")+_ => "ol"+root ;
_ => "o"+root
} ;
<C11_10,Pl> => case root of {
#vowel+_ => "ezilw" + root ;
"w"+_ => "ezil" + root ;
(#vowel|#vowel_cap)+_ => "ezilw" + root ;
("w"|"W")+_ => "ezil" + root ;
_ => "ezi"+(prefix_nasal root)
} ; -- izim for labial, izin for alveolar, izi(n|m)k for roots starting with kh
<C9_6,Sg> => "e"+(prefix_nasal root) ; -- em for labial, en for alveolar (TODO: does this correctly split options?)
<C9_6,Pl> => case root of {
"i"+_ => "eme"+root ;
("i"|"I")+_ => "eme"+root ;
_ => "ema"+root
} ; -- ame for roots starting with i
<C14,_> => "ebu"+root ;
<C15,_> => case root of {
("a"|"e")+_ => "ekw"+root ;
(#cons|"y")+_ => "eku"+root ;
("a"|"e"|"A"|"E")+_ => "ekw"+root ;
(#cons|"y"|#cons_cap|"Y")+_ => "eku"+root ;
_ => "ek"+root
} ; -- ukw for roots starting with a/e, uk for roots starting with o
<C17,_> => "eku"+root -- sometimes ukw
@@ -970,74 +982,80 @@ resource ResZul = open Prelude,Predef,ParamX in {
} ;
vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ;
vowel_cap : pattern Str = #("A"|"E"|"I"|"O"|"U") ;
cons : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ;
cons_cap : pattern Str = #("B"|"C"|"D"|"F"|"G"|"H"|"J"|"K"|"L"|"M"|"N"|"P"|"Q"|"R"|"S"|"T"|"V"|"W"|"X"|"Y"|"Z") ;
labial_cons : pattern Str = #("p"|"b"|"f"|"v"|"w") ;
alveolar_cons : pattern Str = #("s"|"d"|"t"|"z") ;
nasal_de_asp : pattern Str = #("t"|"k"|"x"|"c"|"q") ;
nasal_de_asp_cap : pattern Str = #("T"|"K"|"X"|"C"|"Q") ;
nasal_m : pattern Str = #("v"|"f"|"b") ;
nasal_m_cap : pattern Str = #("V"|"F"|"B") ;
nasal_ng : pattern Str = #("x"|"c"|"q") ;
nasal_ng_cap : pattern Str = #("X"|"C"|"Q") ;
nasal : pattern Str = #("n"|"m") ;
nasal_cap : pattern Str = #("N"|"M") ;
nomNoun : Str -> Number -> ClassGender -> Str = \root,n,cg ->
case <cg,n> of
{
<C1_2,Sg> => case root of {
#vowel+_ => "um"+root ;
(#vowel|#vowel_cap)+_ => "um"+root ;
_+#cons+#vowel+#cons+_+#vowel+_ => "um"+root ;
_ => "umu"+root
} ; -- umu for single syllables, um for the rest
<C1_2,Pl> => case root of {
#vowel+_ => "ab"+root ;
(#vowel|#vowel_cap)+_ => "ab"+root ;
_ => "aba"+root -- abe for tribes or guilds
} ;
<C1a_2a,Sg> => "u"+root ;
<C1a_2a,Pl> => "o"+root ;
<C3_4,Sg> => case root of {
"m"+_+#vowel+#cons+_+#vowel+_ => "u"+root ;
("m"|"M")+_+#vowel+#cons+_+#vowel+_ => "u"+root ;
_+(#cons|"y")+#vowel+#cons+_+#vowel+_ => "um"+root ;
"o"+_ => "um"+root ;
("o"|"O")+_ => "um"+root ;
_ => "umu"+root
} ; -- umu for single syllables, um for the rest
<C3_4,Pl> => "imi"+root ;
<C5_6,Sg> => case root of {
"i"+_ => root ;
#vowel+_ => "il"+root ;
("i"|"I")+_ => root ;
(#vowel|#vowel_cap)+_ => "il"+root ;
_ => "i"+root -- ili long form (not used?)
} ;
<C5_6,Pl> => case root of {
"i"+_ => "ame"+(drop 1 root) ;
#vowel+_ => "am"+root ;
("i"|"I")+_ => "ame"+(drop 1 root) ;
(#vowel|#vowel_cap)+_ => "am"+root ;
_ => "ama"+root
} ; -- ame for roots starting with i
<C7_8,Sg> => case root of {
#vowel+_ => "is"+root ;
(#vowel|#vowel_cap)+_ => "is"+root ;
_ => "isi"+root
} ; -- is for roots starting with vowel
<C7_8,Pl> => case root of {
#vowel+_ => "iz"+root ;
(#vowel|#vowel_cap)+_ => "iz"+root ;
_ => "izi" + root
} ;
<C9_10,Sg> => "i" + prefix_nasal root ;
<C9_10,Pl> => "izi" + prefix_nasal root ;
<C11_10,Sg> => case root of {
#vowel+_ => "ulw"+root ;
"w"+_ => "ul"+root ;
(#vowel|#vowel_cap)+_ => "ulw"+root ;
("w"|"W")+_ => "ul"+root ;
_ => "u"+root
} ;
<C11_10,Pl> => case root of {
#vowel+_ => "izilw"+root ;
"w"+_ => "izil"+root ;
(#vowel|#vowel_cap)+_ => "izilw"+root ;
("w"|"W")+_ => "izil"+root ;
_ => "izi" + prefix_nasal root
} ;
<C9_6,Sg> => "i" + prefix_nasal root ;
<C9_6,Pl> => case root of {
"i"+_ => "ame"+root ;
("i"|"I")+_ => "ame"+root ;
_ => "ama"+root
} ; -- ame for roots starting with i
<C14,_> => "ubu"+root ;
<C15,_> => case root of {
("a"|"e")+_ => "ukw"+root ;
(#cons|"y")+_ => "uku"+root ;
("a"|"e"|"A"|"E")+_ => "ukw"+root ;
(#cons|#cons_cap|"y"|"Y")+_ => "uku"+root ;
_ => "uk"+root
} ; -- ukw for roots starting with a/e, uk for roots starting with o
<C17,_> => "uku"+root -- sometimes ukw
@@ -1047,65 +1065,66 @@ resource ResZul = open Prelude,Predef,ParamX in {
case <cg,n> of
{
<C1_2,Sg> => case root of {
#vowel+_ => "kum"+root ;
(#vowel|#vowel_cap)+_ => "kum"+root ;
_+#cons+#vowel+#cons+_+#vowel+_ => "kum"+root ;
_ => "kumu"+root
} ; -- umu for single syllables, um for the rest
<C1_2,Pl> => case root of {
#vowel+_ => "kub"+root ;
(#vowel|#vowel_cap)+_ => "kub"+root ;
_ => "kuba"+root -- abe for tribes or guilds
} ;
<C1a_2a,Sg> => "ku"+root ;
<C1a_2a,Pl> => "ko"+root ;
<C3_4,Sg> => case root of {
"m"+_ => "e"+(addLocSuffix root) ;
("m"|"M")+_ => "e"+(addLocSuffix root) ;
_ => "em"+(addLocSuffix root)
} ;
<C3_4,Pl> => "emi"+(addLocSuffix root) ;
<C5_6,Sg> => case root of {
"i"+_ => "e"+(addLocSuffix (drop 1 root)) ;
#vowel+_ => "el"+(addLocSuffix root) ;
("i"|"I")+_ => "e"+(addLocSuffix (drop 1 root)) ;
(#vowel|#vowel_cap)+_ => "el"+(addLocSuffix root) ;
_ => "e"+(addLocSuffix root) -- ili long form (not used?)
} ;
<C5_6,Pl> => case root of {
"i"+_ => "eme"+(addLocSuffix (drop 1 root)) ;
#vowel+_ => "em"+(addLocSuffix root) ;
("i"|"I")+_ => "eme"+(addLocSuffix (drop 1 root)) ;
(#vowel|#vowel_cap)+_ => "em"+(addLocSuffix root) ;
_ => "ema"+(addLocSuffix root)
} ; -- ame for roots starting with i
<C7_8,Sg> => case root of {
#vowel+_ => "es"+(addLocSuffix root) ;
(#vowel|#vowel_cap)+_ => "es"+(addLocSuffix root) ;
_ => "esi"+(addLocSuffix root)
} ; -- is for roots starting with vowel
<C7_8,Pl> => case root of {
#vowel+_ => "ez"+(addLocSuffix root) ;
(#vowel|#vowel_cap)+_ => "ez"+(addLocSuffix root) ;
_ => "ezi"+(addLocSuffix root) -- iz for roots starting with vowel
} ;
<C9_10,Sg> => "e"+(addLocSuffix (prefix_nasal root)) ; -- em for labial, en for alveolar (TODO: does this correctly split options?)
<C9_10,Pl> => "ezi"+(addLocSuffix (prefix_nasal root)) ; -- izim for labial, izin for alveolar (TODO: does this correctly split options?)
<C11_10,Sg> => case root of {
#vowel+_ => "olw"+(addLocSuffix root) ;
"w"+_ => "ol"+(addLocSuffix root) ;
(#vowel|#vowel_cap)+_ => "olw"+(addLocSuffix root) ;
("w"|"W")+_ => "ol"+(addLocSuffix root) ;
_ => "o"+(addLocSuffix root)
} ;
<C11_10,Pl> => case root of {
#vowel+_ => "ezilw"+(addLocSuffix root) ;
"w"+_ => "ezil"+(addLocSuffix root) ;
(#vowel|#vowel_cap)+_ => "ezilw"+(addLocSuffix root) ;
("w"|"W")+_ => "ezil"+(addLocSuffix root) ;
_ => "ezi"+(addLocSuffix (prefix_nasal root)) -- izim for labial, izin for alveolar, izi(n|m)k for roots starting with kh
} ;
<C9_6,Sg> => "e"+(addLocSuffix (prefix_nasal root)) ; -- em for labial, en for alveolar (TODO: does this correctly split options?)
<C9_6,Pl> => case root of {
"i"+_ => "eme"+(addLocSuffix root) ;
("i"|"I")+_ => "eme"+(addLocSuffix root) ;
_ => "ema"+(addLocSuffix root)
} ; -- ame for roots starting with i
<C14,_> => "ebu"+(addLocSuffix root) ;
<C15,_> => case root of {
("a"|"e")+_ => "ekw"+(addLocSuffix root) ;
(#cons|"y")+_ => "eku"+root ;
("a"|"e"|"A"|"E")+_ => "ekw"+(addLocSuffix root) ;
(#cons|"y"|#cons_cap|"Y")+_ => "eku"+root ;
_ => "ek"+(addLocSuffix root)
} ; -- ukw for roots starting with a/e, uk for roots starting with o
<C17,_> => "eku"+(addLocSuffix root) -- sometimes ukw
} ;
locS : Agr => Str = table {
Third C1_2 _ => [] ;
Third C1a_2a _ => [] ;

View File

@@ -95,7 +95,7 @@ concrete SentenceZul of Sentence = CatZul ** open Prelude,ResZul,ParamX in {
-- c2 = cl.c2
-- } ;
--
-- AdvS a s = {s = a.s ++ s.s} ;
AdvS a s = {s = a.s ++ s.s} ;
-- ExtAdvS a s = {s = a.s ++ frontComma ++ s.s} ;
--
-- SSubjS a s b = {s = a.s ++ frontComma ++ s.s ++ b.s} ;

View File

@@ -149,4 +149,52 @@ concrete VerbExtZul of VerbExt = CatZul,CatExtZul ** open ResZul, Prelude, Param
vptype = CopLoc
} ;
-- CopPoss np = {
-- s = table {
-- 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 = poss_concord_agr!(Third C17 Sg)!(nominit!np.agr) ++BIND++ np.s!NPoss -- utshani
-- in
-- pcp ++ cp ++ cop_base ;
-- 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
-- cp = (id_cop_pref np.agr) ; -- ng-
-- cop_base = poss_concord_agr!(Third C17 Sg)!(nominit!np.agr) ++BIND++ np.s!NPoss -- utshani
-- in
-- rcp ++ pcp ++ cp ++ cop_base
-- } ;
-- comp, iadv, advs = [] ;
-- hasComp = np.heavy ;
-- r = RC ; -- should not be used
-- syl = SylMult ;
-- vptype = CopIdent
-- } ;
CopQuant qs = {
s = table {
MainCl => \\a,p,t,l => let
vform = VFIndic MainCl p t ;
pcp = ap_cop_pref vform a RelType ; -- u-
cop_base = qs.s!a -- qotho
in
pcp ++ cop_base ;
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-
cop_base = qs.s!a -- qotho
in
rcp ++ pcp ++ cop_base
} ;
comp, iadv, advs = [] ;
hasComp = True ;
r = RC ; -- should not be used
syl = SylMult ;
vptype = CopDescr
} ;
}

View File

@@ -6,6 +6,9 @@ abstract ExtraExt =
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
fun
ExistNP : NP -> S ;
GreetSg : Utt ;
GreetPl : Utt ;
-- PotQS : Pol -> QCl -> QS ;
-- SubjunctS : S -> Utt ;

View File

@@ -3,8 +3,10 @@ abstract PChunk = Cat, CatExt, Symbol [Symb] ** {
cat
Chunks ;
Chunk ;
Chunk_Phr ;
Chunk_AP ;
Chunk_Adv ;
Chunk_Imp ;
Chunk_S ;
Chunk_RS ;
Chunk_QS ;
@@ -21,8 +23,10 @@ fun
PlusChunk : Chunk -> Chunks -> Chunks ;
ChunkPhr : Chunks -> Phr ;
Phr_Chunker : Chunk_Phr -> Chunk ;
-- AP_Chunker : Chunk_AP -> Chunk ;
Adv_Chunker : Chunk_Adv -> Chunk ;
Imp_Chunker : Chunk_Imp -> Chunk ;
S_Chunker : Chunk_S -> Chunk ;
RS_Chunker : Chunk_RS -> Chunk ;
QS_Chunker : Chunk_QS -> Chunk ;
@@ -33,8 +37,10 @@ fun
Postdet_Chunker : Chunk_Postdet -> Chunk ;
Symb_Chunker : Chunk_Symb -> Chunk ;
Phr_Chunk : Phr -> Chunk_Phr ;
-- AP_Chunk : AP -> Chunk_AP ;
Adv_Chunk : Adv -> Chunk_Adv ;
Imp_Chunk : Imp -> Chunk_Imp ;
S_Chunk : S -> Chunk_S ;
RS_Chunk : RS -> Chunk_RS ;
QS_Chunk : QS -> Chunk_QS ;

View File

@@ -0,0 +1,8 @@
abstract PhraseExt = Cat,CatExt ** {
fun
-- direct speech
DirectSpeech: Phr -> Temp -> V -> NP -> Phr ;
ExtPhrConj : Phr -> Phr -> Phr ;
}

View File

@@ -7,6 +7,9 @@ abstract VerbExt = Cat,CatExt ** {
CopNPAssoc : NP -> VP ;
CopLoc : Loc -> VP ;
-- CopPoss : NP -> VP ;
CopQuant : QuantStem -> VP ;
-- BecomeAP : AP -> VP ;
-- BecomeNP : NP -> VP ;
-- BecomeNPAssoc : NP -> VP ;

View File

@@ -6,6 +6,7 @@ abstract NguniChunk =
ExtraExt,
NounExt,
VerbExt,
PhraseExt,
-- MonoLexAbs,
PChunk,
Symbol - [Symb]

View File

@@ -6,6 +6,7 @@ concrete NguniChunkZul of NguniChunk =
ExtraExtZul,
NounExtZul,
VerbExtZul,
PhraseExtZul,
-- MonoLexZul,
PChunkZul,
SymbolZul - [Symb]

View File

@@ -1,16 +1,16 @@
-- All functions are explicitly inherited, in order to allow useful probabilities
abstract NguniGrammar =
Noun [DetCN, UsePron, DetQuant, NumSg, NumPl, UseN, AdjCN, RelCN, PossNP,UsePN, RelNP, PredetNP], -- MassNP,AdvCN, AdvNP,
Noun [DetCN, UsePron, DetQuant, NumSg, NumPl, UseN, AdjCN, RelCN, PossNP,UsePN, RelNP, PredetNP,AdvNP], -- MassNP,AdvCN, AdvNP,
Verb [UseV, ComplVS, ComplVA, SlashV2a, UseComp, AdvVP, CompAP, CompNP, CompAdv, ComplSlash],
Adjective [PositA, AdAP],
Adverb [PositAdvAdj, SubjS],
-- Numeral,
Sentence [PredVP, ImpVP, UseCl, UseQCl, UseRCl],
Sentence [PredVP, ImpVP, UseCl, UseQCl, UseRCl,AdvS],
Question [QuestCl, QuestIAdv, QuestIComp],
Relative [RelVP, IdRP],
-- Conjunction,
Phrase [PhrUtt, UttS, UttQS, UttImpSg, NoPConj, NoVoc],
Phrase [PhrUtt, UttS, UttQS, UttImpSg, NoPConj, NoVoc, VocNP],
Text - [Temp,Adv,IAdv],
Structural [and_Conj,how_IAdv,how8much_IAdv,i_Pron,youSg_Pron,he_Pron,she_Pron,we_Pron,youPl_Pron,they_Pron,this_Quant,that_Quant,all_Predet,only_Predet,very_AdA],
-- Idiom,

View File

@@ -1,16 +1,16 @@
-- All functions are explicitly inherited, in order to allow useful probabilities
concrete NguniGrammarZul of NguniGrammar =
NounZul [DetCN, UsePron, DetQuant, NumSg, NumPl, UseN, AdjCN, RelCN, PossNP,UsePN, RelNP, PredetNP], -- MassNP, AdvCN,AdvNP,
NounZul [DetCN, UsePron, DetQuant, NumSg, NumPl, UseN, AdjCN, RelCN, PossNP,UsePN, RelNP, PredetNP,AdvNP], -- MassNP, AdvCN,AdvNP,
VerbZul [UseV, ComplVS, ComplVA, SlashV2a, UseComp, AdvVP, CompAP, CompNP, CompAdv, ComplSlash],
AdjectiveZul [PositA, AdAP],
AdverbZul [PositAdvAdj, SubjS],
-- Numeral,
SentenceZul [PredVP, ImpVP, UseCl, UseQCl, UseRCl],
SentenceZul [PredVP, ImpVP, UseCl, UseQCl, UseRCl,AdvS],
QuestionZul [QuestCl, QuestIAdv, QuestIComp],
RelativeZul [RelVP, IdRP],
-- ConjunctionZul,
PhraseZul [PhrUtt, UttS, UttQS, UttImpSg, NoPConj, NoVoc],
PhraseZul [PhrUtt, UttS, UttQS, UttImpSg, NoPConj, NoVoc, VocNP],
TextX - [Temp,Adv,IAdv],
StructuralZul [and_Conj,how_IAdv,how8much_IAdv,i_Pron,youSg_Pron,he_Pron,she_Pron,we_Pron,youPl_Pron,they_Pron,this_Quant,that_Quant,all_Predet,only_Predet,very_AdA],
-- Idiom,

View File

@@ -5,7 +5,8 @@ abstract NguniLang =
Backward[ComplV2,ComplV3],
ExtraExt,
NounExt,
VerbExt
VerbExt,
PhraseExt
-- MonoLexAbs,
-- Chunk
-- Symbol - [Symb],

View File

@@ -5,7 +5,8 @@ concrete NguniLangZul of NguniLang =
BackwardZul[ComplV2,ComplV3],
ExtraExtZul,
NounExtZul,
VerbExtZul
VerbExtZul,
PhraseExtZul
-- MonoLexZul,
-- ChunkZul,
-- SymbolZul - [Symb],

View File

@@ -5114,6 +5114,7 @@ zozo_1a_2a_N : N ;
zuka_1a_2a_N : N ;
zulu_1a_2a_N : N ;
zwa_1a_2a_N : N ;
zwekazi_5_6_N : N ;
zwelonke_1a_2a_N : N ;
-- verb roots

View File

@@ -5115,6 +5115,7 @@ zuka_1a_2a_N = mkN "zuka" C1a_2a ;
zulu_1a_2a_N = mkN "zulu" C1a_2a ;
zwa_1a_2a_N = mkN "zwa" C1a_2a ;
zwelonke_1a_2a_N = mkN "zwelonke" C1a_2a ;
zwekazi_5_6_N = mkN "zwekazi" C5_6 ;
-- verb roots
ab_V = mkV "ab" ;