forked from GitHub/gf-rgl
@@ -9,7 +9,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
||||
|
||||
S = ResSom.Sentence ;
|
||||
QS = SS ;
|
||||
RS = {s : Gender => Case => Str} ;
|
||||
RS = {s : State => Gender => Case => Str} ;
|
||||
-- relative sentence. Tense and polarity fixed,
|
||||
-- but agreement may depend on the CN/NP it modifies.
|
||||
|
||||
|
||||
@@ -38,14 +38,15 @@ lin
|
||||
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
||||
|
||||
|
||||
--RS depends on gender and case, otherwise exactly like previous.
|
||||
-- RS depends on state, gender and case, otherwise exactly like previous.
|
||||
-- RS can modify CNs, which are open for state, number and case, and have inherent gender.
|
||||
lincat
|
||||
[RS] = {s1,s2 : Gender => Case => Str} ;
|
||||
[RS] = {s1,s2 : State => Gender => Case => Str} ;
|
||||
|
||||
lin
|
||||
BaseRS x y = twoTable2 Gender Case x y ;
|
||||
ConsRS xs x = consrTable2 Gender Case comma xs x ;
|
||||
ConjRS co xs = conjunctDistrTable2' Gender Case co xs ;
|
||||
BaseRS = twoTable3 State Gender Case ;
|
||||
ConsRS = consrTable3 State Gender Case comma ;
|
||||
ConjRS = conjunctRSTable State Gender Case ;
|
||||
|
||||
{-
|
||||
lincat
|
||||
@@ -115,9 +116,16 @@ oper
|
||||
|
||||
-- Like conjunctTable from prelude/Coordination.gf,
|
||||
-- but forces the first argument into absolutive.
|
||||
conjunctNPTable : ConjDistr -> ({s1,s2 : Case => Str} ** BaseNP) -> {s : Case => Str ; st : State} = \co,xs -> xs **
|
||||
{s = -- TODO if xs is a pronoun, make them use (pronTable ! xs.a).sp
|
||||
table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! cas}} ;
|
||||
conjunctNPTable : ConjDistr -> ({s1,s2 : Case => Str} ** BaseNP) -> NP = \co,xs -> lin NP (xs ** {
|
||||
s = \\c => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! c
|
||||
}) ;
|
||||
|
||||
conjunctRSTable : ConjDistr -> {s1,s2 : State => Gender => Case => Str} -> RS = \co,xs -> lin RS (xs ** {
|
||||
s = \\st,g,c => co.s1
|
||||
++ xs.s1 ! st ! g ! c
|
||||
++ co.s2 ! st
|
||||
++ xs.s2 ! st ! g ! c
|
||||
}) ;
|
||||
|
||||
np2objpron : NounPhrase -> NounPhrase = \np -> np ** {
|
||||
s = objpron np
|
||||
|
||||
@@ -73,9 +73,17 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
||||
-- : NP -> Adv -> NP ; -- Paris today ; boys, such as ..
|
||||
--AdvNP,ExtAdvNP = \np,adv -> np ** {} ; --adverbs are complicated
|
||||
|
||||
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||
-- : 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:
|
||||
"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."
|
||||
In practice, we don't care--it's impossible to know on the RGL level
|
||||
which RS are restrictive and which appositive, as it is semantic.
|
||||
-}
|
||||
RelNP np rs = np ** {
|
||||
s = \\c => objpron np ! c ++ rs.s ! npgender np ! c ;
|
||||
s = \\c => objpron np ! c ++ "oo" ++ rs.s ! Indefinite ! npgender np ! c ;
|
||||
isPron = False ;
|
||||
} ;
|
||||
|
||||
@@ -237,7 +245,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?
|
||||
cn.mod ! st ! n ! Abs
|
||||
++ andConj st cn.hasMod
|
||||
++ rs.s ! gender cn ! c ;
|
||||
++ rs.s ! st ! gender cn ! c ;
|
||||
hasMod = True ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ oper
|
||||
} where {
|
||||
allomF : Str -> DefTA = \wiilka ->
|
||||
case wiilka of {
|
||||
_ + "ta" => DA ; _ + "sha" => SHA ;
|
||||
_ + "ta" => TA ; _ + "sha" => SHA ;
|
||||
_ + "da" => DA ; _ + "dha" => DHA } ;
|
||||
allomM : Str -> DefKA = \wiilka ->
|
||||
case wiilka of {
|
||||
@@ -271,9 +271,13 @@ param
|
||||
| VPres Aspect VAgr Polarity
|
||||
| VNegPast Aspect
|
||||
| VPast Aspect VAgr
|
||||
| VImp Number Polarity
|
||||
-- | VRelShort -- "som är/har/…" TODO is this used in other verbs?
|
||||
| VRel Gender -- Reduced present general in relative clauses
|
||||
| VImp Number Polarity ;
|
||||
| VRel Gender ; {- Sayeed p. 95-96 + ch 8
|
||||
Reduced present general in relative clauses; as absolutive
|
||||
1/2SG/3SG M/2PL/3PL sugá (VRel Masc)
|
||||
3 SG F sugtá (VRel Fem)
|
||||
1PL sugná -- not yet in the grammar -}
|
||||
|
||||
VAgr =
|
||||
Sg1_Sg3Masc
|
||||
|
||||
@@ -17,7 +17,7 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
||||
UttNP np = { s = np.s ! Abs} ;
|
||||
UttVP vp = { s = infVP vp } ;
|
||||
UttAdv adv = {s = linAdv adv} ;
|
||||
UttCN n = {s = linCN n } ;
|
||||
UttCN n = {s = linCN n} ;
|
||||
UttCard n = {s = n.s ! Mid} ;
|
||||
UttAP ap = { s = ap.s ! AF Sg Abs } ;
|
||||
UttInterj i = i ;
|
||||
|
||||
@@ -6,26 +6,21 @@ lin
|
||||
-- : Cl -> RCl ; -- such that John loves her
|
||||
-- RelCl cl = {s = cl.s ! Subord} ;
|
||||
|
||||
{-
|
||||
-- Sayeed p. 95-96 + ch 8
|
||||
Reduced present general in relative clauses; as absolutive
|
||||
1/2SG/3SG M/2PL/3PL sugá (VRel Masc)
|
||||
3 SG F sugtá (VRel Fem)
|
||||
1PL sugná -- not yet in the grammar
|
||||
|
||||
(18) (a) nimánka buugágga keená men-the books-the bring
|
||||
'the men who bring the books'
|
||||
(b) buugágga nimanku keenàan
|
||||
books-the men-the bring 'the books which the men bring'
|
||||
-}
|
||||
-- : 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).
|
||||
These forms are found in VRel in VP, and aren't chosen by predVP, so we put
|
||||
them in manually in RelVP.
|
||||
-}
|
||||
RelVP rp vp = {s = \\g,c,t,a,p =>
|
||||
let cls = predVPSlash impersNP vp ;
|
||||
rcl = mergeRCl (cls.s ! False) ; -- Other than present tense, just use normal verb forms
|
||||
rclSubord = mergeRCl (cls.s ! True) ;
|
||||
rclStatement = mergeRCl (cls.s ! False) ;
|
||||
in rp.s ++ case <g,c,t,a,p> of {
|
||||
<Fem,Abs,Pres,Simul,Pos> => linVP (VRel Fem) vp ;
|
||||
<Masc,Abs,Pres,Simul,Pos> => linVP (VRel Masc) vp ;
|
||||
_ => rcl.s ! t ! a ! p }
|
||||
<g,Abs,Pres,Simul,Pos> => linVP (VRel g) vp ; -- reduced present only in absolutive
|
||||
<_,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.
|
||||
} ;
|
||||
|
||||
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||
|
||||
@@ -770,10 +770,14 @@ oper
|
||||
mergeQCl : (Tense => Anteriority => Polarity => BaseCl) -> QClause = mergeSTM True ;
|
||||
mergeRCl : (Tense => Anteriority => Polarity => BaseCl) -> QClause = mergeSTM False ;
|
||||
|
||||
mergeSTM : Bool -> (Tense => Anteriority => Polarity => BaseCl) -> QClause = \includeSTM,b ->
|
||||
{s = \\t,a,p => (b ! t ! a ! p).beforeSTM
|
||||
++ if_then_Str includeSTM (b ! t ! a ! p).stm []
|
||||
++ (b ! t ! a ! p).afterSTM
|
||||
mergeSTM : Bool -> (Tense => Anteriority => Polarity => BaseCl) -> QClause = \includeSTM,bcl ->
|
||||
{s = \\t,a,p => (bcl ! t ! a ! p).beforeSTM
|
||||
++ case <includeSTM,p> of {
|
||||
<False,Pos> => [] ;
|
||||
<False,Neg> => "aan" ;
|
||||
<True> => (bcl ! t ! a ! p).stm
|
||||
}
|
||||
++ (bcl ! t ! a ! p).afterSTM
|
||||
} ;
|
||||
|
||||
predVPSlash : NounPhrase -> VPSlash -> ClSlash = \np,vps ->
|
||||
|
||||
@@ -62,7 +62,7 @@ lin
|
||||
UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ;
|
||||
|
||||
-- : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl t p cl = {s = \\g,c => t.s ++ p.s ++ cl.s ! g ! c ! t.t ! t.a ! p.p} ;
|
||||
UseRCl t p cl = {s = \\st,g,c => t.s ++ p.s ++ cl.s ! g ! c ! t.t ! t.a ! p.p} ;
|
||||
|
||||
-- AdvS : Adv -> S -> S ; -- then I will go home
|
||||
-- ExtAdvS : Adv -> S -> S ; -- next week, I will go home
|
||||
|
||||
@@ -137,6 +137,6 @@ lin
|
||||
} ;
|
||||
|
||||
-- : VP -- Copula alone;
|
||||
UseCopula = useV copula ;
|
||||
UseCopula = useV copula ** {pred=Copula} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- LangEng: the big black bird
|
||||
LangSom: shimbir BIND da madow ee weyn
|
||||
LangSom: shimbir BIND ta madow ee weyn
|
||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (AdjCN (PositA big_A) (AdjCN (PositA black_A) (UseN bird_N))))) NoVoc
|
||||
|
||||
-- LangEng: a big black bird
|
||||
|
||||
@@ -1,15 +1,64 @@
|
||||
-- Restrictive relative clauses (RelCN)
|
||||
|
||||
-- LangEng: the books that the men buy
|
||||
LangSom: buugaag BIND ta niman BIND ku iibsadaan
|
||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a buy_V2))))))) NoVoc
|
||||
|
||||
-- LangEng: the books that the man doesn't buy
|
||||
LangSom: buugaag BIND ta nin BIND ku aan iibsado
|
||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN man_N)) (SlashV2a buy_V2))))))) NoVoc
|
||||
|
||||
|
||||
-- LangEng: the men that buy the books
|
||||
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
|
||||
|
||||
-- LangEng: the men that don't buy the books
|
||||
LangSom: niman BIND ka buugaag BIND ta aan 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
|
||||
|
||||
|
||||
-- LangEng: the men that buy the books are these
|
||||
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
|
||||
|
||||
-- LangEng: the men that don't buy the books are these
|
||||
LangSom: niman BIND ka buugaag BIND ta aan 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
|
||||
|
||||
|
||||
-- LangEng: the books that the men buy are these
|
||||
LangSom: buugaag BIND ta niman BIND ku iibsadaan waa kuwan
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a buy_V2)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
||||
|
||||
-- LangEng: the books that the men don't buy are these
|
||||
LangSom: buugaag BIND ta niman BIND ku aan iibsadaan waa kuwan
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a buy_V2)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
||||
|
||||
-- LangEng: the books that the man doesn't buy are these
|
||||
LangSom: buugaag BIND ta nin BIND ku aan iibsado waa kuwan
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN book_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (UseN man_N)) (SlashV2a buy_V2)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc
|
||||
|
||||
|
||||
-- With a verb that takes a preposition
|
||||
-- LangEng: the woman that you taught
|
||||
LangSom: naag BIND ta aad ku bartay
|
||||
Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN woman_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (UsePron youSg_Pron) (SlashV2a teach_V2))))))) NoVoc
|
||||
|
||||
-- Appositive relative clauses (RelNP)
|
||||
|
||||
-- LangEng: he , that the men see
|
||||
LangSom: isaga oo niman BIND ku arkaan
|
||||
Lang: PhrUtt NoPConj (UttNP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a see_V2)))))) NoVoc
|
||||
|
||||
-- LangEng: he , that sees the men
|
||||
LangSom: isaga oo niman BIND ka arka
|
||||
Lang: PhrUtt NoPConj (UttNP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN man_N))))))) NoVoc
|
||||
|
||||
-- LangEng: he , that the men see , is this
|
||||
LangSom: isagu oo niman BIND ku arkaan waa kan
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumPl) (UseN man_N)) (SlashV2a see_V2))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumSg))))))) NoVoc
|
||||
|
||||
--LangEng: he , that sees the men , is this
|
||||
LangSom: isagu oo niman BIND ka arkaa waa kan
|
||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UsePron he_Pron) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant DefArt NumPl) (UseN man_N)))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumSg))))))) NoVoc
|
||||
|
||||
Reference in New Issue
Block a user