forked from GitHub/gf-core
multi for Swe
This commit is contained in:
@@ -7,13 +7,19 @@ interface DemRes = open Prelude, Resource in {
|
|||||||
|
|
||||||
mkDemS : Cl -> DemAdverb -> Pointing -> MultiSentence = \cl,adv,p ->
|
mkDemS : Cl -> DemAdverb -> Pointing -> MultiSentence = \cl,adv,p ->
|
||||||
{s = table {
|
{s = table {
|
||||||
MInd => msS (UseCl (PosTP TPresent ASimul) (AdvCl cl adv)) ;
|
MInd b => msS (UseCl (polar b) (AdvCl cl adv)) ;
|
||||||
MQuest => msQS (UseQCl (PosTP TPresent ASimul) (QuestCl (AdvCl cl adv)))
|
MQuest b => msQS (UseQCl (polar b) (QuestCl (AdvCl cl adv)))
|
||||||
} ;
|
} ;
|
||||||
s5 = p.s5 ++ adv.s5
|
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 ->
|
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
|
s5 = p.s5 ++ adv.s5
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -27,15 +33,17 @@ interface DemRes = open Prelude, Resource in {
|
|||||||
|
|
||||||
mkDemType : Type -> Type = \t -> t ** Pointing ;
|
mkDemType : Type -> Type = \t -> t ** Pointing ;
|
||||||
|
|
||||||
Demonstrative : Type = mkDemType NP ;
|
MultiSentence : Type = mkDemType {s : MSForm => Str} ;
|
||||||
MultiSentence : Type = mkDemType {s : MSForm => Str} ;
|
MultiQuestion : Type = mkDemType {s : Bool => Str} ;
|
||||||
MultiQuestion : Type = mkDemType SS ;
|
MultiImperative : Type = mkDemType {s : Bool => Str} ;
|
||||||
DemAdverb : Type = mkDemType Adv ;
|
|
||||||
|
Demonstrative : Type = mkDemType NP ;
|
||||||
|
DemAdverb : Type = mkDemType Adv ;
|
||||||
|
|
||||||
addDAdv : Adv -> Pointing -> DemAdverb -> DemAdverb = \a,p,d ->
|
addDAdv : Adv -> Pointing -> DemAdverb -> DemAdverb = \a,p,d ->
|
||||||
{s = a.s ++ d.s ; s5 = p.s5 ++ d.s5 ; lock_Adv = a.lock_Adv} ;
|
{s = a.s ++ d.s ; s5 = p.s5 ++ d.s5 ; lock_Adv = a.lock_Adv} ;
|
||||||
|
|
||||||
param
|
param
|
||||||
MSForm = MInd | MQuest ;
|
MSForm = MInd Bool | MQuest Bool ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,35 @@
|
|||||||
abstract Demonstrative = Categories ** {
|
abstract Demonstrative = Categories ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
MS ;
|
MS ; -- multimodal sentence or question
|
||||||
MQ ;
|
MQS ; -- multimodal wh question
|
||||||
Dem ;
|
MImp ; -- multimodal imperative
|
||||||
DAdv ;
|
DNP ; -- demonstrative noun phrase
|
||||||
Point ;
|
DAdv ; -- demonstrative adverbial
|
||||||
|
Point ; -- pointing gesture
|
||||||
|
|
||||||
fun
|
fun
|
||||||
MkPoint : String -> Point ;
|
MkPoint : String -> Point ;
|
||||||
|
|
||||||
DemV : V -> Dem -> DAdv -> MS ;
|
DemV : V -> DNP -> DAdv -> MS ; -- this flies (here)
|
||||||
DemV2 : V2 -> Dem -> Dem -> DAdv -> MS ;
|
DemV2 : V2 -> DNP -> DNP -> DAdv -> MS ; -- this takes that
|
||||||
ModDemV : VV -> V -> Dem -> DAdv -> MS ;
|
ModDemV : VV -> V -> DNP -> DAdv -> MS ; -- this wants to fly
|
||||||
ModDemV2 : VV -> V2 -> Dem -> Dem -> DAdv -> MS ;
|
ModDemV2 : VV -> V2 -> DNP -> DNP -> DAdv -> MS ; -- this wants to take that
|
||||||
|
|
||||||
QDemV : V -> IP -> DAdv -> MQ ;
|
ImpDemV : V -> DAdv -> MImp ; -- fly (here)
|
||||||
QDemV2 : V2 -> IP -> Dem -> DAdv -> MQ ;
|
ImpDemV2 : V2 -> DNP -> DAdv -> MImp ; -- take that
|
||||||
|
|
||||||
this_Dem : Point -> Dem ;
|
QDemV : V -> IP -> DAdv -> MQS ; -- who flies (here)
|
||||||
that_Dem : Point -> Dem ;
|
QDemV2 : V2 -> IP -> DNP -> DAdv -> MQS ; -- who takes that
|
||||||
thisDet_Dem : Point -> CN -> Dem ;
|
QDemSlashV2 : V2 -> DNP -> IP -> DAdv -> MQS ; -- whom does that take
|
||||||
thatDet_Dem : Point -> CN -> Dem ;
|
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 ;
|
here_DAdv : Point -> DAdv -> DAdv ;
|
||||||
here7from_DAdv : Point -> DAdv -> DAdv ;
|
here7from_DAdv : Point -> DAdv -> DAdv ;
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
|||||||
open Prelude, Resource, Basic, DemRes in {
|
open Prelude, Resource, Basic, DemRes in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
MS = MultiSentence ;
|
MS = MultiSentence ;
|
||||||
MQ = MultiQuestion ;
|
MQS = MultiQuestion ;
|
||||||
Dem = Demonstrative ;
|
MImp = MultiImperative ;
|
||||||
DAdv = DemAdverb ;
|
DNP = Demonstrative ;
|
||||||
|
DAdv = DemAdverb ;
|
||||||
Point = Pointing ;
|
Point = Pointing ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -26,12 +27,13 @@ incomplete concrete DemonstrativeI of Demonstrative =
|
|||||||
mkDemQ (QPredV ip verb) adv noPointing ;
|
mkDemQ (QPredV ip verb) adv noPointing ;
|
||||||
QDemV2 verb ip ob adv =
|
QDemV2 verb ip ob adv =
|
||||||
mkDemQ (QPredV2 ip verb ob) adv ob ;
|
mkDemQ (QPredV2 ip verb ob) adv ob ;
|
||||||
|
QDemSlashV2 verb su ip adv =
|
||||||
|
mkDemQ (IntSlash ip (SlashV2 su verb)) adv su ;
|
||||||
|
|
||||||
|
this_DNP p = this_NP ** p ;
|
||||||
this_Dem p = this_NP ** p ;
|
that_DNP p = this_NP ** p ;
|
||||||
that_Dem p = this_NP ** p ;
|
thisDet_DNP p cn = DetNP this_Det cn ** p ;
|
||||||
thisDet_Dem p cn = DetNP this_Det cn ** p ;
|
thatDet_DNP p cn = DetNP that_Det cn ** p ;
|
||||||
thatDet_Dem p cn = DetNP that_Det cn ** p ;
|
|
||||||
|
|
||||||
here_DAdv p = addDAdv here_Adv p ;
|
here_DAdv p = addDAdv here_Adv p ;
|
||||||
here7from_DAdv p = addDAdv here7from_Adv p ;
|
here7from_DAdv p = addDAdv here7from_Adv p ;
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ abstract Multimodal =
|
|||||||
|
|
||||||
-- Interface to $Demonstrative$.
|
-- Interface to $Demonstrative$.
|
||||||
|
|
||||||
DemNP : NP -> Dem ;
|
DemNP : NP -> DNP ;
|
||||||
DemAdv : Adv -> DAdv -> DAdv ;
|
DemAdv : Adv -> DAdv -> DAdv ;
|
||||||
SentMS : MS -> Phr ;
|
SentMS : Pol -> MS -> Phr ;
|
||||||
QuestMS : MS -> Phr ;
|
QuestMS : Pol -> MS -> Phr ;
|
||||||
QuestMQ : MQ -> Phr ;
|
QuestMQS : Pol -> MQS -> Phr ;
|
||||||
|
|
||||||
-- Mount $Time$.
|
-- Mount $Time$.
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ 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 = addDAdv (adv ** {lock_Adv = <>}) {s5 = []} ;
|
||||||
SentMS ms = {s = ms.s ! MInd ++ ";" ++ ms.s5} ;
|
SentMS p ms = {s = p.s ++ ms.s ! MInd (p.p) ++ ";" ++ ms.s5} ;
|
||||||
QuestMS ms = {s = ms.s ! MQuest ++ ";" ++ ms.s5} ;
|
QuestMS p ms = {s = p.s ++ ms.s ! MQuest (p.p) ++ ";" ++ ms.s5} ;
|
||||||
QuestMQ ms = {s = ms.s ++ ";" ++ ms.s5} ;
|
QuestMQS p ms = {s = p.s ++ ms.s ! p.p ++ ";" ++ ms.s5} ;
|
||||||
|
|
||||||
AdvDate = AdvDate ;
|
AdvDate = AdvDate ;
|
||||||
AdvTime = AdvTime ;
|
AdvTime = AdvTime ;
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ oper
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
PNm : Type = {s : Case => Str ; h1 : Gender} ;
|
PNm : Type = {s : Case => Str ; h1 : Gender} ;
|
||||||
Adv : Type = {s : Degree => Str} ;
|
--- Adv : Type = {s : Degree => Str} ;
|
||||||
AdvInv : Type = {s : Str} ;
|
AdvInv : Type = {s : Str} ;
|
||||||
Interj : Type = {s : Str} ;
|
Interj : Type = {s : Str} ;
|
||||||
|
|
||||||
|
|||||||
9
lib/resource/swedish/DemResSwe.gf
Normal file
9
lib/resource/swedish/DemResSwe.gf
Normal file
@@ -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 ;
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
7
lib/resource/swedish/DemonstrativeSwe.gf
Normal file
7
lib/resource/swedish/DemonstrativeSwe.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../abstract:../scandinavian:../../prelude
|
||||||
|
|
||||||
|
concrete DemonstrativeSwe of Demonstrative =
|
||||||
|
CategoriesSwe ** DemonstrativeI with
|
||||||
|
(Resource = ResourceSwe),
|
||||||
|
(Basic = BasicSwe),
|
||||||
|
(DemRes = DemResSwe) ;
|
||||||
8
lib/resource/swedish/MultimodalSwe.gf
Normal file
8
lib/resource/swedish/MultimodalSwe.gf
Normal file
@@ -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) ;
|
||||||
Reference in New Issue
Block a user