mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-27 11:56:29 -06:00
Restuructured Pron, which affected Quant and all the functions that use it.
This commit is contained in:
+82
-47
@@ -25,7 +25,7 @@ param
|
||||
ZERO_MI | ZERO_TU | ZERO_N | I_ZERO |
|
||||
RI_ZERO | KU_ZERO | MU_ZERO | RU_ZERO |
|
||||
KA_ZERO |ZERO_BAA | N_ZERO | KI_ZERO;
|
||||
Case = Acc | Nom ; -- we need to include Gen because we shall need it with Gen Pronouns
|
||||
Case = Acc | Nom |Gen; -- we need to include Gen because we shall need it with Gen Pronouns
|
||||
RCase = RSuj | RObj;
|
||||
PersonalPronounType = SubjM | Obj | RelSubj | RelObj |
|
||||
AdjPron2 | -- aAdjectival Prefixes with initial vowel with the semantics of "the" e.g. -- omuntu o-mu-rungi
|
||||
@@ -43,7 +43,7 @@ param
|
||||
-}
|
||||
ConjArg = Nn_Nn | Nps_Nps | Pns_Pns | RelSubjCls | Other;
|
||||
AgrConj = AConj ConjArg;
|
||||
Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number ;
|
||||
Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number; --Default is AgP3 Sg KI_BI
|
||||
AgrExist = AgrNo | AgrYes Agreement;
|
||||
Position = PostDeterminer | PreDeterminer ;
|
||||
Position1 = Post | Pre;
|
||||
@@ -430,7 +430,7 @@ oper
|
||||
-- This involved only change of the personal pronouns as for selfstanding pronouns.
|
||||
-- How can it be done without code repeation?
|
||||
mkPredetPref :Agreement -> Str = \a -> case a of {
|
||||
AgMUBAP1 n => mkClitics "ny" "twe" n;
|
||||
AgMUBAP1 n => mkClitics "ny" "itwe" n;
|
||||
--AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 n => mkClitics "we" "mwe" n; --probably an error check your grammar book
|
||||
--AgMUBAP2 Pl => "aba" ;
|
||||
@@ -693,9 +693,43 @@ oper
|
||||
_ => mkClitic "Error mkGenPrepWithIVClitic" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
|
||||
-- Genetive Adjectival suffix: Possessive my book= ekitabo kyagye
|
||||
mkGenAdjSuffix : Agreement -> Str =\a -> case a of {
|
||||
AgMUBAP1 n => mkClitics "ngye" "itu" n;
|
||||
--AgMUBAP1 Pl => "aba" ;
|
||||
AgMUBAP2 n => mkClitics "we" "nyu" n; --probably an error check your grammar book
|
||||
--AgMUBAP2 Pl => "aba" ;
|
||||
AgP3 n MU_BA => mkClitics "e" "bo" n;
|
||||
--AgP3 Pl MU_BA => "aba" ;
|
||||
AgP3 Pl ZERO_BU => mkClitic "bwo" ;
|
||||
AgP3 Sg BU_MA => mkClitic "bwo" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => mkClitic "bwo" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "byo" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "go";
|
||||
AgP3 (Sg | Pl) HA => mkClitic "ho" ; -- of place HA
|
||||
AgP3 (Sg | Pl) MU => mkClitic "mwo" ; -- of place MU
|
||||
AgP3 (Sg | Pl) KU => mkClitic "yo" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "ryo" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "ko" ;
|
||||
AgP3 Sg KI_BI => mkClitic "kyo" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "kwo" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "gwo" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "rwo" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "two" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "yo" ;
|
||||
AgP3 Pl ZERO_MI =>mkClitic "yo" ;
|
||||
AgP3 Pl MU_MI => mkClitic "yo";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "zo" ;
|
||||
AgP3 Sg GU_GA => mkClitic "gwo" ;
|
||||
AgP3 Pl GU_GA => mkClitic "go" ;
|
||||
_ => mkClitic "Error mkGenAdjSuffix" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
|
||||
|
||||
mkRPs : RCase => Agreement =>Str = table{
|
||||
RSubj => table {
|
||||
RSubj => table {
|
||||
AgMUBAP1 Sg => mkClitic "o";
|
||||
AgMUBAP1 Pl => mkClitic "aba" ;
|
||||
AgMUBAP2 Sg => mkClitic "o";
|
||||
@@ -726,38 +760,38 @@ oper
|
||||
_ => mkClitic "XXXThat" -- error checking for any case not catered for
|
||||
|
||||
};
|
||||
RObj => table {
|
||||
AgMUBAP1 Sg => mkClitic "ou";
|
||||
AgMUBAP1 Pl => mkClitic "abu" ; --note: abu or abi is used. GF does not allow free variation. However, abu is more natural
|
||||
AgMUBAP2 Sg => mkClitic "ou"; --probably an error check your grammar book
|
||||
AgMUBAP2 Pl => mkClitic "abu" ;
|
||||
AgP3 Sg MU_BA => mkClitic "o";
|
||||
AgP3 Pl MU_BA => mkClitic "abu" ;
|
||||
AgP3 Pl ZERO_BU => mkClitic "obu" ;
|
||||
AgP3 Sg BU_MA => mkClitic "obu" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => mkClitic "obu" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "ebi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "agu";
|
||||
AgP3 (Sg ) HA => mkClitic "ahu" ; -- of place HA
|
||||
AgP3 (Sg ) MU => mkClitic "ahu" ; -- of place MU
|
||||
AgP3 (Sg ) KU => mkClitic "ei" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "eri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "aku" ;
|
||||
AgP3 Sg KI_BI => mkClitic "eki" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "oku" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "ogu" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "oru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "otu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "ei" ;
|
||||
AgP3 Pl ZERO_MI =>mkClitic "ei" ;
|
||||
AgP3 Pl MU_MI => mkClitic "ei";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "ezi" ;
|
||||
AgP3 Sg GU_GA => mkClitic "ogu" ;
|
||||
AgP3 Pl GU_GA => mkClitic "agu" ;
|
||||
_ => mkClitic "XXXThat" -- error checking for any case not catered for
|
||||
|
||||
}
|
||||
};
|
||||
_ => table {
|
||||
AgMUBAP1 Sg => mkClitic "ou";
|
||||
AgMUBAP1 Pl => mkClitic "abu" ; --note: abu or abi is used. GF does not allow free variation. However, abu is more natural
|
||||
AgMUBAP2 Sg => mkClitic "ou"; --probably an error check your grammar book
|
||||
AgMUBAP2 Pl => mkClitic "abu" ;
|
||||
AgP3 Sg MU_BA => mkClitic "o";
|
||||
AgP3 Pl MU_BA => mkClitic "abu" ;
|
||||
AgP3 Pl ZERO_BU => mkClitic "obu" ;
|
||||
AgP3 Sg BU_MA => mkClitic "obu" ;
|
||||
AgP3 Pl (KA_BU | RU_BU) => mkClitic "obu" ;
|
||||
AgP3 Pl (KI_BI | ZERO_BI) => mkClitic "ebi" ;
|
||||
AgP3 Pl (ZERO_MA | KU_MA | RI_MA | I_MA | BU_MA) => mkClitic "agu";
|
||||
AgP3 (Sg ) HA => mkClitic "ahu" ; -- of place HA
|
||||
AgP3 (Sg ) MU => mkClitic "ahu" ; -- of place MU
|
||||
AgP3 (Sg ) KU => mkClitic "ei" ; -- of place KU
|
||||
AgP3 Sg (I_ZERO | I_MA | RI_MA) =>mkClitic "eri" ;
|
||||
AgP3 Sg (KA_ZERO | KA_BU) =>mkClitic "aku" ;
|
||||
AgP3 Sg KI_BI => mkClitic "eki" ;
|
||||
AgP3 Sg (KU_ZERO | KU_MA) => mkClitic "oku" ;
|
||||
AgP3 Sg (MU_MI | MU_ZERO) => mkClitic "ogu" ;
|
||||
AgP3 Sg (RU_ZERO | RU_BU | RU_MA| RU_N) => mkClitic "oru" ;
|
||||
AgP3 Pl (ZERO_TU | KA_TU) =>mkClitic "otu" ;
|
||||
AgP3 Sg (ZERO_ZERO | N_N) =>mkClitic "ei" ;
|
||||
AgP3 Pl ZERO_MI =>mkClitic "ei" ;
|
||||
AgP3 Pl MU_MI => mkClitic "ei";
|
||||
AgP3 Pl (ZERO_ZERO | ZERO_N | N_N | RU_N) =>mkClitic "ezi" ;
|
||||
AgP3 Sg GU_GA => mkClitic "ogu" ;
|
||||
AgP3 Pl GU_GA => mkClitic "agu" ;
|
||||
_ => mkClitic "XXXThat" -- error checking for any case not catered for
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
mkRObjV2 : Agreement=> Str =table {
|
||||
AgMUBAP1 Sg => mkClitic "ou";
|
||||
@@ -809,17 +843,16 @@ oper
|
||||
-- all noun classes have pronouns in the third person
|
||||
--This is a big problem, probably we create our own abstract syntax
|
||||
{-
|
||||
TO-DO: DONE but not tested yet. Here I will simply use one
|
||||
class KI_BI
|
||||
TO-DO: DONE but not tested yet. I have attempted to account for all other classes by using a test.
|
||||
-}
|
||||
Pronoun : Type ={s : Case => Str ; agr : Agreement} ;
|
||||
mkPron : Str -> Str -> Agreement->Pronoun =\nom,acc, a ->
|
||||
{
|
||||
s = table {Nom => nom; Acc => acc};
|
||||
agr = a;
|
||||
};
|
||||
|
||||
|
||||
Pronoun : Type ={s : Case => Str; third:Agreement => Case=>Str; agr:AgrExist} ;
|
||||
{-
|
||||
mkPron : Str -> Str ->Pronoun =\nom,acc, ->
|
||||
{
|
||||
s = table {Nom => nom; Acc => acc};
|
||||
agr = a;
|
||||
};
|
||||
-}
|
||||
|
||||
PolTemp = {s : Agreement => Str * Str ; end : Str} ; -- a tupple of two strings
|
||||
|
||||
@@ -1050,7 +1083,9 @@ oper
|
||||
--Concatenates two strings at runtime without spaces
|
||||
|
||||
glue: Str -> Str ->Str =\ x, y -> x ++ BIND ++ y;
|
||||
|
||||
--Concatenates two strings for the genetive case
|
||||
glueGen: Agreement ->Str = \ a -> mkGenPrepNoIVClitic a ++ BIND ++ mkGenAdjSuffix a;
|
||||
|
||||
--Number determining element
|
||||
Numer : Type = { s: Str ; n : Number};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user