From 420715b88e8d85cb85d3b8118141d442a5b36ee2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 19 Aug 2019 17:21:23 +0200 Subject: [PATCH 1/4] (Som) bugfixes in numerals --- src/somali/NumeralSom.gf | 33 ++++++++++++++++++++------------- src/somali/ParamSom.gf | 2 ++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/somali/NumeralSom.gf b/src/somali/NumeralSom.gf index e472a6e11..b674f1326 100644 --- a/src/somali/NumeralSom.gf +++ b/src/somali/NumeralSom.gf @@ -29,6 +29,14 @@ oper lincat Digit = LinDigit ; + + {- Saeed p. 70-71: "When used with nouns, the cardinal numerals act as + the head of the construction and the counted noun occurs in the genitive + case. […] This construction also occurs with composite numerals like + laba boqol 'two hundred', + where laba 'two' is a feminine noun in absolutive case and + boqol 'hundred' is a masculine noun in genitive case. + Since laba is head, the whole nominal is feminine." -} Sub10, Sub100, Sub1000, Sub1000000 = { s : DForm => Str ; thousand : Str ; -- TODO figure out if this really works so @@ -69,14 +77,14 @@ lin pot111 = { s = \\_ => "koob iyo" ++ n1.ten.s ; ord = "koob iyo" ++ n1.ten.ord ; thousand = [] ; - da = M KA ; -- TODO check + da = M KA ; n = Pl } ; lin pot1to19 d = { - s = \\_ => d.unit.s ! Kow ++ "iyo" ++ n1.ten.s ; + s = \\_ => d.unit.s ! Hal ++ "iyo" ++ n1.ten.s ; thousand = [] ; - ord = d.unit.s ! Kow ++ "iyo" ++ n1.ten.ord ; - da = M KA ; -- TODO check + ord = d.unit.s ! Hal ++ "iyo" ++ n1.ten.ord ; + da = M KA ; n = Pl } ; lin pot0as1 n = n ; @@ -86,25 +94,24 @@ lin pot1 d = d.ten ** { n = Pl } ; lin pot1plus d e = d.ten ** { - s = \\b => d.unit.s ! Kow ++ "iyo" ++ e.s ! b ; - ord = d.unit.s ! Kow ++ "iyo" ++ e.ord ; -- TODO check + s = \\b => e.s ! b ++ "iyo" ++ d.ten.s ; + ord = e.s ! Hal ++ "iyo" ++ d.ten.ord ; thousand = [] ; n = Pl ; } ; lin pot1as2 n = n ; lin pot2 d = d ** { - thousand = "boqol" ; -- TODO check - ord = d.s ! Kow ++ "boqlaad" - } ; -- TODO what's the def. art. allomorph? + thousand = "boqol" ; + ord = d.s ! Hal ++ "boqlaad" + } ; lin pot2plus d e = d ** { - s = \\b => d.s ! b ++ "boqol iyo" ++ e.s ! b ; - ord = d.ord ++ "boqol iyo" ++ e.ord ; + thousand = "boqol iyo" ++ e.s ! Hal ; + ord = d.s ! Hal ++ "boqol iyo" ++ e.ord ; n = Pl} ; lin pot2as3 n = n ; lin pot3 n = n ** { thousand = n.thousand ++ "kun" ; - ord = n.s ! Kow ++ "kunaad" ; - --da = M KA ; -- TODO check + ord = n.s ! Hal ++ "kunaad" ; n = Pl } ; lin pot3plus n m = n ** { diff --git a/src/somali/ParamSom.gf b/src/somali/ParamSom.gf index 9714b17aa..1424d7dd3 100644 --- a/src/somali/ParamSom.gf +++ b/src/somali/ParamSom.gf @@ -9,6 +9,8 @@ oper vstar : pattern Str = #("a" | "e" | "i" | "o" | "u" | "y" | "w") ; -- semivowels included vv : pattern Str = #("aa" | "ee" | "ii" | "oo" | "uu") ; c : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v" + |"s"|"h"|"l"|"j"|"r"|"z"|"c"|"q"); + cstar : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v" -- semivowels included |"s"|"h"|"l"|"j"|"r"|"z"|"c"|"q"|"y"|"w"); lmnr : pattern Str = #("l" | "m" | "n" | "r") ; kpt : pattern Str = #("k" | "p" | "t") ; From 3a760d6b29853eacf7b12d9ee5ada130974a92ad Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 19 Aug 2019 17:44:00 +0200 Subject: [PATCH 2/4] (Som) Fix bug in ordinals --- src/somali/NounSom.gf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 00c1753d6..3f3f0da09 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -121,7 +121,8 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { -- Independent form uses plural morpheme, not gender-flipped allomorph => num.s ! indep ++ quant.sp ! PlInv ! c ++ num.thousand } ; isNum = num.isNum ; - n = num.n + n = num.n ; + shortPoss = \\da => quant.shortPoss ! da ++ num.s ! indep } ; -- d = case of { -- => Numerative ; @@ -132,7 +133,8 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { DetQuantOrd quant num ord = let theseFive = DetQuant quant num in theseFive ** { s = \\g,c => theseFive.s ! g ! c ++ ord.s ; - sp = \\g,c => theseFive.sp ! g ! c ++ ord.s + sp = \\g,c => theseFive.sp ! g ! c ++ ord.s ; + shortPoss = \\da => theseFive.shortPoss ! da ++ ord.s } ; -- Whether the resulting determiner is singular or plural depends on the @@ -178,7 +180,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { DefArt = defQuant "a" "kan" "tan" "kuwan" False ; -- : Quant - IndefArt = indefQuant ** {sp = \\gn,c => "1"} ; -- TODO sp forms + IndefArt = indefQuant ; -- TODO sp forms -- : Pron -> Quant PossPron pron = From 21a83b959125e755b044c80e203d203a700e52e9 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 19 Aug 2019 17:44:14 +0200 Subject: [PATCH 3/4] (Som) Add unit tests about numerals --- src/somali/unittest/num.gftest | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/somali/unittest/num.gftest diff --git a/src/somali/unittest/num.gftest b/src/somali/unittest/num.gftest new file mode 100644 index 000000000..9100ee55a --- /dev/null +++ b/src/somali/unittest/num.gftest @@ -0,0 +1,28 @@ +-- LangEng: the two cats +LangSom: laba &+ da bisadood +Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc + + +-- LangEng: those three men +LangSom: saddex &+ daas nin +Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant that_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN man_N))) NoVoc + +-- LangEng: my three fathers +LangSom: saddex &+ dayd &+ a aabbe +Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant (PossPron i_Pron) (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN2 father_N2))) NoVoc + +-- LangEng: she is the first cat +LangSom: waa bisad &+ da kowaad +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (UseComp (CompNP (DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN cat_N))))))) NoVoc + +-- LangEng: she is my first cat +LangSom: waa bisad &+ dayd &+ a kowaad +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN cat_N))))))) NoVoc + +LangEng: he is my first father +LangSom: waa aabb &+ ahay kowaad +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN2 father_N2))))))) NoVoc + +-- LangEng: he is my first man +LangSom: waa nin &+ kayg &+ a kowaad +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN man_N))))))) NoVoc From 62eb0f84d1b5fbac5c23096dcdf7623c2b410f52 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 19 Aug 2019 17:49:59 +0200 Subject: [PATCH 4/4] (Som) minor typofixes --- src/somali/ExtendSom.gf | 2 +- src/somali/IdiomSom.gf | 2 +- src/somali/NounSom.gf | 2 +- src/somali/ParamSom.gf | 4 ++-- src/somali/RelativeSom.gf | 2 +- src/somali/ResSom.gf | 4 ++-- src/somali/SentenceSom.gf | 2 +- src/somali/VerbSom.gf | 2 +- src/somali/unittest/num.gftest | 18 +++++++++--------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/somali/ExtendSom.gf b/src/somali/ExtendSom.gf index 50be82b1e..5d62124b6 100644 --- a/src/somali/ExtendSom.gf +++ b/src/somali/ExtendSom.gf @@ -6,7 +6,7 @@ concrete ExtendSom of Extend = CatSom ** open Prelude, ResSom in { lin - -- : NP -> SSlash -> Utt ; -- her I love -- Sayeed p. 189- + -- : NP -> SSlash -> Utt ; -- her I love -- Saeed p. 189- FocusObj np sslash = -- FIXME: preposition disappears in negative sentences let ss = sslash.s ! False ; ssSub = sslash.s ! True ; -- the negative particle is the same as subordinate, but verb forms come from main clause diff --git a/src/somali/IdiomSom.gf b/src/somali/IdiomSom.gf index 19450eaf6..2c2214095 100644 --- a/src/somali/IdiomSom.gf +++ b/src/somali/IdiomSom.gf @@ -34,7 +34,7 @@ concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in { --ProgrVP vp = vp ** { } ; - {- TODO: Sayeed p. 92 optative + {- TODO: Saeed p. 92 optative -- : VP -> Utt ; -- let's go ImpPl1 vp = { } ; diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 3f3f0da09..5cc9074dc 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -75,7 +75,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { -- : NP -> RS -> NP ; -- Paris, which is here {- NB. technically, if the RS has undergone ConjRS, it could contain both - restrictive and appositive relative clauses. Quote Sayeed p.215-216: + restrictive and appositive relative clauses. Quote Saeed p.215-216: "When multiple relative clauses occur, this formal distinction is maintained, since in the only context both can occur, on nouns with determiners, restrictives are joined by ee while appositives employ oo." diff --git a/src/somali/ParamSom.gf b/src/somali/ParamSom.gf index 1424d7dd3..b80a8f196 100644 --- a/src/somali/ParamSom.gf +++ b/src/somali/ParamSom.gf @@ -253,7 +253,7 @@ oper -------------------------------------------------------------------------------- -- Verbs --- Sayeed p. 84-85 +-- Saeed p. 84-85 -- Tense: Past/Present/Future -- Aspect: Simple/Progressive/Habitual -- Mood: Declarative/Imperative/Conditional/Optative/Potential @@ -283,7 +283,7 @@ param | VNegPast Aspect | VPast Aspect VAgr | VImp Number Polarity - | VRel GenNum {- Sayeed p. 95-96 + ch 8 + | VRel GenNum {- Saeed p. 95-96 + ch 8 Reduced present general in relative clauses; as absolutive 1/2SG/3SG M/2PL/3PL suga (VRel MascSg) 3 SG F sugta (VRel FemSg) diff --git a/src/somali/RelativeSom.gf b/src/somali/RelativeSom.gf index 553be7741..9581a0771 100644 --- a/src/somali/RelativeSom.gf +++ b/src/somali/RelativeSom.gf @@ -9,7 +9,7 @@ lin -- : RP -> VP -> RCl ; {- NB. this works because vfSubord only puts different forms from vfStatement in Pres,Simul,Pos. RelVP needs a third set of forms in Abs,Pres,Simul,Pos, - called "reduced present general" (Sayeed p. 95-96 + ch 8). + called "reduced present general" (Saeed p. 95-96 + ch 8). These forms are found in VRel in VP, and aren't chosen by predVP, so we put them in manually in RelVP. -} diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 84bf74d96..77f0cad58 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -453,7 +453,7 @@ oper } ; Verb : Type = BaseVerb ** { - sii : Str ; -- closed class of particles: sii, soo, kala, wada (Sayeed 171) + sii : Str ; -- closed class of particles: sii, soo, kala, wada (Saeed 171) dhex : Str ; -- closed class of adverbials: hoos, kor, dul, dhex, … } ; Verb2 : Type = Verb ** {c2 : Preposition} ; @@ -819,7 +819,7 @@ oper -- object pronoun, prepositions and negation all contract } ; stm : {p1,p2 : Str} = case cltyp of { - Subord => {p1 = if_then_Pol p [] "aan" ; -- if we form a ClSlash, no sentence type marker; negation with aan (Sayeed p. 210) + Subord => {p1 = if_then_Pol p [] "aan" ; -- if we form a ClSlash, no sentence type marker; negation with aan (Saeed p. 210) p2 = if_then_Pol p subjpron []} ; Question => {p1 = "ma" ; p2 = []} ; -- TODO find out how negative questions work Statement => case of { diff --git a/src/somali/SentenceSom.gf b/src/somali/SentenceSom.gf index 3de1f3891..129fc9a6c 100644 --- a/src/somali/SentenceSom.gf +++ b/src/somali/SentenceSom.gf @@ -10,7 +10,7 @@ lin -- : NP -> VP -> Cl PredVP = predVP ; - -- : SC -> VP -> Cl ; -- that she goes is good (Sayeed p. 94) + -- : SC -> VP -> Cl ; -- that she goes is good (Saeed p. 94) --PredSCVP sc vp = ; --2 Clauses missing object noun phrases diff --git a/src/somali/VerbSom.gf b/src/somali/VerbSom.gf index 826533c2e..22feebdd0 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -15,7 +15,7 @@ lin ReflVP = ResSom.insertRefl ; -- : VV -> VP -> VP ; - ComplVV vv vp = vp ** { -- check Sayeed p. 169 + ComplVV vv vp = vp ** { -- check Saeed p. 169 s = vv.s ; vComp = vp.vComp ++ vp.s ! VInf ; pred = NoPred ; diff --git a/src/somali/unittest/num.gftest b/src/somali/unittest/num.gftest index 9100ee55a..d0e907623 100644 --- a/src/somali/unittest/num.gftest +++ b/src/somali/unittest/num.gftest @@ -1,28 +1,28 @@ -- LangEng: the two cats -LangSom: laba &+ da bisadood +LangSom: laba BIND da bisadood Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (UseN cat_N))) NoVoc -- LangEng: those three men -LangSom: saddex &+ daas nin +LangSom: saddex BIND daas nin Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant that_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN man_N))) NoVoc -- LangEng: my three fathers -LangSom: saddex &+ dayd &+ a aabbe +LangSom: saddex BIND dayd BIND a aabbe Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant (PossPron i_Pron) (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN2 father_N2))) NoVoc -- LangEng: she is the first cat -LangSom: waa bisad &+ da kowaad +LangSom: waa bisad BIND da kowaad Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (UseComp (CompNP (DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN cat_N))))))) NoVoc -- LangEng: she is my first cat -LangSom: waa bisad &+ dayd &+ a kowaad +LangSom: waa bisad BIND dayd BIND a kowaad Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron she_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN cat_N))))))) NoVoc -LangEng: he is my first father -LangSom: waa aabb &+ ahay kowaad +-- LangEng: he is my first father +LangSom: waa aabb BIND ahay kowaad Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN2 father_N2))))))) NoVoc -- LangEng: he is my first man -LangSom: waa nin &+ kayg &+ a kowaad -Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN man_N))))))) NoVoc +LangSom: waa nin BIND kayg BIND a kowaad +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (UseComp (CompNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN man_N))))))) NoVoc \ No newline at end of file