forked from GitHub/gf-rgl
(Som) Fix word order+add negative form for rel.cls
This commit is contained in:
@@ -123,7 +123,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
|
|
||||||
linref
|
linref
|
||||||
-- Cl = linCl ;
|
-- Cl = linCl ;
|
||||||
VP = linVP VInf ;
|
VP = infVP ;
|
||||||
CN = linCN ;
|
CN = linCN ;
|
||||||
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ;
|
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ;
|
||||||
S = \s -> linBaseCl (s.s ! False) ;
|
S = \s -> linBaseCl (s.s ! False) ;
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
mod = \\st,n,c => --what to do with subject case if there's both adj and RS?
|
mod = \\st,n,c => --what to do with subject case if there's both adj and RS?
|
||||||
cn.mod ! st ! n ! Abs
|
cn.mod ! st ! n ! Abs
|
||||||
++ andConj st cn.hasMod
|
++ andConj st cn.hasMod
|
||||||
++ rs.s ! st ! gennum cn n ! c ;
|
++ rs.s ! st ! gennum cn Sg ! c ; -- gennum cn Sg, because plural form is only for 1st person plural
|
||||||
hasMod = True ;
|
hasMod = True ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ param
|
|||||||
1/2SG/3SG M/2PL/3PL suga (VRel MascSg)
|
1/2SG/3SG M/2PL/3PL suga (VRel MascSg)
|
||||||
3 SG F sugta (VRel FemSg)
|
3 SG F sugta (VRel FemSg)
|
||||||
1PL sugna (VRel PlInv) -}
|
1PL sugna (VRel PlInv) -}
|
||||||
|
| VRelNeg -- Saeed p. 211 have: lahayn, be: ahayni
|
||||||
| VNegCond GenNum ;
|
| VNegCond GenNum ;
|
||||||
|
|
||||||
VAgr =
|
VAgr =
|
||||||
@@ -315,6 +316,14 @@ oper
|
|||||||
Pl1 _ => Pl1_ ; Pl2 => Pl2_ ; Pl3 => Pl3_
|
Pl1 _ => Pl1_ ; Pl2 => Pl2_ ; Pl3 => Pl3_
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
isNeg : VForm -> Bool = \vf -> case vf of {
|
||||||
|
VNegPast _ => True ;
|
||||||
|
VNegCond _ => True ;
|
||||||
|
VRelNeg => True ;
|
||||||
|
VImp _ Neg => True ;
|
||||||
|
VPres _ _ Neg => True ;
|
||||||
|
_ => False
|
||||||
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Clauses
|
-- Clauses
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ lin
|
|||||||
rclSubord = mergeRCl (cls.s ! True) ;
|
rclSubord = mergeRCl (cls.s ! True) ;
|
||||||
rclStatement = mergeRCl (cls.s ! False) ;
|
rclStatement = mergeRCl (cls.s ! False) ;
|
||||||
in rp.s ++ case <gn,c,t,a,p> of {
|
in rp.s ++ case <gn,c,t,a,p> of {
|
||||||
<g,Abs,Pres,Simul,Pos> => linVP (VRel g) vp ; -- reduced present only in absolutive
|
<g,Abs,Pres,Simul,Pos> => linVP (VRel g) Subord vp ; -- reduced present only in absolutive
|
||||||
|
<_,Abs,Pres,Simul,Neg> => linVP VRelNeg Subord vp ; -- special form for have and be
|
||||||
<_,Nom,Pres,Simul,Pos> => rclStatement.s ! t ! a ! p ; -- the usual forms, not subordinate
|
<_,Nom,Pres,Simul,Pos> => rclStatement.s ! t ! a ! p ; -- the usual forms, not subordinate
|
||||||
_ => rclSubord.s ! t ! a ! p } -- the rest is Subord because of negation.
|
_ => rclSubord.s ! t ! a ! p } -- the rest is Subord because of negation.
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -561,7 +561,8 @@ oper
|
|||||||
VInf => arki ;
|
VInf => arki ;
|
||||||
VRel SgMasc => qaat + "a" ;
|
VRel SgMasc => qaat + "a" ;
|
||||||
VRel SgFem => arag + t + "a" ;
|
VRel SgFem => arag + t + "a" ;
|
||||||
VRel PlInv => arag + "na"
|
VRel PlInv => arag + "na" ;
|
||||||
|
VRelNeg => qaat + "o" -- TODO check
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
sii, dhex = [] ;
|
sii, dhex = [] ;
|
||||||
@@ -630,8 +631,8 @@ oper
|
|||||||
VNegCond SgMasc => "ahaadeen" ; -- 1SG/3 SG M/3PL
|
VNegCond SgMasc => "ahaadeen" ; -- 1SG/3 SG M/3PL
|
||||||
VNegCond SgFem => "ahaateen" ; -- 2SG/3 SG F/2PL
|
VNegCond SgFem => "ahaateen" ; -- 2SG/3 SG F/2PL
|
||||||
VNegCond PlInv => "ahaanneen" ; -- 1PL
|
VNegCond PlInv => "ahaanneen" ; -- 1PL
|
||||||
--VRelShort => "ah" ;
|
VRel _ => "ah" ; -- All persons: see Nilsson p. 78. TODO check Saeed p. 103
|
||||||
VRel _ => "ah" ; -- TODO find right forms
|
VRelNeg => "ahayni" ; -- Saeed
|
||||||
VInf => "ahaan" ;
|
VInf => "ahaan" ;
|
||||||
VImp Sg pol => if_then_Pol pol "ahaw" "ahaanin" ;
|
VImp Sg pol => if_then_Pol pol "ahaw" "ahaanin" ;
|
||||||
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
||||||
@@ -649,10 +650,19 @@ oper
|
|||||||
VPres _ Pl1_ Pos => "leenahay" ;
|
VPres _ Pl1_ Pos => "leenahay" ;
|
||||||
VPres _ Pl2_ Pos => "leedihiin" ;
|
VPres _ Pl2_ Pos => "leedihiin" ;
|
||||||
VPres _ Pl3_ Pos => "leeyihiin" ;
|
VPres _ Pl3_ Pos => "leeyihiin" ;
|
||||||
|
|
||||||
|
VPres _ Sg1_Sg3Masc Neg => "lihi" ;
|
||||||
|
VPres _ Sg2_Sg3Fem Neg => "lihid" ;
|
||||||
|
VPres _ Pl1_ Neg => "lihin" ;
|
||||||
|
VPres _ Pl2_ Neg => "lihidin" ;
|
||||||
|
VPres _ Pl3_ Neg => "laha" ;
|
||||||
|
|
||||||
|
VNegPast _ => "lahayn" ;
|
||||||
|
|
||||||
VPast asp agr => "l" + copula.s ! VPast asp agr ;
|
VPast asp agr => "l" + copula.s ! VPast asp agr ;
|
||||||
VNegCond agr => "l" + copula.s ! VNegCond agr ;
|
VNegCond agr => "l" + copula.s ! VNegCond agr ;
|
||||||
-- VRelShort => "leh" ;
|
VRel _ => "leh" ; -- All persons: see Nilsson p. 78
|
||||||
VRel _ => "leh" ; -- TODO find right forms
|
VRelNeg => "lahayn" ;
|
||||||
x => hold_V.s ! x }
|
x => hold_V.s ! x }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -839,7 +849,7 @@ oper
|
|||||||
Statement => case <p,vp.pred,subj.a> of {
|
Statement => case <p,vp.pred,subj.a> of {
|
||||||
<Pos,Copula|NoCopula,Pl3|Sg3 _> => {p1 = "waa" ; p2 = []} ;
|
<Pos,Copula|NoCopula,Pl3|Sg3 _> => {p1 = "waa" ; p2 = []} ;
|
||||||
_ => stmarkerNoContr ! subj.a ! p }} ;
|
_ => stmarkerNoContr ! subj.a ! p }} ;
|
||||||
in (wordOrder subjnoun subjpron stm obj pred vp) ;
|
in wordOrder subjnoun subjpron stm obj pred vp cltyp ;
|
||||||
} where {
|
} where {
|
||||||
vp : VerbPhrase = case isPassive vps of {
|
vp : VerbPhrase = case isPassive vps of {
|
||||||
True => complSlash (insertComp vps np) ;
|
True => complSlash (insertComp vps np) ;
|
||||||
@@ -847,13 +857,23 @@ oper
|
|||||||
subj : NounPhrase = case isPassive vps of {True => impersNP ; _ => np}
|
subj : NounPhrase = case isPassive vps of {True => impersNP ; _ => np}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> ClType -> BaseCl =
|
||||||
\subjnoun,subjpron,stm,obj,pred,vp -> {
|
\subjnoun,subjpron,stm,obj,pred,vp,cltyp -> {
|
||||||
|
{- Saeed p. 210-211: "The relative clause resembles a main clause in syntax
|
||||||
|
except that the tendency for verb final order is much stronger. [..] Certain
|
||||||
|
elements such as subject clitic pronouns, and the negative word aan 'not' are
|
||||||
|
attracted to the head nominal and thus move away from the verbal group."
|
||||||
|
-}
|
||||||
beforeSTM = vp.berri -- AdV
|
beforeSTM = vp.berri -- AdV
|
||||||
++ subjnoun -- subject if it's a noun
|
++ subjnoun -- subject if it's a noun
|
||||||
++ obj.p1 ; -- object if it's a noun
|
++ case cltyp of {
|
||||||
stm = stm.p1 ; -- sentence type marker
|
Subord => [] ;
|
||||||
|
_ => obj.p1 } ; -- noun object if it's a statement
|
||||||
|
stm = stm.p1 ; -- sentence type marker; empty if subordinate and positive
|
||||||
afterSTM = stm.p2 -- possible subj. pronoun
|
afterSTM = stm.p2 -- possible subj. pronoun
|
||||||
|
++ case cltyp of {
|
||||||
|
Subord => obj.p1 ; -- noun object if it's subordinate clause
|
||||||
|
_ => [] }
|
||||||
++ obj.p2 -- object if it's a pronoun
|
++ obj.p2 -- object if it's a pronoun
|
||||||
++ vp.sii -- restricted set of particles
|
++ vp.sii -- restricted set of particles
|
||||||
++ vp.dhex -- restricted set of nouns/adverbials
|
++ vp.dhex -- restricted set of nouns/adverbials
|
||||||
@@ -903,7 +923,7 @@ oper
|
|||||||
_ => vfStatement t ant p agr vp
|
_ => vfStatement t ant p agr vp
|
||||||
} ; -- TODO other relative forms
|
} ; -- TODO other relative forms
|
||||||
|
|
||||||
infVP : VerbPhrase -> Str = linVP VInf ;
|
infVP : VerbPhrase -> Str = linVP VInf Statement ;
|
||||||
|
|
||||||
stmarkerContr : Agreement => Polarity => Str = \\a,b =>
|
stmarkerContr : Agreement => Polarity => Str = \\a,b =>
|
||||||
let stm = if_then_Pol b "w" "m"
|
let stm = if_then_Pol b "w" "m"
|
||||||
@@ -926,11 +946,15 @@ oper
|
|||||||
-- linrefs
|
-- linrefs
|
||||||
|
|
||||||
oper
|
oper
|
||||||
linVP : VForm -> VerbPhrase -> Str = \vf,vp ->
|
linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp ->
|
||||||
let vp' = complSlash vp ;
|
let vp' = complSlash vp ;
|
||||||
inf = {inf = vp.s ! vf ; fin=[]} ;
|
inf = {inf = vp.s ! vf ; fin=[]} ;
|
||||||
wo = wordOrder [] [] {p1,p2=[]} (vp'.comp ! pagr2agr vp.obj2.a) inf vp' ;
|
stm = case <cltyp,isNeg vf> of {
|
||||||
in wo.beforeSTM ++ wo.afterSTM ;
|
<Subord,True> => {p1 = "aan" ; p2 = []} ;
|
||||||
|
_ => {p1,p2 = []}
|
||||||
|
} ;
|
||||||
|
wo = wordOrder [] [] stm (vp'.comp ! pagr2agr vp.obj2.a) inf vp' cltyp ;
|
||||||
|
in wo.beforeSTM ++ wo.stm ++ wo.afterSTM ;
|
||||||
|
|
||||||
linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ;
|
linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ;
|
||||||
linAdv : Adverb -> Str = \adv ->
|
linAdv : Adverb -> Str = \adv ->
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ LangSom: niman BIND ka buugaag BIND ta iibsada
|
|||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: the men that don't buy the books
|
-- LangEng: the men that don't buy the books
|
||||||
LangSom: niman BIND ka buugaag BIND ta aan iibsado
|
LangSom: niman BIND ka aan buugaag BIND ta iibsado
|
||||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc
|
||||||
|
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ LangSom: niman BIND ka buugaag BIND ta iibsadaa waa kuwan
|
|||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: the men that don't buy the books are these
|
-- LangEng: the men that don't buy the books are these
|
||||||
LangSom: niman BIND ka buugaag BIND ta aan iibsado waa kuwan
|
LangSom: niman BIND ka aan buugaag BIND ta iibsado waa kuwan
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user