forked from GitHub/gf-rgl
@@ -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
|
||||
|
||||
@@ -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 = { } ;
|
||||
|
||||
|
||||
@@ -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."
|
||||
@@ -121,7 +121,8 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
||||
-- Independent form uses plural morpheme, not gender-flipped allomorph
|
||||
<Pl,_> => 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 <num.isNum,quant.st> of {
|
||||
-- <True,_> => 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 =
|
||||
|
||||
@@ -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 ** {
|
||||
|
||||
@@ -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") ;
|
||||
@@ -251,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
|
||||
@@ -281,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)
|
||||
|
||||
@@ -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.
|
||||
-}
|
||||
|
||||
@@ -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 <p,vp.pred,subj.a> of {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
28
src/somali/unittest/num.gftest
Normal file
28
src/somali/unittest/num.gftest
Normal file
@@ -0,0 +1,28 @@
|
||||
-- LangEng: the two cats
|
||||
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 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 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 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 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 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 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
|
||||
Reference in New Issue
Block a user