From 48aa65d2dd6a4c20a183f09a6b3dae787a359bfa Mon Sep 17 00:00:00 2001 From: David Bamutura Date: Mon, 6 May 2019 16:21:34 +0200 Subject: [PATCH] Made changes to the nature of adjective so that it linearises --- src/rukiga/CatCgg.gf | 10 ++++++++-- src/rukiga/LexiconCgg.gf | 38 +++++++++++++++++++------------------- src/rukiga/NounCgg.gf | 16 ++++++++-------- src/rukiga/RelativeCgg.gf | 27 ++++++++++++++++++++++++--- src/rukiga/ResCgg.gf | 16 ++++++++-------- src/rukiga/SentenceCgg.gf | 6 +++--- 6 files changed, 70 insertions(+), 43 deletions(-) diff --git a/src/rukiga/CatCgg.gf b/src/rukiga/CatCgg.gf index 934702fc..d8a4b011 100755 --- a/src/rukiga/CatCgg.gf +++ b/src/rukiga/CatCgg.gf @@ -31,7 +31,7 @@ lincat Det = Res.Determiner ; -- determiner phrase e.g. "those seven" Quant = {s : Str ; s2 :Res.Agreement => Str; doesAgree : Bool} ; -- quantifier ('nucleus' of Det) e.g. "this/these" Num = Res.Numer ; -- number determining element e.g. "seven" - AP = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;--Res.AdjectivalPhrase; + AP = {s : Str ; position1 : Res.Position1; isProper : Bool; isPrep: Bool};--Res.AdjectivalPhrase; A = Res.Adjective; Comp = Res.Comp; -- complement of copula, such as AP e.g. "very warm" V2 = Res.Verb2; @@ -42,7 +42,13 @@ lincat -- see Structural for explanation of this structure Predet = {s : Str ; s2 : Str; isMWE : Bool; isInflected : Bool}; -- predeterminer (prefixed Quant) e.g. "all" RP = {s : Res.RCase => Res.Agreement => Str ; rObjVariant2: Res.Agreement => Str} ; - + RCl ={ + s : Str ; + subjAgr : Res.Agreement; + root : Str; + morphs : Res.VFormMini => Res.VerbMorphPos =>Str; + compl : Str -- after verb: complement, adverbs + } ; --VV = {- --1 Cat: the Category System diff --git a/src/rukiga/LexiconCgg.gf b/src/rukiga/LexiconCgg.gf index e6784ac4..cf8dcdb8 100755 --- a/src/rukiga/LexiconCgg.gf +++ b/src/rukiga/LexiconCgg.gf @@ -62,26 +62,26 @@ lin paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places??? --Adjectives - bad_A = mkAdjective "bi" False False False; --False means the adjective is a stem and comes after the complete noun + bad_A = mkAdjective "bi" Post False False; --False means the adjective is a stem and comes after the complete noun --beautiful_A = mkAdjective "rungi" False; - big_A = mkAdjective "hango" False False False; - black_A = mkAdjective "kwirangura" False False False; - blue_A = mkAdjective "buuru" False True True ; - clean_A = mkAdjective "yonjo" False False False; --: A ; - cold_A = mkAdjective "rikufuka" False False False; --: A ; - good_A =mkAdjective "rungi" False False False; --: A ; - heavy_A = mkAdjective "rikuremeera" False False False; --: A ; --notice ri as a verb is - hot_A = mkAdjective "rikwotsya" False False False; -- rikutagata -- problematic words like hot we need a new set of clitics - new_A = mkAdjective "sya" False False False; --: A ; - old_A = mkAdjective "kúru" False False False; --: A ; - ready_A = mkAdjective "eteekateekire" False False False; --: A ; - red_A = mkAdjective "ríkutukura" False False False; --: A ; - small_A = mkAdjective "kye" False False False; - warm_A = mkAdjective "rikutagata" False False False;--: A ; - white_A = mkAdjective "rikwera" False False False;--: A ; - yellow_A = mkAdjective "kinekye" False True True;--: A ; or yero, or kyenju - young_A = mkAdjective "to" False False False;--: A ; - green_A =mkAdjective "kijubwe" False False True; + big_A = mkAdjective "hango" Post False False; + black_A = mkAdjective "kwirangura" Post False False; + blue_A = mkAdjective "buuru" Post True True ; + clean_A = mkAdjective "yonjo" Post False False; --: A ; + cold_A = mkAdjective "rikufuka" Post False False; --: A ; + good_A =mkAdjective "rungi" Post False False; --: A ; + heavy_A = mkAdjective "rikuremeera" Post False False; --: A ; --notice ri as a verb is + hot_A = mkAdjective "rikwotsya" Post False False; -- rikutagata -- problematic words like hot we need a new set of clitics + new_A = mkAdjective "sya" Post False False; --: A ; + old_A = mkAdjective "kúru" Post False False; --: A ; + ready_A = mkAdjective "eteekateekire" Post False False; --: A ; + red_A = mkAdjective "ríkutukura" Post False False; --: A ; + small_A = mkAdjective "kye" Post False False; + warm_A = mkAdjective "rikutagata" Post False False;--: A ; + white_A = mkAdjective "rikwera" Post False False;--: A ; + yellow_A = mkAdjective "kinekye" Post True True;--: A ; or yero, or kyenju + young_A = mkAdjective "to" Post False False;--: A ; + green_A =mkAdjective "kijubwe" Post False True; --ditransitive verbs --bite_V2 = mkV2 "rum"; diff --git a/src/rukiga/NounCgg.gf b/src/rukiga/NounCgg.gf index 44f893be..cd408ad1 100755 --- a/src/rukiga/NounCgg.gf +++ b/src/rukiga/NounCgg.gf @@ -25,30 +25,30 @@ lin --Noun = {s : NounType=>Number => Str ; nc : NClass} ; --AdjCN ap cn = {s=\\ntype, num=>cn.s!ntype!num ++ ap.s!AgP3 num cn.nc; nc=cn.nc}; AdjCN ap cn = - case of { - => { + case of { + => { s = \\ ns, num =>ap.s ++ cn.s ! ns ! num ; gender = cn.gender }; - => case ap.isPrep of { + => case ap.isPrep of { False => { s = \\ ns, num => cn.s ! ns ! num ++ mkAdjPronIVClitic (AgP3 num cn.gender) - ++ ap.post ; + ++ ap.s; gender = cn.gender }; True => { s = \\ ns, num => (cn.s ! ns ! num) ++ - mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.post ; + mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.s ; gender = cn.gender } }; - => { + => { s = \\ ns, num => mkAdjPronIVClitic (AgP3 num cn.gender) ++ ap.s ++ (cn.s ! ns ! num) ; gender = cn.gender }; - => { - s = \\ ns, num => (cn.s ! ns ! num) ++ ap.post ; + => { + s = \\ ns, num => (cn.s ! ns ! num) ++ ap.s ; gender = cn.gender } diff --git a/src/rukiga/RelativeCgg.gf b/src/rukiga/RelativeCgg.gf index 78c55e49..6685d80b 100755 --- a/src/rukiga/RelativeCgg.gf +++ b/src/rukiga/RelativeCgg.gf @@ -20,10 +20,31 @@ lin -} IdRP = {s = mkRPs; rObjVariant2 = mkRObjV2}; --: RP ; -- which + --RelCl : Cl -> RCl ; -- such that John loves her + -- The simplest way to form a relative clause is from a clause by + -- a pronoun similar to "such that". + RelCl cl = { + s = "kugira ngu" ++ cl.s ; + subjAgr = cl.subjAgr; + root = cl.root; + morphs = cl.morphs; + compl =cl.compl + }; -- such that John loves her. why does it need any case? - - -{- + -- The more proper ways are from a verb phrase + -- (formed in [``Verb`` Verb.html]) or a sentence + -- with a missing noun phrase (formed in [``Sentence`` Sentence.html]). + --RelVP : RP -> VP -> RCl ; -- who loves John + {- + RelVP rp vp ={ + s = []; + subjAgr = cl.subjAgr; + root = cl.root; + morphs = cl.morphs; + compl =cl.compl + }; + -} + {- --1 Relative clauses and pronouns abstract Relative = Cat ** { diff --git a/src/rukiga/ResCgg.gf b/src/rukiga/ResCgg.gf index 930af1a4..786896c9 100755 --- a/src/rukiga/ResCgg.gf +++ b/src/rukiga/ResCgg.gf @@ -46,6 +46,7 @@ param Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number ; AgrExist = AgrNo | AgrYes Agreement; Position = PostDeterminer | PreDeterminer ; + Position1 = Post | Pre; Variants = V1|V2; --Functional forms of the regular verb Mood = Infinitive | Imperative | Subjunctive | Perfective; @@ -337,13 +338,12 @@ oper using arne's technique -} --AdjectivalPhrase : Type {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ; - AdjectivalPhrase : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool}; - Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool}; - mkAdjective: Str -> Bool -> Bool -> Bool -> Adjective = \ a , isPre, isProper, isPrep -> case isPre of { - True => { s = a ; post = [] ; isPre = True; isProper = isProper; isPrep = isPrep}; - --this is supposed to be a concatenation use bind and I will do so later - False => { s = [] ; post = a; isPre = False; isProper = isProper; isPrep = isPrep} -- requires agreement later - }; + AdjectivalPhrase : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool}; + --Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool}; + Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool}; + mkAdjective: Str -> Position1 -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep -> + { s = a ; position1 = pos ; isPre = True; isProper = isProper; isPrep = isPrep}; + {- TO DO: --Subject prefixes / particles of clitics using bind @@ -1010,7 +1010,7 @@ oper -- which is the Objects, NPs PPs APs etc. -} Clause : Type = { -- word order is fixed in S and QS - subj : Str ; + s : Str ; subjAgr : Agreement; root : Str; morphs : VFormMini => VerbMorphPos =>Str; diff --git a/src/rukiga/SentenceCgg.gf b/src/rukiga/SentenceCgg.gf index d53be52b..827172da 100755 --- a/src/rukiga/SentenceCgg.gf +++ b/src/rukiga/SentenceCgg.gf @@ -11,7 +11,7 @@ lin --2 Sentences --UseCl : Temp -> Pol -> Cl -> S ; -- she had not slept UseCl temp pol cl = let - subj = cl.subj; + subj = cl.s; clitic = mkSubjClitic cl.subjAgr; simul = cl.morphs ! VFPres; --this is not delivering the string ant = cl.morphs ! VFPastPart; --this is not delivering the string @@ -37,7 +37,7 @@ UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked QuestCl cl = cl; --: Cl -> QCl ; -- does John (not) walk PredVP np vp = case vp.isCompApStem of{ False => { - subj = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk + s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk subjAgr = np.agr; root = vp.s; morphs = vp.morphs; @@ -52,7 +52,7 @@ PredVP np vp = case vp.isCompApStem of{ compl = vp.comp }; True => { - subj = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk + s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk subjAgr = np.agr; root = vp.s; morphs = vp.morphs;