forked from GitHub/gf-core
trams with mm library
This commit is contained in:
@@ -47,8 +47,8 @@ interface DemRes = open Prelude, Resource in {
|
||||
Demonstrative : Type = mkDemType NP ;
|
||||
DemAdverb : Type = mkDemType Adv ;
|
||||
|
||||
addDAdv : Adv -> Pointing -> DemAdverb -> DemAdverb = \a,p,d ->
|
||||
{s = a.s ++ d.s ; s5 = p.s5 ++ d.s5 ; lock_Adv = a.lock_Adv} ;
|
||||
mkDAdv : Adv -> Pointing -> DemAdverb = \a,p ->
|
||||
a ** p ** {lock_Adv = a.lock_Adv} ;
|
||||
|
||||
param
|
||||
MSForm = MInd Bool | MQuest Bool ;
|
||||
|
||||
@@ -1,39 +1,44 @@
|
||||
abstract Demonstrative = Categories ** {
|
||||
|
||||
cat
|
||||
MS ; -- multimodal sentence or question
|
||||
MQS ; -- multimodal wh question
|
||||
MImp ; -- multimodal imperative
|
||||
DNP ; -- demonstrative noun phrase
|
||||
DAdv ; -- demonstrative adverbial
|
||||
Point ; -- pointing gesture
|
||||
MS ; -- multimodal sentence or question
|
||||
MQS ; -- multimodal wh question
|
||||
MImp ; -- multimodal imperative
|
||||
DNP ; -- demonstrative noun phrase
|
||||
DAdv ; -- demonstrative adverbial
|
||||
[DAdv] ; -- list of demonstrative adverbials
|
||||
Point ; -- pointing gesture
|
||||
|
||||
fun
|
||||
MkPoint : String -> Point ;
|
||||
|
||||
DemV : V -> DNP -> DAdv -> MS ; -- this flies (here)
|
||||
DemV2 : V2 -> DNP -> DNP -> DAdv -> MS ; -- this takes that
|
||||
ModDemV : VV -> V -> DNP -> DAdv -> MS ; -- this wants to fly
|
||||
ModDemV2 : VV -> V2 -> DNP -> DNP -> DAdv -> MS ; -- this wants to take that
|
||||
DemV : V -> DNP -> [DAdv] -> MS ; -- this flies (here)
|
||||
DemV2 : V2 -> DNP -> DNP -> [DAdv] -> MS ; -- this takes that
|
||||
ModDemV : VV -> V -> DNP -> [DAdv] -> MS ; -- this wants to fly
|
||||
ModDemV2 : VV -> V2 -> DNP -> DNP -> [DAdv] -> MS ; -- this wants to take that
|
||||
|
||||
ImpDemV : V -> DAdv -> MImp ; -- fly (here)
|
||||
ImpDemV2 : V2 -> DNP -> DAdv -> MImp ; -- take that
|
||||
ImpDemV : V -> [DAdv] -> MImp ; -- fly (here)
|
||||
ImpDemV2 : V2 -> DNP -> [DAdv] -> MImp ; -- take that
|
||||
|
||||
QDemV : V -> IP -> DAdv -> MQS ; -- who flies (here)
|
||||
QDemV2 : V2 -> IP -> DNP -> DAdv -> MQS ; -- who takes that
|
||||
QDemSlashV2 : V2 -> DNP -> IP -> DAdv -> MQS ; -- whom does that take
|
||||
QModDemV : VV -> V -> IP -> DAdv -> MQS ; -- who wants to fly (here)
|
||||
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
|
||||
QDemV : V -> IP -> [DAdv] -> MQS ; -- who flies (here)
|
||||
QDemV2 : V2 -> IP -> DNP -> [DAdv] -> MQS ; -- who takes that
|
||||
QDemSlashV2 : V2 -> DNP -> IP -> [DAdv] -> MQS ; -- whom does that take
|
||||
QModDemV : VV -> V -> IP -> [DAdv] -> MQS ; -- who wants to fly (here)
|
||||
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
|
||||
|
||||
this_DNP : Point -> DNP ; -- this
|
||||
that_DNP : Point -> DNP ; -- that
|
||||
thisDet_DNP : Point -> CN -> DNP ; -- this car
|
||||
thatDet_DNP : Point -> CN -> DNP ; -- that car
|
||||
|
||||
here_DAdv : Point -> DAdv -> DAdv ; -- here
|
||||
here7from_DAdv : Point -> DAdv -> DAdv ; -- from here
|
||||
here7to_DAdv : Point -> DAdv -> DAdv ; -- to here
|
||||
NoDAdv : DAdv ;
|
||||
here_DAdv : Point -> DAdv ; -- here
|
||||
here7from_DAdv : Point -> DAdv ; -- from here
|
||||
here7to_DAdv : Point -> DAdv ; -- to here
|
||||
|
||||
PrepDNP : Prep -> DNP -> DAdv ;
|
||||
|
||||
-- to test
|
||||
|
||||
point1, point2 : Point ;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
||||
open Prelude, Resource, Basic, DemRes in {
|
||||
|
||||
lincat
|
||||
MS = MultiSentence ;
|
||||
MQS = MultiQuestion ;
|
||||
MImp = MultiImperative ;
|
||||
DNP = Demonstrative ;
|
||||
DAdv = DemAdverb ;
|
||||
Point = Pointing ;
|
||||
MS = MultiSentence ;
|
||||
MQS = MultiQuestion ;
|
||||
MImp = MultiImperative ;
|
||||
DNP = Demonstrative ;
|
||||
DAdv = DemAdverb ;
|
||||
[DAdv] = DemAdverb ;
|
||||
Point = Pointing ;
|
||||
|
||||
lin
|
||||
MkPoint s = {s5 = s.s} ;
|
||||
@@ -46,10 +47,16 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
||||
thisDet_DNP p cn = DetNP this_Det cn ** p ;
|
||||
thatDet_DNP p cn = DetNP that_Det cn ** p ;
|
||||
|
||||
here_DAdv p = addDAdv here_Adv p ;
|
||||
here7from_DAdv p = addDAdv here7from_Adv p ;
|
||||
here7to_DAdv p = addDAdv here7to_Adv p ;
|
||||
here_DAdv p = mkDAdv here_Adv p ;
|
||||
here7from_DAdv p = mkDAdv here7from_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$.
|
||||
|
||||
DemNP : NP -> DNP ;
|
||||
DemAdv : Adv -> DAdv -> DAdv ;
|
||||
DemAdv : Adv -> DAdv ;
|
||||
SentMS : Pol -> MS -> Phr ;
|
||||
QuestMS : Pol -> MS -> Phr ;
|
||||
QuestMQS : Pol -> MQS -> Phr ;
|
||||
@@ -28,13 +28,3 @@ abstract Multimodal =
|
||||
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
|
||||
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} ;
|
||||
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} ;
|
||||
|
||||
9
lib/resource/french/DemResFre.gf
Normal file
9
lib/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
lib/resource/french/DemonstrativeFre.gf
Normal file
7
lib/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
lib/resource/french/MultimodalFre.gf
Normal file
8
lib/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