forked from GitHub/gf-rgl
trams with mm library
This commit is contained in:
@@ -47,8 +47,8 @@ interface DemRes = open Prelude, Resource in {
|
|||||||
Demonstrative : Type = mkDemType NP ;
|
Demonstrative : Type = mkDemType NP ;
|
||||||
DemAdverb : Type = mkDemType Adv ;
|
DemAdverb : Type = mkDemType Adv ;
|
||||||
|
|
||||||
addDAdv : Adv -> Pointing -> DemAdverb -> DemAdverb = \a,p,d ->
|
mkDAdv : Adv -> Pointing -> DemAdverb = \a,p ->
|
||||||
{s = a.s ++ d.s ; s5 = p.s5 ++ d.s5 ; lock_Adv = a.lock_Adv} ;
|
a ** p ** {lock_Adv = a.lock_Adv} ;
|
||||||
|
|
||||||
param
|
param
|
||||||
MSForm = MInd Bool | MQuest Bool ;
|
MSForm = MInd Bool | MQuest Bool ;
|
||||||
|
|||||||
@@ -1,39 +1,44 @@
|
|||||||
abstract Demonstrative = Categories ** {
|
abstract Demonstrative = Categories ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
MS ; -- multimodal sentence or question
|
MS ; -- multimodal sentence or question
|
||||||
MQS ; -- multimodal wh question
|
MQS ; -- multimodal wh question
|
||||||
MImp ; -- multimodal imperative
|
MImp ; -- multimodal imperative
|
||||||
DNP ; -- demonstrative noun phrase
|
DNP ; -- demonstrative noun phrase
|
||||||
DAdv ; -- demonstrative adverbial
|
DAdv ; -- demonstrative adverbial
|
||||||
Point ; -- pointing gesture
|
[DAdv] ; -- list of demonstrative adverbials
|
||||||
|
Point ; -- pointing gesture
|
||||||
|
|
||||||
fun
|
fun
|
||||||
MkPoint : String -> Point ;
|
MkPoint : String -> Point ;
|
||||||
|
|
||||||
DemV : V -> DNP -> DAdv -> MS ; -- this flies (here)
|
DemV : V -> DNP -> [DAdv] -> MS ; -- this flies (here)
|
||||||
DemV2 : V2 -> DNP -> DNP -> DAdv -> MS ; -- this takes that
|
DemV2 : V2 -> DNP -> DNP -> [DAdv] -> MS ; -- this takes that
|
||||||
ModDemV : VV -> V -> DNP -> DAdv -> MS ; -- this wants to fly
|
ModDemV : VV -> V -> DNP -> [DAdv] -> MS ; -- this wants to fly
|
||||||
ModDemV2 : VV -> V2 -> DNP -> DNP -> DAdv -> MS ; -- this wants to take that
|
ModDemV2 : VV -> V2 -> DNP -> DNP -> [DAdv] -> MS ; -- this wants to take that
|
||||||
|
|
||||||
ImpDemV : V -> DAdv -> MImp ; -- fly (here)
|
ImpDemV : V -> [DAdv] -> MImp ; -- fly (here)
|
||||||
ImpDemV2 : V2 -> DNP -> DAdv -> MImp ; -- take that
|
ImpDemV2 : V2 -> DNP -> [DAdv] -> MImp ; -- take that
|
||||||
|
|
||||||
QDemV : V -> IP -> DAdv -> MQS ; -- who flies (here)
|
QDemV : V -> IP -> [DAdv] -> MQS ; -- who flies (here)
|
||||||
QDemV2 : V2 -> IP -> DNP -> DAdv -> MQS ; -- who takes that
|
QDemV2 : V2 -> IP -> DNP -> [DAdv] -> MQS ; -- who takes that
|
||||||
QDemSlashV2 : V2 -> DNP -> IP -> DAdv -> MQS ; -- whom does that take
|
QDemSlashV2 : V2 -> DNP -> IP -> [DAdv] -> MQS ; -- whom does that take
|
||||||
QModDemV : VV -> V -> IP -> DAdv -> MQS ; -- who wants to fly (here)
|
QModDemV : VV -> V -> IP -> [DAdv] -> MQS ; -- who wants to fly (here)
|
||||||
QModDemV2 : VV -> V2 -> IP -> DNP -> DAdv -> MQS ; -- who wants to take that
|
QModDemV2 : VV -> V2 -> IP -> DNP -> [DAdv] -> MQS ; -- who wants to take that
|
||||||
QModDemSlashV2 : VV -> V2 -> DNP -> IP -> DAdv -> MQS ; -- whom does that want to take
|
QModDemSlashV2 : VV -> V2 -> DNP -> IP -> [DAdv] -> MQS ; -- whom does that want to take
|
||||||
|
|
||||||
this_DNP : Point -> DNP ; -- this
|
this_DNP : Point -> DNP ; -- this
|
||||||
that_DNP : Point -> DNP ; -- that
|
that_DNP : Point -> DNP ; -- that
|
||||||
thisDet_DNP : Point -> CN -> DNP ; -- this car
|
thisDet_DNP : Point -> CN -> DNP ; -- this car
|
||||||
thatDet_DNP : Point -> CN -> DNP ; -- that car
|
thatDet_DNP : Point -> CN -> DNP ; -- that car
|
||||||
|
|
||||||
here_DAdv : Point -> DAdv -> DAdv ; -- here
|
here_DAdv : Point -> DAdv ; -- here
|
||||||
here7from_DAdv : Point -> DAdv -> DAdv ; -- from here
|
here7from_DAdv : Point -> DAdv ; -- from here
|
||||||
here7to_DAdv : Point -> DAdv -> DAdv ; -- to here
|
here7to_DAdv : Point -> DAdv ; -- to here
|
||||||
NoDAdv : DAdv ;
|
|
||||||
|
|
||||||
|
PrepDNP : Prep -> DNP -> DAdv ;
|
||||||
|
|
||||||
|
-- to test
|
||||||
|
|
||||||
|
point1, point2 : Point ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
|||||||
open Prelude, Resource, Basic, DemRes in {
|
open Prelude, Resource, Basic, DemRes in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
MS = MultiSentence ;
|
MS = MultiSentence ;
|
||||||
MQS = MultiQuestion ;
|
MQS = MultiQuestion ;
|
||||||
MImp = MultiImperative ;
|
MImp = MultiImperative ;
|
||||||
DNP = Demonstrative ;
|
DNP = Demonstrative ;
|
||||||
DAdv = DemAdverb ;
|
DAdv = DemAdverb ;
|
||||||
Point = Pointing ;
|
[DAdv] = DemAdverb ;
|
||||||
|
Point = Pointing ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
MkPoint s = {s5 = s.s} ;
|
MkPoint s = {s5 = s.s} ;
|
||||||
@@ -46,10 +47,16 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
|||||||
thisDet_DNP p cn = DetNP this_Det cn ** p ;
|
thisDet_DNP p cn = DetNP this_Det cn ** p ;
|
||||||
thatDet_DNP p cn = DetNP that_Det cn ** p ;
|
thatDet_DNP p cn = DetNP that_Det cn ** p ;
|
||||||
|
|
||||||
here_DAdv p = addDAdv here_Adv p ;
|
here_DAdv p = mkDAdv here_Adv p ;
|
||||||
here7from_DAdv p = addDAdv here7from_Adv p ;
|
here7from_DAdv p = mkDAdv here7from_Adv p ;
|
||||||
here7to_DAdv p = addDAdv here7to_Adv p ;
|
here7to_DAdv p = mkDAdv here7to_Adv p ;
|
||||||
|
|
||||||
NoDAdv = {s,s5 = [] ; lock_Adv = <>} ;
|
BaseDAdv = {s,s5 = [] ; lock_Adv = <>} ;
|
||||||
|
ConsDAdv a as = {s = a.s ++ as.s ; s5 = a.s5 ++ as.s5 ; lock_Adv = <>} ;
|
||||||
|
|
||||||
|
PrepDNP p np = mkDAdv (AdvPP (PrepNP p np)) np ;
|
||||||
|
|
||||||
|
point1 = {s5 = "p1"} ;
|
||||||
|
point2 = {s5 = "p2"} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ abstract Multimodal =
|
|||||||
-- Interface to $Demonstrative$.
|
-- Interface to $Demonstrative$.
|
||||||
|
|
||||||
DemNP : NP -> DNP ;
|
DemNP : NP -> DNP ;
|
||||||
DemAdv : Adv -> DAdv -> DAdv ;
|
DemAdv : Adv -> DAdv ;
|
||||||
SentMS : Pol -> MS -> Phr ;
|
SentMS : Pol -> MS -> Phr ;
|
||||||
QuestMS : Pol -> MS -> Phr ;
|
QuestMS : Pol -> MS -> Phr ;
|
||||||
QuestMQS : Pol -> MQS -> Phr ;
|
QuestMQS : Pol -> MQS -> Phr ;
|
||||||
@@ -28,13 +28,3 @@ abstract Multimodal =
|
|||||||
AdvTime : Time -> Adv ;
|
AdvTime : Time -> Adv ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{-
|
|
||||||
> p -cat=Phr "I go from here to here ; foo bar"
|
|
||||||
SentMS (DemV go_V (DemNP i_NP)
|
|
||||||
(here7from_DAdv (MkPoint "foo") (here7to_DAdv (MkPoint "bar") NoDAdv)))
|
|
||||||
|
|
||||||
> p -cat=Phr "which cars go from here to here ; foo bar"
|
|
||||||
QuestMQ (QDemV go_V (IDetCN which8many_IDet (UseN car_N))
|
|
||||||
(here7from_DAdv (MkPoint "foo") (here7to_DAdv (MkPoint "bar") NoDAdv)))
|
|
||||||
-}
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ incomplete concrete MultimodalI of Multimodal =
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
DemNP np = np ** {s5 = [] ; lock_NP = <>} ;
|
DemNP np = np ** {s5 = [] ; lock_NP = <>} ;
|
||||||
DemAdv adv = addDAdv (adv ** {lock_Adv = <>}) {s5 = []} ;
|
DemAdv adv = mkDAdv (adv ** {lock_Adv = <>}) {s5 = []} ;
|
||||||
SentMS p ms = {s = p.s ++ ms.s ! MInd (p.p) ++ ";" ++ ms.s5} ;
|
SentMS p ms = {s = p.s ++ ms.s ! MInd (p.p) ++ ";" ++ ms.s5} ;
|
||||||
QuestMS p ms = {s = p.s ++ ms.s ! MQuest (p.p) ++ ";" ++ ms.s5} ;
|
QuestMS p ms = {s = p.s ++ ms.s ! MQuest (p.p) ++ ";" ++ ms.s5} ;
|
||||||
QuestMQS p ms = {s = p.s ++ ms.s ! p.p ++ ";" ++ ms.s5} ;
|
QuestMQS p ms = {s = p.s ++ ms.s ! p.p ++ ";" ++ ms.s5} ;
|
||||||
|
|||||||
9
resource/french/DemResFre.gf
Normal file
9
resource/french/DemResFre.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
instance DemResFre of DemRes = open Prelude, ResourceFre, SyntaxFre in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
msS : S -> Str = \x -> x.s ! Ind ;
|
||||||
|
msQS : QS -> Str = \x -> x.s ! DirQ ;
|
||||||
|
msImp : Imp -> Str = \x -> x.s ! Masc ! Sg ;
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
7
resource/french/DemonstrativeFre.gf
Normal file
7
resource/french/DemonstrativeFre.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../abstract:../romance:../../prelude
|
||||||
|
|
||||||
|
concrete DemonstrativeFre of Demonstrative =
|
||||||
|
CategoriesFre ** DemonstrativeI with
|
||||||
|
(Resource = ResourceFre),
|
||||||
|
(Basic = BasicFre),
|
||||||
|
(DemRes = DemResFre) ;
|
||||||
8
resource/french/MultimodalFre.gf
Normal file
8
resource/french/MultimodalFre.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--# -path=.:../abstract:../romance:../../prelude
|
||||||
|
|
||||||
|
concrete MultimodalFre of Multimodal =
|
||||||
|
RulesFre, StructuralFre, BasicFre, TimeFre, DemonstrativeFre ** MultimodalI with
|
||||||
|
(Resource = ResourceFre),
|
||||||
|
(Basic = BasicFre),
|
||||||
|
(Lang = LangFre),
|
||||||
|
(DemRes = DemResFre) ;
|
||||||
Reference in New Issue
Block a user