diff --git a/lib/resource/abstract/DemRes.gf b/lib/resource/abstract/DemRes.gf index 725d84770..7aeb135b2 100644 --- a/lib/resource/abstract/DemRes.gf +++ b/lib/resource/abstract/DemRes.gf @@ -7,13 +7,19 @@ interface DemRes = open Prelude, Resource in { mkDemS : Cl -> DemAdverb -> Pointing -> MultiSentence = \cl,adv,p -> {s = table { - MInd => msS (UseCl (PosTP TPresent ASimul) (AdvCl cl adv)) ; - MQuest => msQS (UseQCl (PosTP TPresent ASimul) (QuestCl (AdvCl cl adv))) + MInd b => msS (UseCl (polar b) (AdvCl cl adv)) ; + MQuest b => msQS (UseQCl (polar b) (QuestCl (AdvCl cl adv))) } ; s5 = p.s5 ++ adv.s5 } ; + + polar : Bool -> TP = \b -> case b of { + True => PosTP TPresent ASimul ; + False => NegTP TPresent ASimul + } ; + mkDemQ : QCl -> DemAdverb -> Pointing -> MultiQuestion = \cl,adv,p -> - {s = msQS (UseQCl (PosTP TPresent ASimul) cl) ++ adv.s ; --- (AdvQCl cl adv)) ; + {s = \\b => msQS (UseQCl (polar b) cl) ++ adv.s ; --- (AdvQCl cl adv)) ; s5 = p.s5 ++ adv.s5 } ; @@ -27,15 +33,17 @@ interface DemRes = open Prelude, Resource in { mkDemType : Type -> Type = \t -> t ** Pointing ; - Demonstrative : Type = mkDemType NP ; - MultiSentence : Type = mkDemType {s : MSForm => Str} ; - MultiQuestion : Type = mkDemType SS ; - DemAdverb : Type = mkDemType Adv ; + MultiSentence : Type = mkDemType {s : MSForm => Str} ; + MultiQuestion : Type = mkDemType {s : Bool => Str} ; + MultiImperative : Type = mkDemType {s : Bool => Str} ; + + 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} ; param - MSForm = MInd | MQuest ; + MSForm = MInd Bool | MQuest Bool ; } diff --git a/lib/resource/abstract/Demonstrative.gf b/lib/resource/abstract/Demonstrative.gf index ce9703d11..1ec54f048 100644 --- a/lib/resource/abstract/Demonstrative.gf +++ b/lib/resource/abstract/Demonstrative.gf @@ -1,27 +1,35 @@ abstract Demonstrative = Categories ** { cat - MS ; - MQ ; - Dem ; - DAdv ; - Point ; + MS ; -- multimodal sentence or question + MQS ; -- multimodal wh question + MImp ; -- multimodal imperative + DNP ; -- demonstrative noun phrase + DAdv ; -- demonstrative adverbial + Point ; -- pointing gesture fun MkPoint : String -> Point ; - DemV : V -> Dem -> DAdv -> MS ; - DemV2 : V2 -> Dem -> Dem -> DAdv -> MS ; - ModDemV : VV -> V -> Dem -> DAdv -> MS ; - ModDemV2 : VV -> V2 -> Dem -> Dem -> DAdv -> MS ; + 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 - QDemV : V -> IP -> DAdv -> MQ ; - QDemV2 : V2 -> IP -> Dem -> DAdv -> MQ ; + ImpDemV : V -> DAdv -> MImp ; -- fly (here) + ImpDemV2 : V2 -> DNP -> DAdv -> MImp ; -- take that - this_Dem : Point -> Dem ; - that_Dem : Point -> Dem ; - thisDet_Dem : Point -> CN -> Dem ; - thatDet_Dem : Point -> CN -> Dem ; + 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 ; + that_DNP : Point -> DNP ; + thisDet_DNP : Point -> CN -> DNP ; + thatDet_DNP : Point -> CN -> DNP ; here_DAdv : Point -> DAdv -> DAdv ; here7from_DAdv : Point -> DAdv -> DAdv ; diff --git a/lib/resource/abstract/DemonstrativeI.gf b/lib/resource/abstract/DemonstrativeI.gf index 9a6134288..e11ce01b5 100644 --- a/lib/resource/abstract/DemonstrativeI.gf +++ b/lib/resource/abstract/DemonstrativeI.gf @@ -4,10 +4,11 @@ incomplete concrete DemonstrativeI of Demonstrative = open Prelude, Resource, Basic, DemRes in { lincat - MS = MultiSentence ; - MQ = MultiQuestion ; - Dem = Demonstrative ; - DAdv = DemAdverb ; + MS = MultiSentence ; + MQS = MultiQuestion ; + MImp = MultiImperative ; + DNP = Demonstrative ; + DAdv = DemAdverb ; Point = Pointing ; lin @@ -26,12 +27,13 @@ incomplete concrete DemonstrativeI of Demonstrative = mkDemQ (QPredV ip verb) adv noPointing ; QDemV2 verb ip ob adv = mkDemQ (QPredV2 ip verb ob) adv ob ; + QDemSlashV2 verb su ip adv = + mkDemQ (IntSlash ip (SlashV2 su verb)) adv su ; - - this_Dem p = this_NP ** p ; - that_Dem p = this_NP ** p ; - thisDet_Dem p cn = DetNP this_Det cn ** p ; - thatDet_Dem p cn = DetNP that_Det cn ** p ; + this_DNP p = this_NP ** p ; + that_DNP p = this_NP ** p ; + 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 ; diff --git a/lib/resource/abstract/Multimodal.gf b/lib/resource/abstract/Multimodal.gf index fccc9487b..df11e2482 100644 --- a/lib/resource/abstract/Multimodal.gf +++ b/lib/resource/abstract/Multimodal.gf @@ -15,11 +15,11 @@ abstract Multimodal = -- Interface to $Demonstrative$. - DemNP : NP -> Dem ; - DemAdv : Adv -> DAdv -> DAdv ; - SentMS : MS -> Phr ; - QuestMS : MS -> Phr ; - QuestMQ : MQ -> Phr ; + DemNP : NP -> DNP ; + DemAdv : Adv -> DAdv -> DAdv ; + SentMS : Pol -> MS -> Phr ; + QuestMS : Pol -> MS -> Phr ; + QuestMQS : Pol -> MQS -> Phr ; -- Mount $Time$. diff --git a/lib/resource/abstract/MultimodalI.gf b/lib/resource/abstract/MultimodalI.gf index 19ea7979d..f2906dd82 100644 --- a/lib/resource/abstract/MultimodalI.gf +++ b/lib/resource/abstract/MultimodalI.gf @@ -4,9 +4,9 @@ incomplete concrete MultimodalI of Multimodal = lin DemNP np = np ** {s5 = [] ; lock_NP = <>} ; DemAdv adv = addDAdv (adv ** {lock_Adv = <>}) {s5 = []} ; - SentMS ms = {s = ms.s ! MInd ++ ";" ++ ms.s5} ; - QuestMS ms = {s = ms.s ! MQuest ++ ";" ++ ms.s5} ; - QuestMQ ms = {s = ms.s ++ ";" ++ 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} ; + QuestMQS p ms = {s = p.s ++ ms.s ! p.p ++ ";" ++ ms.s5} ; AdvDate = AdvDate ; AdvTime = AdvTime ; diff --git a/lib/resource/scandinavian/TypesScand.gf b/lib/resource/scandinavian/TypesScand.gf index bf0aa01d8..3ed1c277f 100644 --- a/lib/resource/scandinavian/TypesScand.gf +++ b/lib/resource/scandinavian/TypesScand.gf @@ -129,7 +129,7 @@ oper oper PNm : Type = {s : Case => Str ; h1 : Gender} ; - Adv : Type = {s : Degree => Str} ; +--- Adv : Type = {s : Degree => Str} ; AdvInv : Type = {s : Str} ; Interj : Type = {s : Str} ; diff --git a/lib/resource/swedish/DemResSwe.gf b/lib/resource/swedish/DemResSwe.gf new file mode 100644 index 000000000..5c9eb1eca --- /dev/null +++ b/lib/resource/swedish/DemResSwe.gf @@ -0,0 +1,9 @@ +instance DemResSwe of DemRes = open Prelude, ResourceSwe, SyntaxSwe in { + + oper + msS : S -> Str = \x -> x.s ! Main ; + msQS : QS -> Str = \x -> x.s ! DirQ ; + msImp : Imp -> Str = \x -> x.s ! Sg ; + + +} ; diff --git a/lib/resource/swedish/DemonstrativeSwe.gf b/lib/resource/swedish/DemonstrativeSwe.gf new file mode 100644 index 000000000..7ffee53d4 --- /dev/null +++ b/lib/resource/swedish/DemonstrativeSwe.gf @@ -0,0 +1,7 @@ +--# -path=.:../abstract:../scandinavian:../../prelude + +concrete DemonstrativeSwe of Demonstrative = + CategoriesSwe ** DemonstrativeI with + (Resource = ResourceSwe), + (Basic = BasicSwe), + (DemRes = DemResSwe) ; diff --git a/lib/resource/swedish/MultimodalSwe.gf b/lib/resource/swedish/MultimodalSwe.gf new file mode 100644 index 000000000..aec609c48 --- /dev/null +++ b/lib/resource/swedish/MultimodalSwe.gf @@ -0,0 +1,8 @@ +--# -path=.:../abstract:../scandinavian:../../prelude + +concrete MultimodalSwe of Multimodal = + RulesSwe, StructuralSwe, BasicSwe, TimeSwe, DemonstrativeSwe ** MultimodalI with + (Resource = ResourceSwe), + (Basic = BasicSwe), + (Lang = LangSwe), + (DemRes = DemResSwe) ;