mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
Merge pull request #247 from inariksit/somali
(Som) Possessive structures
This commit is contained in:
@@ -118,7 +118,7 @@ lin eat_V2 = mkV2 "cun" ;
|
|||||||
-- lin fall_V = mkV "" ;
|
-- lin fall_V = mkV "" ;
|
||||||
-- lin far_Adv = mkA "" ;
|
-- lin far_Adv = mkA "" ;
|
||||||
-- lin fat_N = mkN "" ;
|
-- lin fat_N = mkN "" ;
|
||||||
lin father_N2 = mkN2 (shortPossN (mkN "aabbe")) Gen ;
|
lin father_N2 = mkN2 (shortPossN (mkN "aabbe")) ;
|
||||||
-- lin fear_V2 = mkV2 "" ;
|
-- lin fear_V2 = mkV2 "" ;
|
||||||
-- lin fear_VS = mkVS "" ;
|
-- lin fear_VS = mkVS "" ;
|
||||||
-- lin feather_N = mkN "" ;
|
-- lin feather_N = mkN "" ;
|
||||||
@@ -227,7 +227,7 @@ lin man_N = mkN "nin" ;
|
|||||||
-- lin meat_N = mkN "" ;
|
-- lin meat_N = mkN "" ;
|
||||||
-- lin milk_N = mkN "" ;
|
-- lin milk_N = mkN "" ;
|
||||||
-- lin moon_N = mkN "" ;
|
-- lin moon_N = mkN "" ;
|
||||||
lin mother_N2 = mkN2 (shortPossN (mkN "hooyo")) Gen ;
|
lin mother_N2 = mkN2 (shortPossN (mkN "hooyo")) ;
|
||||||
-- lin mountain_N = mkN "" ;
|
-- lin mountain_N = mkN "" ;
|
||||||
-- lin mouth_N = mkN "" ;
|
-- lin mouth_N = mkN "" ;
|
||||||
-- lin music_N = mkN "" ;
|
-- lin music_N = mkN "" ;
|
||||||
@@ -395,7 +395,7 @@ lin wait_V2 = mkV2 "sug" ;
|
|||||||
-- lin warm_A = mkA "" ;
|
-- lin warm_A = mkA "" ;
|
||||||
-- lin wash_V2 = mkV2 "" ;
|
-- lin wash_V2 = mkV2 "" ;
|
||||||
-- lin watch_V2 = mkV2 "" ;
|
-- lin watch_V2 = mkV2 "" ;
|
||||||
lin water_N = mkN "biya" ;
|
lin water_N = mkNoun "biyo" "biyaha" "biyo" "biyaha" Masc ; -- ?? gender
|
||||||
-- lin wet_A = mkA "" ;
|
-- lin wet_A = mkA "" ;
|
||||||
-- lin white_A = mkA "" ;
|
-- lin white_A = mkA "" ;
|
||||||
-- lin wide_A = mkA "" ;
|
-- lin wide_A = mkA "" ;
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ DetCN det cn = useN cn ** {
|
|||||||
let nfc : {nf : NForm ; c : Case} =
|
let nfc : {nf : NForm ; c : Case} =
|
||||||
case <c,cn.hasMod,det.d> of {
|
case <c,cn.hasMod,det.d> of {
|
||||||
-- special form for fem. nouns
|
-- special form for fem. nouns
|
||||||
<Gen,False,Indef Sg> => {nf=GenSg ; c=c} ;
|
|
||||||
<Gen,False,Indef Pl> => {nf=GenPl ; c=c} ;
|
|
||||||
<Nom,False,Indef Sg> => {nf=NomSg ; c=c} ;
|
<Nom,False,Indef Sg> => {nf=NomSg ; c=c} ;
|
||||||
|
|
||||||
-- special case for DefArt+Nom: override vowel
|
-- special case for DefArt+Nom: override vowel
|
||||||
<Nom,False,Def x NA> => {nf=Def x vU ; c=c} ;
|
<Nom,False,Def x NA> => {nf=Def x vU ; c=c} ;
|
||||||
|
|
||||||
-- If cn has modifier, Nom ending attaches to the modifier
|
-- If cn has modifier, Nom ending attaches to the modifier
|
||||||
<Nom,True,_> => {nf=det.d ; c=Abs} ;
|
<Nom,True,_> => {nf=det.d ; c=Abs} ;
|
||||||
_ => {nf=det.d ; c=c}
|
_ => {nf=det.d ; c=c}
|
||||||
@@ -76,7 +76,6 @@ DetCN det cn = useN cn ** {
|
|||||||
-- MassNP : CN -> NP ;
|
-- MassNP : CN -> NP ;
|
||||||
MassNP cn = useN cn ** {
|
MassNP cn = useN cn ** {
|
||||||
s = table { Nom => cn.s ! NomSg ++ cn.mod ! Sg ! Nom ;
|
s = table { Nom => cn.s ! NomSg ++ cn.mod ! Sg ! Nom ;
|
||||||
-- Gen => cn.s ! PlGen ++ cn.mod ! Sg ! Gen ; -- TODO Do we ever need plural genitive?
|
|
||||||
c => cn.s ! Indef Sg ++ cn.mod ! Sg ! c }
|
c => cn.s ! Indef Sg ++ cn.mod ! Sg ! c }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -174,10 +173,18 @@ DetCN det cn = useN cn ** {
|
|||||||
-- : N2 -> CN ;
|
-- : N2 -> CN ;
|
||||||
UseN,UseN2 = ResSom.useN ;
|
UseN,UseN2 = ResSom.useN ;
|
||||||
|
|
||||||
-- : N2 -> NP -> CN ; -- mother of the king
|
-- : N2 -> NP -> CN ; -- Sahra hooyadeed
|
||||||
ComplN2 n2 np =
|
ComplN2 n2 np = let cn = useN n2 in cn ** {s = \\nf =>
|
||||||
let cn = useN n2 in
|
let det = PossPron (pronTable ! np.a) ;
|
||||||
cn ** {s = \\c => cn.s ! c ++ np.s ! n2.c2 } ;
|
detStr = case cn.shortPoss of {
|
||||||
|
True => det.shortPoss ;
|
||||||
|
_ => det.s ! Abs } ;
|
||||||
|
num = case nf of {
|
||||||
|
Indef n => n ;
|
||||||
|
Def n v => n ;
|
||||||
|
_ => Sg } ;
|
||||||
|
in np.s ! Abs ++ cn.s ! Def num det.v ++ detStr } ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||||
ComplN3 n3 np =
|
ComplN3 n3 np =
|
||||||
@@ -221,13 +228,13 @@ DetCN det cn = useN cn ** {
|
|||||||
|
|
||||||
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||||
ApposCN cn np = cn ** { s = } ;
|
ApposCN cn np = cn ** { s = } ;
|
||||||
|
-}
|
||||||
|
|
||||||
--2 Possessive and partitive constructs
|
--2 Possessive and partitive constructs
|
||||||
|
|
||||||
-- : PossNP : CN -> NP -> CN ;
|
-- : PossNP : CN -> NP -> CN ;
|
||||||
PossNP cn np = cn ** { } ;
|
PossNP cn np = cn ** {mod = \\n,c => cn.mod ! n ! c ++ np.s ! Abs} ; -- guriga Axmed, not Axmed gurigiisa
|
||||||
|
{-
|
||||||
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
|
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
|
||||||
PartNP cn np = cn ** { } ;
|
PartNP cn np = cn ** { } ;
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,8 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkN2 : overload {
|
mkN2 : overload {
|
||||||
mkN2 : Str -> N2 ; -- Predictable N2, no preposition
|
mkN2 : Str -> N2 ; -- Predictable N2
|
||||||
mkN2 : Str -> Case -> N2 ; -- Predictable N2, given preposition
|
mkN2 : N -> N2 -- N2 out of noun
|
||||||
mkN2 : N -> Case -> N2 -- N2 out of noun and preposition
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPN : overload {
|
mkPN : overload {
|
||||||
@@ -165,9 +164,8 @@ oper
|
|||||||
= \n -> n ** {shortPoss = True} ;
|
= \n -> n ** {shortPoss = True} ;
|
||||||
|
|
||||||
mkN2 = overload {
|
mkN2 = overload {
|
||||||
mkN2 : Str -> N2 = \s -> lin N2 (mkN1 s ** {c2 = Gen}) ;
|
mkN2 : Str -> N2 = \s -> lin N2 (mkN1 s) ;
|
||||||
mkN2 : Str -> Case -> N2 = \s,p -> lin N2 (mkN1 s ** {c2 = p}) ;
|
mkN2 : N -> N2 = \n -> lin N2 n ;
|
||||||
mkN2 : N -> Case -> N2 = \n,p -> lin N2 (n ** {c2=p})
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPN = overload {
|
mkPN = overload {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ oper
|
|||||||
-- Nouns
|
-- Nouns
|
||||||
|
|
||||||
param
|
param
|
||||||
Case = Nom | Abs | Gen ; -- | Voc exists for some words
|
Case = Nom | Abs ;
|
||||||
Gender = Masc | Fem ;
|
Gender = Masc | Fem ;
|
||||||
Vowel = vA | vE | vI | vO | vU | NA ; -- For vowel assimilation
|
Vowel = vA | vE | vI | vO | vU | NA ; -- For vowel assimilation
|
||||||
GenNum = SgMasc | SgFem | PlInv ; -- For Quant
|
GenNum = SgMasc | SgFem | PlInv ; -- For Quant
|
||||||
@@ -87,7 +87,7 @@ param
|
|||||||
| Def Number Vowel -- Stems for definite and determinative suffixes
|
| Def Number Vowel -- Stems for definite and determinative suffixes
|
||||||
-- Special forms only for fem. nouns ending in consonant.
|
-- Special forms only for fem. nouns ending in consonant.
|
||||||
| Numerative -- When modified by a number: either pl gen or sg abs
|
| Numerative -- When modified by a number: either pl gen or sg abs
|
||||||
| NomSg | GenSg | GenPl ;
|
| NomSg ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
getAgr : NForm -> Gender -> Agreement = \n,g ->
|
getAgr : NForm -> Gender -> Agreement = \n,g ->
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ resource ResSom = ParamSom ** open Prelude, Predef, ParamSom in {
|
|||||||
-- Nouns
|
-- Nouns
|
||||||
oper
|
oper
|
||||||
|
|
||||||
Noun : Type = {s : NForm => Str ; g : Gender ; shortPoss : Bool} ;
|
Noun : Type = {s : NForm => Str; g : Gender ; shortPoss : Bool} ;
|
||||||
Noun2 : Type = Noun ** {c2 : Case} ;
|
Noun2 : Type = Noun ; -- TODO eventually more parameters?
|
||||||
Noun3 : Type = Noun2 ** {c3 : Case} ;
|
Noun3 : Type = Noun ;
|
||||||
|
|
||||||
CNoun : Type = Noun ** {mod : Number => Case => Str ; hasMod : Bool} ;
|
CNoun : Type = Noun ** {mod : Number => Case => Str ; hasMod : Bool} ;
|
||||||
|
|
||||||
@@ -18,11 +18,9 @@ oper
|
|||||||
let bisadi = case gender of
|
let bisadi = case gender of
|
||||||
{ Fem => case wiil of { _ + #c => wiil+"i" ; _ => wiil} ;
|
{ Fem => case wiil of { _ + #c => wiil+"i" ; _ => wiil} ;
|
||||||
Masc => wiil } ;
|
Masc => wiil } ;
|
||||||
genforms : {p1, p2 : Str} = case gender of
|
bisadood = case gender of
|
||||||
{ Fem => case wiilal of {_ + "o" => <wiil+"eed", wiilal+"od"> ; _ => <wiil, wiilal>} ;
|
{ Fem => case wiilal of {_ + "o" => wiilal+"od" ; _ => wiil} ;
|
||||||
Masc => <wiil,wiilal> } ;
|
Masc => wiil } ;
|
||||||
shimbireed = genforms.p1 ;
|
|
||||||
bisadood = genforms.p2 ;
|
|
||||||
defStems : Str -> Vowel => Str = \s -> case s of {
|
defStems : Str -> Vowel => Str = \s -> case s of {
|
||||||
ilk + "aha" =>
|
ilk + "aha" =>
|
||||||
table { vE => ilk+"eh" ;
|
table { vE => ilk+"eh" ;
|
||||||
@@ -39,10 +37,7 @@ oper
|
|||||||
Indef Pl => wiilal ;
|
Indef Pl => wiilal ;
|
||||||
Def Sg vow => defStems wiilka ! vow ;
|
Def Sg vow => defStems wiilka ! vow ;
|
||||||
Def Pl vow => defStems wiilasha ! vow ;
|
Def Pl vow => defStems wiilasha ! vow ;
|
||||||
-- Special forms for fem. nouns ending in consonant
|
NomSg => bisadi ; -- Special form for fem. nouns ending in consonant
|
||||||
NomSg => bisadi ;
|
|
||||||
GenSg => shimbireed ;
|
|
||||||
GenPl => bisadood ;
|
|
||||||
Numerative => case bisadood of {_+"ood" => bisadood ; _ => wiil}
|
Numerative => case bisadood of {_+"ood" => bisadood ; _ => wiil}
|
||||||
} ;
|
} ;
|
||||||
g = gender ;
|
g = gender ;
|
||||||
@@ -155,6 +150,55 @@ oper
|
|||||||
v : Vowel}
|
v : Vowel}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
pronTable : Agreement => Pronoun = table {
|
||||||
|
Sg1 => {
|
||||||
|
s = table {Nom => "aan" ; {-Voc => "aniga" ;-} Abs => "i"} ;
|
||||||
|
a = Sg1 ; isPron = True ;
|
||||||
|
poss = {s = "ay" ; v = vA ; sp = gnTable "ayg" "ayd" "uwayg"}
|
||||||
|
} ;
|
||||||
|
Sg2 => {
|
||||||
|
s = table {Nom => "aad" ; {-Voc => "adiga" ;-} Abs => "ku"} ;
|
||||||
|
a = Sg2 ; isPron = True ;
|
||||||
|
poss = {s = "aa" ; v = vA ; sp = gnTable "aag" "aad" "uwaag"}
|
||||||
|
} ;
|
||||||
|
Sg3 Masc => {
|
||||||
|
s = table {Nom => "uu" ; {-Voc => "isaga" ;-} Abs => []} ;
|
||||||
|
a = Sg3 Masc ; isPron = True ;
|
||||||
|
poss = {s = "iis" ; v = vI ; sp = gnTable "iis" "iis" "uwiis"}
|
||||||
|
} ;
|
||||||
|
Sg3 Fem => {
|
||||||
|
s = table {Nom => "ay" ; {-Voc => "iyada" ;-} Abs => []} ;
|
||||||
|
a = Sg3 Fem ; isPron = True ;
|
||||||
|
poss = {s = "eed" ; v = vE ; sp = gnTable "eed" "eed" "uweed"}
|
||||||
|
} ;
|
||||||
|
Pl1 Excl => {
|
||||||
|
s = table {Nom => "aan" ; {-Voc => "annaga" ;-} Abs => "na"} ;
|
||||||
|
a = Pl1 Incl ; isPron = True ;
|
||||||
|
poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"}
|
||||||
|
} ;
|
||||||
|
Pl1 Incl => {
|
||||||
|
s = table {Nom => "aynu" ; {-Voc => "innaga" ;-} Abs => "ina"} ;
|
||||||
|
a = Pl1 Incl ; isPron = True ;
|
||||||
|
poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"}
|
||||||
|
} ;
|
||||||
|
Pl2 => {
|
||||||
|
s = table {Nom => "aad" ; {-Voc => "idinka" ;-} Abs => "idin"} ;
|
||||||
|
a = Pl2 ; isPron = True ;
|
||||||
|
poss = {s = "iin" ; v = vI ; sp = gnTable "iinn" "iinn" "uwiinn"}
|
||||||
|
} ;
|
||||||
|
Pl3 => {
|
||||||
|
s = table {Nom => "ay" ; {-Voc => "iyaga" ;-} Abs => []} ;
|
||||||
|
a = Pl3 ; isPron = True ;
|
||||||
|
poss = {s = "ood" ; v = vO ; sp = gnTable "ood" "ood" "uwood"}
|
||||||
|
} ;
|
||||||
|
Impers => {
|
||||||
|
s = table {Nom => "la" ; Abs => "??"} ;
|
||||||
|
a = Impers ; isPron = True ;
|
||||||
|
poss = {s = "??" ; v = vO ; sp = gnTable "??" "??" "??"}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- Second series object pronouns, Sayeed p. 74-75
|
-- Second series object pronouns, Sayeed p. 74-75
|
||||||
-- For two non-3rd person object pronouns, e.g. "They took you away from me"
|
-- For two non-3rd person object pronouns, e.g. "They took you away from me"
|
||||||
secondObject : Agreement => Str = table {
|
secondObject : Agreement => Str = table {
|
||||||
@@ -165,6 +209,7 @@ oper
|
|||||||
Pl2 => "kiin" ;
|
Pl2 => "kiin" ;
|
||||||
_ => []
|
_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Det, Quant, Card, Ord
|
-- Det, Quant, Card, Ord
|
||||||
|
|
||||||
|
|||||||
@@ -119,44 +119,15 @@ lin with_Prep = prep la ;
|
|||||||
-- Pron
|
-- Pron
|
||||||
|
|
||||||
-- Pronouns are closed class, no constructor in ParadigmsSom.
|
-- Pronouns are closed class, no constructor in ParadigmsSom.
|
||||||
|
|
||||||
i_Pron = {
|
|
||||||
s = table {Nom => "aan" ; Voc => "aniga" ; _Abs => "i"} ;
|
|
||||||
a = Sg1 ; isPron = True ;
|
|
||||||
poss = {s = "ay" ; v = vA ; sp = gnTable "ayg" "ayd" "uwayg"}
|
|
||||||
} ;
|
|
||||||
youPol_Pron, -- TODO check
|
|
||||||
youSg_Pron = {
|
|
||||||
s = table {Nom => "aad" ; Voc => "adiga" ; _Abs => "ku"} ;
|
|
||||||
a = Sg2 ; isPron = True ;
|
|
||||||
poss = {s = "aa" ; v = vA ; sp = gnTable "aag" "aad" "uwaag"}
|
|
||||||
} ;
|
|
||||||
it_Pron = he_Pron ** {s = \\_ => []} ;
|
it_Pron = he_Pron ** {s = \\_ => []} ;
|
||||||
he_Pron = {
|
i_Pron = pronTable ! Sg1 ;
|
||||||
s = table {Nom => "uu" ; Voc => "isaga" ; _Abs => []} ;
|
youPol_Pron, -- TODO check
|
||||||
a = Sg3 Masc ; isPron = True ;
|
youSg_Pron = pronTable ! Sg2 ;
|
||||||
poss = {s = "iis" ; v = vI ; sp = gnTable "iis" "iis" "uwiis"}
|
he_Pron = pronTable ! Sg3 Masc ;
|
||||||
} ;
|
she_Pron = pronTable ! Sg3 Fem ;
|
||||||
she_Pron = {
|
we_Pron = pronTable ! Pl1 Excl ;
|
||||||
s = table {Nom => "ay" ; Voc => "iyada" ; _Abs => []} ;
|
youPl_Pron = pronTable ! Pl2 ;
|
||||||
a = Sg3 Fem ; isPron = True ;
|
they_Pron = pronTable ! Pl3 ;
|
||||||
poss = {s = "eed" ; v = vE ; sp = gnTable "eed" "eed" "uweed"}
|
|
||||||
} ;
|
|
||||||
we_Pron = {
|
|
||||||
s = table {Nom => "aan" ; Voc => "innaga" ; _Abs => "na"} ;
|
|
||||||
a = Pl1 Excl ; isPron = True ;
|
|
||||||
poss = {s = "een" ; v = vE ; sp = gnTable "eenn" "eenn" "uweenn"}
|
|
||||||
} ;
|
|
||||||
youPl_Pron = {
|
|
||||||
s = table {Nom => "aad" ; Voc => "idinka" ; _Abs => "idin"} ;
|
|
||||||
a = Pl2 ; isPron = True ;
|
|
||||||
poss = {s = "iin" ; v = vI ; sp = gnTable "iinn" "iinn" "uwiinn"}
|
|
||||||
} ;
|
|
||||||
they_Pron = {
|
|
||||||
s = table {Nom => "ay" ; Voc => "iyaga" ; _Abs => []} ;
|
|
||||||
a = Pl3 ; isPron = True ;
|
|
||||||
poss = {s = "ood" ; v = vO ; sp = gnTable "ood" "ood" "uwood"}
|
|
||||||
} ;
|
|
||||||
{-
|
{-
|
||||||
lin whatPl_IP = ;
|
lin whatPl_IP = ;
|
||||||
lin whatSg_IP = ;
|
lin whatSg_IP = ;
|
||||||
|
|||||||
Reference in New Issue
Block a user