diff --git a/src/zulu/ExtraExtZul.gf b/src/zulu/ExtraExtZul.gf index d19824b8..26ea4cb4 100755 --- a/src/zulu/ExtraExtZul.gf +++ b/src/zulu/ExtraExtZul.gf @@ -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 ; diff --git a/src/zulu/NounExtZul.gf b/src/zulu/NounExtZul.gf index 03e28175..d66cb9f8 100644 --- a/src/zulu/NounExtZul.gf +++ b/src/zulu/NounExtZul.gf @@ -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 ; diff --git a/src/zulu/NounZul.gf b/src/zulu/NounZul.gf index ba8c6bf6..3ca43d9e 100755 --- a/src/zulu/NounZul.gf +++ b/src/zulu/NounZul.gf @@ -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 = { diff --git a/src/zulu/PChunkZul.gf b/src/zulu/PChunkZul.gf index 356c5c8e..70df6955 100644 --- a/src/zulu/PChunkZul.gf +++ b/src/zulu/PChunkZul.gf @@ -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 = { diff --git a/src/zulu/ParadigmsZul.gf b/src/zulu/ParadigmsZul.gf index ede55915..2ea7b1af 100755 --- a/src/zulu/ParadigmsZul.gf +++ b/src/zulu/ParadigmsZul.gf @@ -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) ; diff --git a/src/zulu/PhraseExtZul.gf b/src/zulu/PhraseExtZul.gf new file mode 100644 index 00000000..9f7998dc --- /dev/null +++ b/src/zulu/PhraseExtZul.gf @@ -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 + } ; + +} diff --git a/src/zulu/PhraseZul.gf b/src/zulu/PhraseZul.gf index 7e48ec58..51f2d96f 100755 --- a/src/zulu/PhraseZul.gf +++ b/src/zulu/PhraseZul.gf @@ -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 } ; } diff --git a/src/zulu/ResZul.gf b/src/zulu/ResZul.gf index f41b7d53..e2ab9e44 100755 --- a/src/zulu/ResZul.gf +++ b/src/zulu/ResZul.gf @@ -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 { => "ku"+root ; => "ko"+root ; => case root of { - "m"+_ => "e"+root ; + ("m"|"M")+_ => "e"+root ; _ => "em"+root } ; => "emi"+root ; => 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?) } ; => 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 => case root of { - #vowel+_ => "es"+root ; + (#vowel|#vowel_cap)+_ => "es"+root ; _ => "esi"+root } ; -- is for roots starting with vowel => case root of { - #vowel+_ => "ez"+root ; + (#vowel|#vowel_cap)+_ => "ez"+root ; _ => "ezi"+root -- iz for roots starting with vowel } ; => "e"+(prefix_nasal root) ; -- em for labial, en for alveolar (TODO: does this correctly split options?) => "ezi"+(prefix_nasal root) ; -- izim for labial, izin for alveolar (TODO: does this correctly split options?) => case root of { - #vowel+_ => "olw" + root ; - "w"+_ => "ol"+root ; + (#vowel|#vowel_cap)+_ => "olw" + root ; + ("w"|"W")+_ => "ol"+root ; _ => "o"+root } ; => 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 => "e"+(prefix_nasal root) ; -- em for labial, en for alveolar (TODO: does this correctly split options?) => case root of { - "i"+_ => "eme"+root ; + ("i"|"I")+_ => "eme"+root ; _ => "ema"+root } ; -- ame for roots starting with i => "ebu"+root ; => 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 => "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 of { => 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 => case root of { - #vowel+_ => "ab"+root ; + (#vowel|#vowel_cap)+_ => "ab"+root ; _ => "aba"+root -- abe for tribes or guilds } ; => "u"+root ; => "o"+root ; => 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 => "imi"+root ; => case root of { - "i"+_ => root ; - #vowel+_ => "il"+root ; + ("i"|"I")+_ => root ; + (#vowel|#vowel_cap)+_ => "il"+root ; _ => "i"+root -- ili long form (not used?) } ; => 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 => case root of { - #vowel+_ => "is"+root ; + (#vowel|#vowel_cap)+_ => "is"+root ; _ => "isi"+root } ; -- is for roots starting with vowel => case root of { - #vowel+_ => "iz"+root ; + (#vowel|#vowel_cap)+_ => "iz"+root ; _ => "izi" + root } ; => "i" + prefix_nasal root ; => "izi" + prefix_nasal root ; => case root of { - #vowel+_ => "ulw"+root ; - "w"+_ => "ul"+root ; + (#vowel|#vowel_cap)+_ => "ulw"+root ; + ("w"|"W")+_ => "ul"+root ; _ => "u"+root } ; => case root of { - #vowel+_ => "izilw"+root ; - "w"+_ => "izil"+root ; + (#vowel|#vowel_cap)+_ => "izilw"+root ; + ("w"|"W")+_ => "izil"+root ; _ => "izi" + prefix_nasal root } ; => "i" + prefix_nasal root ; => case root of { - "i"+_ => "ame"+root ; + ("i"|"I")+_ => "ame"+root ; _ => "ama"+root } ; -- ame for roots starting with i => "ubu"+root ; => 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 => "uku"+root -- sometimes ukw @@ -1047,65 +1065,66 @@ resource ResZul = open Prelude,Predef,ParamX in { case of { => 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 => case root of { - #vowel+_ => "kub"+root ; + (#vowel|#vowel_cap)+_ => "kub"+root ; _ => "kuba"+root -- abe for tribes or guilds } ; => "ku"+root ; => "ko"+root ; => case root of { - "m"+_ => "e"+(addLocSuffix root) ; + ("m"|"M")+_ => "e"+(addLocSuffix root) ; _ => "em"+(addLocSuffix root) } ; => "emi"+(addLocSuffix root) ; => 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?) } ; => 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 => case root of { - #vowel+_ => "es"+(addLocSuffix root) ; + (#vowel|#vowel_cap)+_ => "es"+(addLocSuffix root) ; _ => "esi"+(addLocSuffix root) } ; -- is for roots starting with vowel => case root of { - #vowel+_ => "ez"+(addLocSuffix root) ; + (#vowel|#vowel_cap)+_ => "ez"+(addLocSuffix root) ; _ => "ezi"+(addLocSuffix root) -- iz for roots starting with vowel } ; => "e"+(addLocSuffix (prefix_nasal root)) ; -- em for labial, en for alveolar (TODO: does this correctly split options?) => "ezi"+(addLocSuffix (prefix_nasal root)) ; -- izim for labial, izin for alveolar (TODO: does this correctly split options?) => 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) } ; => 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 } ; => "e"+(addLocSuffix (prefix_nasal root)) ; -- em for labial, en for alveolar (TODO: does this correctly split options?) => case root of { - "i"+_ => "eme"+(addLocSuffix root) ; + ("i"|"I")+_ => "eme"+(addLocSuffix root) ; _ => "ema"+(addLocSuffix root) } ; -- ame for roots starting with i => "ebu"+(addLocSuffix root) ; => 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 => "eku"+(addLocSuffix root) -- sometimes ukw } ; + locS : Agr => Str = table { Third C1_2 _ => [] ; Third C1a_2a _ => [] ; diff --git a/src/zulu/SentenceZul.gf b/src/zulu/SentenceZul.gf index 46b2ec70..385b4ebf 100755 --- a/src/zulu/SentenceZul.gf +++ b/src/zulu/SentenceZul.gf @@ -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} ; diff --git a/src/zulu/VerbExtZul.gf b/src/zulu/VerbExtZul.gf index 75e718b2..884a3e8f 100644 --- a/src/zulu/VerbExtZul.gf +++ b/src/zulu/VerbExtZul.gf @@ -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 + } ; + } diff --git a/src/zulu/abstract_ext/ExtraExt.gf b/src/zulu/abstract_ext/ExtraExt.gf index 6bf5c6ab..4da82a19 100755 --- a/src/zulu/abstract_ext/ExtraExt.gf +++ b/src/zulu/abstract_ext/ExtraExt.gf @@ -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 ; diff --git a/src/zulu/abstract_ext/PChunk.gf b/src/zulu/abstract_ext/PChunk.gf index 71814dd6..0322e99d 100644 --- a/src/zulu/abstract_ext/PChunk.gf +++ b/src/zulu/abstract_ext/PChunk.gf @@ -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 ; diff --git a/src/zulu/abstract_ext/PhraseExt.gf b/src/zulu/abstract_ext/PhraseExt.gf new file mode 100644 index 00000000..d662cb96 --- /dev/null +++ b/src/zulu/abstract_ext/PhraseExt.gf @@ -0,0 +1,8 @@ +abstract PhraseExt = Cat,CatExt ** { + + fun + + -- direct speech + DirectSpeech: Phr -> Temp -> V -> NP -> Phr ; + ExtPhrConj : Phr -> Phr -> Phr ; +} diff --git a/src/zulu/abstract_ext/VerbExt.gf b/src/zulu/abstract_ext/VerbExt.gf index db4105e2..b20eed65 100644 --- a/src/zulu/abstract_ext/VerbExt.gf +++ b/src/zulu/abstract_ext/VerbExt.gf @@ -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 ; diff --git a/src/zulu/grammar_ext/NguniChunk.gf b/src/zulu/grammar_ext/NguniChunk.gf index c7095cbb..a3ffef7a 100755 --- a/src/zulu/grammar_ext/NguniChunk.gf +++ b/src/zulu/grammar_ext/NguniChunk.gf @@ -6,6 +6,7 @@ abstract NguniChunk = ExtraExt, NounExt, VerbExt, + PhraseExt, -- MonoLexAbs, PChunk, Symbol - [Symb] diff --git a/src/zulu/grammar_ext/NguniChunkZul.gf b/src/zulu/grammar_ext/NguniChunkZul.gf index 0270a622..f92e537d 100755 --- a/src/zulu/grammar_ext/NguniChunkZul.gf +++ b/src/zulu/grammar_ext/NguniChunkZul.gf @@ -6,6 +6,7 @@ concrete NguniChunkZul of NguniChunk = ExtraExtZul, NounExtZul, VerbExtZul, + PhraseExtZul, -- MonoLexZul, PChunkZul, SymbolZul - [Symb] diff --git a/src/zulu/grammar_ext/NguniGrammar.gf b/src/zulu/grammar_ext/NguniGrammar.gf index b09542b0..82dc0079 100755 --- a/src/zulu/grammar_ext/NguniGrammar.gf +++ b/src/zulu/grammar_ext/NguniGrammar.gf @@ -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, diff --git a/src/zulu/grammar_ext/NguniGrammarZul.gf b/src/zulu/grammar_ext/NguniGrammarZul.gf index 0e6b55f1..6ce18bac 100755 --- a/src/zulu/grammar_ext/NguniGrammarZul.gf +++ b/src/zulu/grammar_ext/NguniGrammarZul.gf @@ -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, diff --git a/src/zulu/grammar_ext/NguniLang.gf b/src/zulu/grammar_ext/NguniLang.gf index 955f9996..284e15a6 100755 --- a/src/zulu/grammar_ext/NguniLang.gf +++ b/src/zulu/grammar_ext/NguniLang.gf @@ -5,7 +5,8 @@ abstract NguniLang = Backward[ComplV2,ComplV3], ExtraExt, NounExt, - VerbExt + VerbExt, + PhraseExt -- MonoLexAbs, -- Chunk -- Symbol - [Symb], diff --git a/src/zulu/grammar_ext/NguniLangZul.gf b/src/zulu/grammar_ext/NguniLangZul.gf index d0619600..64f0b254 100755 --- a/src/zulu/grammar_ext/NguniLangZul.gf +++ b/src/zulu/grammar_ext/NguniLangZul.gf @@ -5,7 +5,8 @@ concrete NguniLangZul of NguniLang = BackwardZul[ComplV2,ComplV3], ExtraExtZul, NounExtZul, - VerbExtZul + VerbExtZul, + PhraseExtZul -- MonoLexZul, -- ChunkZul, -- SymbolZul - [Symb], diff --git a/src/zulu/lexica/MonoLex.gf b/src/zulu/lexica/MonoLex.gf index cbce159d..6eb8647a 100755 --- a/src/zulu/lexica/MonoLex.gf +++ b/src/zulu/lexica/MonoLex.gf @@ -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 diff --git a/src/zulu/lexica/MonoLexZul.gf b/src/zulu/lexica/MonoLexZul.gf index 66b6fe7a..5a386e5e 100755 --- a/src/zulu/lexica/MonoLexZul.gf +++ b/src/zulu/lexica/MonoLexZul.gf @@ -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" ;