forked from GitHub/gf-rgl
(Som) WIP: add FocusObj
This commit is contained in:
@@ -7,7 +7,13 @@ concrete ExtendSom of Extend = CatSom
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
-- : NP -> SSlash -> Utt ; -- her I love -- Sayeed p. 189-
|
-- : NP -> SSlash -> Utt ; -- her I love -- Sayeed p. 189-
|
||||||
FocusObj np sslash =
|
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
|
||||||
|
obj = case np.isPron of {
|
||||||
|
True => np.empty ++ (pronTable ! np.a).sp ;
|
||||||
|
False => np.s ! Abs }
|
||||||
|
in {s = ssSub.beforeSTM ++ "waxa" ++ ssSub.stm ++ ss.afterSTM ++ obj} ;
|
||||||
|
|
||||||
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||||
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||||
|
|||||||
@@ -798,13 +798,14 @@ oper
|
|||||||
_ => o
|
_ => o
|
||||||
-- object pronoun, prepositions and negation all contract
|
-- object pronoun, prepositions and negation all contract
|
||||||
} ;
|
} ;
|
||||||
stm : Str = case cltyp of {
|
stm : {p1,p2 : Str} = case cltyp of {
|
||||||
Subord => if_then_Pol p [] "aan" ++ subjpron ; -- 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 (Sayeed p. 210)
|
||||||
Question => "ma" ; -- TODO find out how negative questions work
|
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 {
|
Statement => case <p,vp.pred,subj.a> of {
|
||||||
<Pos,Copula|NoCopula,Sg3 _|Impers> => "waa" ;
|
<Pos,Copula|NoCopula,Sg3 _|Impers> => {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) ;
|
||||||
} where {
|
} where {
|
||||||
vp = case isPassive vps of {
|
vp = case isPassive vps of {
|
||||||
True => complSlash (insertComp vps np) ;
|
True => complSlash (insertComp vps np) ;
|
||||||
@@ -812,13 +813,14 @@ oper
|
|||||||
subj = case isPassive vps of {True => impersNP ; _ => np}
|
subj = case isPassive vps of {True => impersNP ; _ => np}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
wordOrder : (sn,sp,stm : Str) -> {p1,p2 : Str} -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
||||||
\subjnoun,subjpron,stm,obj,pred,vp -> {
|
\subjnoun,subjpron,stm,obj,pred,vp -> {
|
||||||
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
|
++ obj.p1 ; -- object if it's a noun
|
||||||
stm = stm ; -- sentence type marker + possible subj. pronoun
|
stm = stm.p1 ; -- sentence type marker
|
||||||
afterSTM = obj.p2 -- object if it's a pronoun
|
afterSTM = stm.p2 -- possible subj. 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
|
||||||
++ vp.secObj -- "second object"
|
++ vp.secObj -- "second object"
|
||||||
@@ -866,10 +868,10 @@ oper
|
|||||||
let stm = if_then_Pol b "w" "m"
|
let stm = if_then_Pol b "w" "m"
|
||||||
in stm + subjpron ! a ;
|
in stm + subjpron ! a ;
|
||||||
|
|
||||||
stmarkerNoContr : Agreement => Polarity => Str = \\a,p =>
|
stmarkerNoContr : Agreement => Polarity => {p1,p2 : Str} = \\a,p =>
|
||||||
case p of {
|
case p of {
|
||||||
Pos => "waa" ++ subjpron ! a ;
|
Pos => {p1 = "waa" ; p2 = subjpron ! a} ;
|
||||||
Neg => "ma" } ;
|
Neg => {p1 = "ma" ; p2 = []} } ;
|
||||||
|
|
||||||
subjpron : Agreement => Str = table {
|
subjpron : Agreement => Str = table {
|
||||||
Sg1|Pl1 Excl => "aan" ;
|
Sg1|Pl1 Excl => "aan" ;
|
||||||
@@ -885,7 +887,7 @@ oper
|
|||||||
oper
|
oper
|
||||||
linVP : VForm -> VerbPhrase -> Str = \vf,vp ->
|
linVP : VForm -> VerbPhrase -> Str = \vf,vp ->
|
||||||
let inf = {inf = vp.s ! vf ; fin=[]} ;
|
let inf = {inf = vp.s ! vf ; fin=[]} ;
|
||||||
wo = wordOrder [] [] [] (vp.comp ! Pl3) inf vp ;
|
wo = wordOrder [] [] {p1,p2=[]} (vp.comp ! Pl3) inf vp ;
|
||||||
in wo.beforeSTM ++ wo.afterSTM ;
|
in wo.beforeSTM ++ wo.afterSTM ;
|
||||||
|
|
||||||
linCN : CNoun -> Str = \cn -> cn.s ! NomSg ++ cn.mod ! Sg ! Abs ;
|
linCN : CNoun -> Str = \cn -> cn.s ! NomSg ++ cn.mod ! Sg ! Abs ;
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ lin
|
|||||||
|
|
||||||
-}
|
-}
|
||||||
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
--UseSlash t p cls = {s = \\b => t.s ++ p.s ++ cls.s ! b ! t.t ! t.a ! p.p} ;
|
UseSlash t p cls = {s = \\b =>
|
||||||
|
let sent = cls.s ! b ! t.t ! t.a ! p.p in
|
||||||
|
sent ** {beforeSTM = t.s ++ p.s ++ sent.beforeSTM}
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Imperatives
|
--2 Imperatives
|
||||||
-- : VP -> Imp ;
|
-- : VP -> Imp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user