mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Som) Add ImpVP and UttImp{Sg,Pl,Pol}
This commit is contained in:
@@ -16,7 +16,7 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
|
|||||||
Cl = ResSom.ClSlash ;
|
Cl = ResSom.ClSlash ;
|
||||||
ClSlash = ResSom.ClSlash ;
|
ClSlash = ResSom.ClSlash ;
|
||||||
SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
||||||
Imp = SS ; -- imperative e.g. "look at this"
|
Imp = {s : Number => Polarity => Str} ; -- imperative e.g. "look at this"
|
||||||
|
|
||||||
--2 Questions and interrogatives
|
--2 Questions and interrogatives
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
|||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|
||||||
UttImpSg pol imp =
|
UttImpSg pol imp =
|
||||||
let ma = case pol.p of { Pos => [] ; Neg => "ma" }
|
let ha = case pol.p of {Pos => [] ; Neg => "ha"}
|
||||||
in { s = ma ++ imp.s } ;
|
in {s = ha ++ imp.s ! Sg ! pol.p} ;
|
||||||
UttImpPl = UttImpSg ;
|
UttImpPl pol imp =
|
||||||
|
let ha = case pol.p of {Pos => [] ; Neg => "ha"}
|
||||||
|
in {s = ha ++ imp.s ! Pl ! pol.p} ;
|
||||||
UttImpPol = UttImpSg ;
|
UttImpPol = UttImpSg ;
|
||||||
|
|
||||||
UttIP ip = {s = ip.s ! Abs} ;
|
UttIP ip = {s = ip.s ! Abs} ;
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ lin
|
|||||||
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
UseSlash t p cls = {
|
UseSlash t p cls = {
|
||||||
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
||||||
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--2 Imperatives
|
--2 Imperatives
|
||||||
-- : VP -> Imp ;
|
-- : VP -> Imp ;
|
||||||
--ImpVP vp = { s = linVP vp } ;
|
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
|
||||||
|
|
||||||
--2 Embedded sentences
|
--2 Embedded sentences
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ lin
|
|||||||
-- : Temp -> Pol -> Cl -> S ;
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
UseCl t p cls = {
|
UseCl t p cls = {
|
||||||
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
s = \\isSubord => let cl = cl2sentence isSubord cls in
|
||||||
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Temp -> Pol -> QCl -> QS ;
|
-- : Temp -> Pol -> QCl -> QS ;
|
||||||
|
|||||||
Reference in New Issue
Block a user