From 1834f005e4ac622404ebf6b4b2471d68f8cd56ff Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 7 Nov 2005 21:45:22 +0000 Subject: [PATCH] trams with mm library --- resource/abstract/DemRes.gf | 4 +-- resource/abstract/Demonstrative.gf | 49 ++++++++++++++++------------- resource/abstract/DemonstrativeI.gf | 27 ++++++++++------ resource/abstract/Multimodal.gf | 12 +------ resource/abstract/MultimodalI.gf | 2 +- resource/french/DemResFre.gf | 9 ++++++ resource/french/DemonstrativeFre.gf | 7 +++++ resource/french/MultimodalFre.gf | 8 +++++ 8 files changed, 72 insertions(+), 46 deletions(-) create mode 100644 resource/french/DemResFre.gf create mode 100644 resource/french/DemonstrativeFre.gf create mode 100644 resource/french/MultimodalFre.gf diff --git a/resource/abstract/DemRes.gf b/resource/abstract/DemRes.gf index add595ea6..7de00e17d 100644 --- a/resource/abstract/DemRes.gf +++ b/resource/abstract/DemRes.gf @@ -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 ; diff --git a/resource/abstract/Demonstrative.gf b/resource/abstract/Demonstrative.gf index 18c7d7893..157469ffa 100644 --- a/resource/abstract/Demonstrative.gf +++ b/resource/abstract/Demonstrative.gf @@ -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 ; } diff --git a/resource/abstract/DemonstrativeI.gf b/resource/abstract/DemonstrativeI.gf index 4dd6eff75..751d52346 100644 --- a/resource/abstract/DemonstrativeI.gf +++ b/resource/abstract/DemonstrativeI.gf @@ -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"} ; } diff --git a/resource/abstract/Multimodal.gf b/resource/abstract/Multimodal.gf index de25a4598..5fba52b67 100644 --- a/resource/abstract/Multimodal.gf +++ b/resource/abstract/Multimodal.gf @@ -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))) --} diff --git a/resource/abstract/MultimodalI.gf b/resource/abstract/MultimodalI.gf index fd10e01e2..1188e9012 100644 --- a/resource/abstract/MultimodalI.gf +++ b/resource/abstract/MultimodalI.gf @@ -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} ; diff --git a/resource/french/DemResFre.gf b/resource/french/DemResFre.gf new file mode 100644 index 000000000..b852fd6f1 --- /dev/null +++ b/resource/french/DemResFre.gf @@ -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 ; + + +} ; diff --git a/resource/french/DemonstrativeFre.gf b/resource/french/DemonstrativeFre.gf new file mode 100644 index 000000000..18b066cf8 --- /dev/null +++ b/resource/french/DemonstrativeFre.gf @@ -0,0 +1,7 @@ +--# -path=.:../abstract:../romance:../../prelude + +concrete DemonstrativeFre of Demonstrative = + CategoriesFre ** DemonstrativeI with + (Resource = ResourceFre), + (Basic = BasicFre), + (DemRes = DemResFre) ; diff --git a/resource/french/MultimodalFre.gf b/resource/french/MultimodalFre.gf new file mode 100644 index 000000000..cd07cbbfb --- /dev/null +++ b/resource/french/MultimodalFre.gf @@ -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) ;