mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
resource lib name changed
This commit is contained in:
39
lib/resource/multimodal/Multi.gf
Normal file
39
lib/resource/multimodal/Multi.gf
Normal file
@@ -0,0 +1,39 @@
|
||||
--1 Multimodal additions to the resource grammar library
|
||||
|
||||
abstract Multi = Lang ** {
|
||||
|
||||
cat
|
||||
|
||||
-- Entrypoint for speech recognition - suppresses clicks.
|
||||
|
||||
Speech ;
|
||||
|
||||
-- The entrypoint to sequencialized multimodal input is $Phr$.
|
||||
|
||||
-- The pointing gesture (click) type.
|
||||
|
||||
Point ;
|
||||
|
||||
fun
|
||||
|
||||
-- The top function to send an utterance to speech recognizer.
|
||||
|
||||
SpeechUtt : PConj -> Utt -> Voc -> Speech ;
|
||||
|
||||
-- Demonstratives.
|
||||
|
||||
this8point_NP : Point -> NP ;
|
||||
that8point_NP : Point -> NP ;
|
||||
these8point_NP : Point -> NP ;
|
||||
those8point_NP : Point -> NP ;
|
||||
here8point_Adv : Point -> Adv ;
|
||||
here7to8point_Adv : Point -> Adv ;
|
||||
here7from8point_Adv : Point -> Adv ;
|
||||
this8point_Quant : Point -> Quant ;
|
||||
that8point_Quant : Point -> Quant ;
|
||||
|
||||
-- Building points from strings.
|
||||
|
||||
MkPoint : String -> Point ;
|
||||
|
||||
}
|
||||
27
lib/resource/multimodal/MultiEng.gf
Normal file
27
lib/resource/multimodal/MultiEng.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete MultiEng of Multi =
|
||||
LangEng - [
|
||||
NP, Adv, Det, Comp, VP, Cl, QCl, S, SC, QS, Imp, Utt, -- Cat
|
||||
QuantSg, QuantPl, Quant,
|
||||
---- Slash, RC, AP, CN missing
|
||||
DetCN, UsePN, UsePron, PredetNP, PPartNP, AdvNP, -- Noun
|
||||
DetSg, DetPl, SgQuant, PlQuant, PossPron, DefArt, IndefArt, MassDet,
|
||||
PositAdvAdj, PrepNP, ComparAdvAdj, ComparAdvAdjS, AdAdv, SubjS, AdvSC, AdnCAdv,
|
||||
UseV, ComplV2, ComplV3, ComplVV, ComplVS, ComplVQ, ComplVA, ComplV2A,
|
||||
ReflV2, UseComp, PassV2, AdvVP, AdVVP, CompAP, CompNP, CompAdv,
|
||||
PredVP, PredSCVP, ImpVP, EmbedS, EmbedQS, EmbedVP, UseQCl, UseCl,
|
||||
QuestCl, QuestVP, QuestIAdv, QuestIComp, QuestSlash,
|
||||
PhrUtt, UttS, UttQS, UttImpSg, UttImpPl, UttNP, UttAdv, UttVP,
|
||||
UttIAdv, UttIP,
|
||||
ConjS, ConjNP, ConjAdv, DConjS, DConjNP, DConjAdv,
|
||||
everybody_NP, everything_NP, somebody_NP, something_NP, that_NP, these_NP,
|
||||
this_NP, those_NP, one_Quant, that_Quant, this_Quant,
|
||||
everywhere_Adv, here_Adv, here7to_Adv, here7from_Adv,
|
||||
somewhere_Adv, there_Adv, there7to_Adv, there7from_Adv,
|
||||
every_Det, few_Det, many_Det, much_Det, someSg_Det, somePl_Det,
|
||||
ImpersCl, GenericCl, ExistNP, ExistIP, ProgrVP, ImpPl1,
|
||||
already_Adv, far_Adv, now_Adv
|
||||
]
|
||||
** MultiI with
|
||||
(Lang = LangEng) ;
|
||||
27
lib/resource/multimodal/MultiFin.gf
Normal file
27
lib/resource/multimodal/MultiFin.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete MultiFin of Multi =
|
||||
LangFin - [
|
||||
NP, Adv, Det, Comp, VP, Cl, QCl, S, SC, QS, Imp, Utt, -- Cat
|
||||
QuantSg, QuantPl, Quant,
|
||||
---- Slash, RC, AP, CN missing
|
||||
DetCN, UsePN, UsePron, PredetNP, PPartNP, AdvNP, -- Noun
|
||||
DetSg, DetPl, SgQuant, PlQuant, PossPron, DefArt, IndefArt, MassDet,
|
||||
PositAdvAdj, PrepNP, ComparAdvAdj, ComparAdvAdjS, AdAdv, SubjS, AdvSC, AdnCAdv,
|
||||
UseV, ComplV2, ComplV3, ComplVV, ComplVS, ComplVQ, ComplVA, ComplV2A,
|
||||
ReflV2, UseComp, PassV2, AdvVP, AdVVP, CompAP, CompNP, CompAdv,
|
||||
PredVP, PredSCVP, ImpVP, EmbedS, EmbedQS, EmbedVP, UseQCl, UseCl,
|
||||
QuestCl, QuestVP, QuestIAdv, QuestIComp, QuestSlash,
|
||||
PhrUtt, UttS, UttQS, UttImpSg, UttImpPl, UttNP, UttAdv, UttVP,
|
||||
UttIAdv, UttIP,
|
||||
ConjS, ConjNP, ConjAdv, DConjS, DConjNP, DConjAdv,
|
||||
everybody_NP, everything_NP, somebody_NP, something_NP, that_NP, these_NP,
|
||||
this_NP, those_NP, one_Quant, that_Quant, this_Quant,
|
||||
everywhere_Adv, here_Adv, here7to_Adv, here7from_Adv,
|
||||
somewhere_Adv, there_Adv, there7to_Adv, there7from_Adv,
|
||||
every_Det, few_Det, many_Det, much_Det, someSg_Det, somePl_Det,
|
||||
ImpersCl, GenericCl, ExistNP, ExistIP, ProgrVP, ImpPl1,
|
||||
already_Adv, far_Adv, now_Adv
|
||||
]
|
||||
** MultiI with
|
||||
(Lang = LangFin) ;
|
||||
27
lib/resource/multimodal/MultiFre.gf
Normal file
27
lib/resource/multimodal/MultiFre.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete MultiFre of Multi =
|
||||
LangFre - [
|
||||
NP, Adv, Det, Comp, VP, Cl, QCl, S, SC, QS, Imp, Utt, -- Cat
|
||||
QuantSg, QuantPl, Quant,
|
||||
---- Slash, RC, AP, CN missing
|
||||
DetCN, UsePN, UsePron, PredetNP, PPartNP, AdvNP, -- Noun
|
||||
DetSg, DetPl, SgQuant, PlQuant, PossPron, DefArt, IndefArt, MassDet,
|
||||
PositAdvAdj, PrepNP, ComparAdvAdj, ComparAdvAdjS, AdAdv, SubjS, AdvSC, AdnCAdv,
|
||||
UseV, ComplV2, ComplV3, ComplVV, ComplVS, ComplVQ, ComplVA, ComplV2A,
|
||||
ReflV2, UseComp, PassV2, AdvVP, AdVVP, CompAP, CompNP, CompAdv,
|
||||
PredVP, PredSCVP, ImpVP, EmbedS, EmbedQS, EmbedVP, UseQCl, UseCl,
|
||||
QuestCl, QuestVP, QuestIAdv, QuestIComp, QuestSlash,
|
||||
PhrUtt, UttS, UttQS, UttImpSg, UttImpPl, UttNP, UttAdv, UttVP,
|
||||
UttIAdv, UttIP,
|
||||
ConjS, ConjNP, ConjAdv, DConjS, DConjNP, DConjAdv,
|
||||
everybody_NP, everything_NP, somebody_NP, something_NP, that_NP, these_NP,
|
||||
this_NP, those_NP, one_Quant, that_Quant, this_Quant,
|
||||
everywhere_Adv, here_Adv, here7to_Adv, here7from_Adv,
|
||||
somewhere_Adv, there_Adv, there7to_Adv, there7from_Adv,
|
||||
every_Det, few_Det, many_Det, much_Det, someSg_Det, somePl_Det,
|
||||
ImpersCl, GenericCl, ExistNP, ExistIP, ProgrVP, ImpPl1,
|
||||
already_Adv, far_Adv, now_Adv
|
||||
]
|
||||
** MultiI with
|
||||
(Lang = LangFre) ;
|
||||
180
lib/resource/multimodal/MultiI.gf
Normal file
180
lib/resource/multimodal/MultiI.gf
Normal file
@@ -0,0 +1,180 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
incomplete concrete MultiI of Multi =
|
||||
Lang - [
|
||||
NP, Adv, VP, Cl, QCl, S, SC, QS, Imp, Utt, -- Cat
|
||||
DetCN, UsePN, UsePron, PredetNP, PPartNP, AdvNP, -- Noun
|
||||
PositAdvAdj, PrepNP, ComparAdvAdj, ComparAdvAdjS, AdAdv, SubjS, AdvSC, AdnCAdv,
|
||||
ComplV2, ComplV3, ComplVV,
|
||||
PredVP,
|
||||
UseCl,
|
||||
PhrUtt, UttS, UttQS, UttImpSg, UttImpPl, UttNP, UttAdv, UttVP
|
||||
]
|
||||
** open (Lang = Lang) in {
|
||||
|
||||
flags optimize = all_subs ;
|
||||
|
||||
lincat
|
||||
NP = Lang.NP ** {point : Str} ;
|
||||
Adv = Lang.Adv ** {point : Str} ;
|
||||
Det = Lang.Det ** {point : Str} ;
|
||||
Comp= Lang.Comp** {point : Str} ;
|
||||
VP = Lang.VP ** {point : Str} ;
|
||||
Cl = Lang.Cl ** {point : Str} ;
|
||||
QCl = Lang.QCl ** {point : Str} ;
|
||||
S = Lang.S ** {point : Str} ;
|
||||
SC = Lang.SC ** {point : Str} ;
|
||||
QS = Lang.QS ** {point : Str} ;
|
||||
Imp = Lang.Imp ** {point : Str} ;
|
||||
Utt = Lang.Utt ** {point : Str} ;
|
||||
Quant = Lang.Quant ** {point : Str} ;
|
||||
QuantSg = Lang.QuantSg ** {point : Str} ;
|
||||
QuantPl = Lang.QuantPl ** {point : Str} ;
|
||||
|
||||
Point = {point : Str} ;
|
||||
Speech = {s : Str} ;
|
||||
|
||||
lin
|
||||
DetCN det cn = Lang.DetCN det cn ** {point = det.point} ;
|
||||
UsePN pn = Lang.UsePN pn ** noPoint ;
|
||||
UsePron pn = Lang.UsePron pn ** noPoint ;
|
||||
PredetNP p np = Lang.PredetNP p np ** {point = np.point} ;
|
||||
PPartNP np v = Lang.PPartNP np v ** {point = np.point} ;
|
||||
AdvNP np adv = Lang.AdvNP np adv ** {point = np.point ++ adv.point} ;
|
||||
DetSg qu o = Lang.DetSg qu o ** {point = qu.point} ;
|
||||
DetPl qu n o = Lang.DetPl qu n o ** {point = qu.point} ;
|
||||
SgQuant qu = Lang.SgQuant qu ** {point = qu.point} ;
|
||||
PlQuant qu = Lang.PlQuant qu ** {point = qu.point} ;
|
||||
PossPron p = Lang.PossPron p ** noPoint ;
|
||||
DefArt = Lang.DefArt ** noPoint ;
|
||||
IndefArt = Lang.IndefArt ** noPoint ;
|
||||
MassDet = Lang.MassDet ** noPoint ;
|
||||
|
||||
PositAdvAdj a = Lang.PositAdvAdj a ** noPoint ;
|
||||
PrepNP p np = Lang.PrepNP p np ** {point = np.point} ;
|
||||
ComparAdvAdj ca a np = Lang.ComparAdvAdj ca a np ** {point = np.point} ;
|
||||
ComparAdvAdjS ca a s = Lang.ComparAdvAdjS ca a s ** {point = s.point} ;
|
||||
AdAdv ad a = Lang.AdAdv ad a ** {point = a.point} ;
|
||||
SubjS su s = Lang.SubjS su s ** {point = s.point} ;
|
||||
AdvSC sc = Lang.AdvSC sc ** {point = sc.point} ;
|
||||
|
||||
UseV v = Lang.UseV v ** noPoint ;
|
||||
ComplV2 v np = Lang.ComplV2 v np ** {point = np.point} ;
|
||||
ComplV3 v np p = Lang.ComplV3 v np p ** {point = np.point ++ p.point} ;
|
||||
ComplVV v vp = Lang.ComplVV v vp ** {point = vp.point} ;
|
||||
ComplVS v s = Lang.ComplVS v s ** {point = s.point} ;
|
||||
ComplVQ v s = Lang.ComplVQ v s ** {point = s.point} ;
|
||||
ComplVA v ap = Lang.ComplVA v ap ** noPoint ; ----
|
||||
ComplV2A v np ap = Lang.ComplV2A v np ap ** {point = np.point} ; ---- ap
|
||||
ReflV2 v = Lang.ReflV2 v ** noPoint ;
|
||||
UseComp c = Lang.UseComp c ** {point = c.point} ;
|
||||
PassV2 v = Lang.PassV2 v ** noPoint ;
|
||||
AdvVP vp ad = Lang.AdvVP vp ad ** {point = vp.point ++ ad.point} ;
|
||||
AdVVP ad vp = Lang.AdVVP ad vp ** {point = vp.point} ;
|
||||
CompAP v = Lang.CompAP v ** noPoint ;
|
||||
CompNP c = Lang.CompNP c ** {point = c.point} ;
|
||||
CompAdv c = Lang.CompAdv c ** {point = c.point} ;
|
||||
|
||||
PredVP np vp = Lang.PredVP np vp ** {point = np.point ++ vp.point} ;
|
||||
PredSCVP sc vp = Lang.PredSCVP sc vp ** {point = sc.point ++ vp.point} ;
|
||||
ImpVP vp = Lang.ImpVP vp ** {point = vp.point} ;
|
||||
EmbedS s = Lang.EmbedS s ** {point = s.point} ;
|
||||
EmbedQS s = Lang.EmbedQS s ** {point = s.point} ;
|
||||
EmbedVP s = Lang.EmbedVP s ** {point = s.point} ;
|
||||
UseCl t a p cl = Lang.UseCl t a p cl ** {point = cl.point} ;
|
||||
UseQCl t a p cl = Lang.UseQCl t a p cl ** {point = cl.point} ;
|
||||
|
||||
QuestCl cl = Lang.QuestCl cl ** {point = cl.point} ;
|
||||
QuestVP ip cl = Lang.QuestVP ip cl ** {point = cl.point} ;
|
||||
QuestIAdv ip cl = Lang.QuestIAdv ip cl ** {point = cl.point} ;
|
||||
QuestIComp ip cl = Lang.QuestIComp ip cl ** {point = cl.point} ;
|
||||
QuestSlash ip cl = Lang.QuestSlash ip cl ** noPoint ;
|
||||
|
||||
UttS s = Lang.UttS s ** {point = s.point} ;
|
||||
UttQS s = Lang.UttQS s ** {point = s.point} ;
|
||||
UttImpSg p s = Lang.UttImpSg p s ** {point = s.point} ;
|
||||
UttImpPl p s = Lang.UttImpPl p s ** {point = s.point} ;
|
||||
UttNP s = Lang.UttNP s ** {point = s.point} ;
|
||||
UttAdv s = Lang.UttAdv s ** {point = s.point} ;
|
||||
UttVP s = Lang.UttVP s ** {point = s.point} ;
|
||||
UttIP s = Lang.UttIP s ** noPoint ;
|
||||
UttIAdv s = Lang.UttIAdv s ** noPoint ;
|
||||
|
||||
---- to be completed with point
|
||||
ConjS c xs = Lang.ConjS c xs ** noPoint ;
|
||||
ConjNP c xs = Lang.ConjNP c xs ** noPoint ;
|
||||
ConjAdv c xs = Lang.ConjAdv c xs ** noPoint ;
|
||||
DConjS c xs = Lang.DConjS c xs ** noPoint ;
|
||||
DConjNP c xs = Lang.DConjNP c xs ** noPoint ;
|
||||
DConjAdv c xs = Lang.DConjAdv c xs ** noPoint ;
|
||||
|
||||
ImpersCl vp = Lang.ImpersCl vp ** {point = vp.point} ;
|
||||
GenericCl vp = Lang.GenericCl vp ** {point = vp.point} ;
|
||||
ExistNP np = Lang.ExistNP np ** {point = np.point} ;
|
||||
ExistIP ip = Lang.ExistIP ip ** noPoint ;
|
||||
ProgrVP vp = Lang.ProgrVP vp ** {point = vp.point} ;
|
||||
ImpPl1 vp = Lang.ImpPl1 vp ** {point = vp.point} ;
|
||||
|
||||
everybody_NP = Lang.everybody_NP ** noPoint ;
|
||||
everything_NP = Lang.everything_NP ** noPoint ;
|
||||
somebody_NP = Lang.somebody_NP ** noPoint ;
|
||||
something_NP = Lang.something_NP ** noPoint ;
|
||||
that_NP = Lang.that_NP ** noPoint ;
|
||||
these_NP = Lang.these_NP ** noPoint ;
|
||||
this_NP = Lang.this_NP ** noPoint ;
|
||||
those_NP = Lang.those_NP ** noPoint ;
|
||||
one_Quant = Lang.one_Quant ** noPoint ;
|
||||
that_Quant = Lang.that_Quant ** noPoint ;
|
||||
this_Quant = Lang.this_Quant ** noPoint ;
|
||||
|
||||
everywhere_Adv = Lang.everywhere_Adv ** noPoint ;
|
||||
here_Adv = Lang.here_Adv ** noPoint ;
|
||||
here7to_Adv = Lang.here7to_Adv ** noPoint ;
|
||||
here7from_Adv = Lang.here7from_Adv ** noPoint ;
|
||||
somewhere_Adv = Lang.somewhere_Adv ** noPoint ;
|
||||
there_Adv = Lang.there_Adv ** noPoint ;
|
||||
there7to_Adv = Lang.there7to_Adv ** noPoint ;
|
||||
there7from_Adv = Lang.there7from_Adv ** noPoint ;
|
||||
every_Det = Lang.every_Det ** noPoint ;
|
||||
few_Det = Lang.few_Det ** noPoint ;
|
||||
many_Det = Lang.many_Det ** noPoint ;
|
||||
much_Det = Lang.much_Det ** noPoint ;
|
||||
someSg_Det = Lang.someSg_Det ** noPoint ;
|
||||
somePl_Det = Lang.somePl_Det ** noPoint ;
|
||||
|
||||
already_Adv = Lang.already_Adv ** noPoint ;
|
||||
far_Adv = Lang.far_Adv ** noPoint ;
|
||||
now_Adv = Lang.now_Adv ** noPoint ;
|
||||
|
||||
|
||||
--2 New constructs
|
||||
|
||||
--3 interface to top level
|
||||
|
||||
PhrUtt pc utt voc = {
|
||||
s = Predef.toStr Phr (Lang.PhrUtt pc utt voc) ++ ";" ++ utt.point
|
||||
} ;
|
||||
|
||||
SpeechUtt pc utt voc = {
|
||||
s = Predef.toStr Phr (Lang.PhrUtt pc utt voc)
|
||||
} ;
|
||||
|
||||
--3 Demonstratives
|
||||
|
||||
this8point_NP p = Lang.this_NP ** p ;
|
||||
that8point_NP p = Lang.that_NP ** p ;
|
||||
these8point_NP p = Lang.these_NP ** p ;
|
||||
those8point_NP p = Lang.those_NP ** p ;
|
||||
here8point_Adv p = Lang.here_Adv ** p ;
|
||||
here7to8point_Adv p = Lang.here7to_Adv ** p ;
|
||||
here7from8point_Adv p = Lang.here7from_Adv ** p ;
|
||||
this8point_Quant p = Lang.this_Quant ** p ;
|
||||
that8point_Quant p = Lang.that_Quant ** p ;
|
||||
|
||||
|
||||
MkPoint s = {point = s.s} ;
|
||||
|
||||
oper
|
||||
noPoint = {point = []} ;
|
||||
|
||||
}
|
||||
27
lib/resource/multimodal/MultiSwe.gf
Normal file
27
lib/resource/multimodal/MultiSwe.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete MultiSwe of Multi =
|
||||
LangSwe - [
|
||||
NP, Adv, Det, Comp, VP, Cl, QCl, S, SC, QS, Imp, Utt, -- Cat
|
||||
QuantSg, QuantPl, Quant,
|
||||
---- Slash, RC, AP, CN missing
|
||||
DetCN, UsePN, UsePron, PredetNP, PPartNP, AdvNP, -- Noun
|
||||
DetSg, DetPl, SgQuant, PlQuant, PossPron, DefArt, IndefArt, MassDet,
|
||||
PositAdvAdj, PrepNP, ComparAdvAdj, ComparAdvAdjS, AdAdv, SubjS, AdvSC, AdnCAdv,
|
||||
UseV, ComplV2, ComplV3, ComplVV, ComplVS, ComplVQ, ComplVA, ComplV2A,
|
||||
ReflV2, UseComp, PassV2, AdvVP, AdVVP, CompAP, CompNP, CompAdv,
|
||||
PredVP, PredSCVP, ImpVP, EmbedS, EmbedQS, EmbedVP, UseQCl, UseCl,
|
||||
QuestCl, QuestVP, QuestIAdv, QuestIComp, QuestSlash,
|
||||
PhrUtt, UttS, UttQS, UttImpSg, UttImpPl, UttNP, UttAdv, UttVP,
|
||||
UttIAdv, UttIP,
|
||||
ConjS, ConjNP, ConjAdv, DConjS, DConjNP, DConjAdv,
|
||||
everybody_NP, everything_NP, somebody_NP, something_NP, that_NP, these_NP,
|
||||
this_NP, those_NP, one_Quant, that_Quant, this_Quant,
|
||||
everywhere_Adv, here_Adv, here7to_Adv, here7from_Adv,
|
||||
somewhere_Adv, there_Adv, there7to_Adv, there7from_Adv,
|
||||
every_Det, few_Det, many_Det, much_Det, someSg_Det, somePl_Det,
|
||||
ImpersCl, GenericCl, ExistNP, ExistIP, ProgrVP, ImpPl1,
|
||||
already_Adv, far_Adv, now_Adv
|
||||
]
|
||||
** MultiI with
|
||||
(Lang = LangSwe) ;
|
||||
31
lib/resource/multimodal/old/DemRes.gf
Normal file
31
lib/resource/multimodal/old/DemRes.gf
Normal file
@@ -0,0 +1,31 @@
|
||||
resource DemRes = open Prelude in {
|
||||
|
||||
oper
|
||||
|
||||
Point : Type =
|
||||
{point : Str} ;
|
||||
|
||||
point : Point -> Str = \p ->
|
||||
p.point ;
|
||||
|
||||
mkPoint : Str -> Point = \s ->
|
||||
{point = s} ;
|
||||
|
||||
noPoint : Point =
|
||||
mkPoint [] ;
|
||||
|
||||
concatPoint : (x,y : Point) -> Point = \x,y ->
|
||||
mkPoint (point x ++ point y) ;
|
||||
|
||||
-- A type is made demonstrative by adding $Point$.
|
||||
|
||||
Dem : Type -> Type = \t -> t ** Point ;
|
||||
|
||||
mkDem : (t : Type) -> t -> Point -> Dem t = \_,x,s ->
|
||||
x ** s ;
|
||||
|
||||
nonDem : (t : Type) -> t -> Dem t = \t,x ->
|
||||
mkDem t x noPoint ;
|
||||
|
||||
|
||||
}
|
||||
89
lib/resource/multimodal/old/Demonstrative.gf
Normal file
89
lib/resource/multimodal/old/Demonstrative.gf
Normal file
@@ -0,0 +1,89 @@
|
||||
abstract Demonstrative = Cat, PredefAbs ** {
|
||||
|
||||
-- Naming convention: $M$ prepended to 'unimodal' names.
|
||||
-- Exceptions: lexical units, those without unimodal counterparts.
|
||||
|
||||
cat
|
||||
|
||||
MS ; -- multimodal sentence or question
|
||||
MQS ; -- multimodal wh question
|
||||
MImp ; -- multimodal imperative
|
||||
MVP ; -- multimodal verb phrase
|
||||
MComp ; -- multimodal complement to copula (MAP, MNP, MAdv)
|
||||
MAP ; -- multimodal adjectival phrase
|
||||
MNP ; -- multimodal (demonstrative) noun phrase
|
||||
MAdv ; -- multimodal (demonstrative) adverbial
|
||||
|
||||
Point ; -- pointing gesture
|
||||
|
||||
fun
|
||||
|
||||
-- A pointing gesture is constructed from a string.
|
||||
|
||||
MkPoint : String -> Point ;
|
||||
|
||||
-- Construction of sentences, questions, and imperatives.
|
||||
|
||||
MPredVP : MNP -> MVP -> MS ; -- he flies here
|
||||
MQPredVP : MNP -> MVP -> MQS ; -- does he fly here
|
||||
|
||||
MQuestVP : IP -> MVP -> MQS ; -- who flies here
|
||||
|
||||
MImpVP : MVP -> MImp ; -- fly here!
|
||||
|
||||
-- Construction of verb phrases from verb + complements.
|
||||
|
||||
MUseV : V -> MVP ; -- flies (here)
|
||||
MComplV2 : V2 -> MNP -> MVP ; -- takes this (here)
|
||||
MComplVV : VV -> MVP -> MVP ; -- wants to fly (here)
|
||||
|
||||
MUseComp : MComp -> MVP ; -- is here ; is bigger than this
|
||||
|
||||
MCompAP : MAP -> MComp ; -- bigger than this
|
||||
MCompNP : MNP -> MComp ; -- the price of this
|
||||
MCompAdv : MAdv -> MComp ; -- here
|
||||
|
||||
MPositA : A -> MAP ; -- big
|
||||
MComparA : A -> MNP -> MAP ; -- bigger than this
|
||||
|
||||
-- Adverbial modification of a verb phrase.
|
||||
|
||||
MAdvVP : MVP -> MAdv -> MVP ; -- fly here
|
||||
|
||||
-- Demonstrative pronouns as NPs and determiners.
|
||||
|
||||
this_MNP : Point -> MNP ; -- this
|
||||
that_MNP : Point -> MNP ; -- that
|
||||
thisDet_MNP : CN -> Point -> MNP ; -- this car
|
||||
thatDet_MNP : CN -> Point -> MNP ; -- that car
|
||||
|
||||
-- Demonstrative adverbs.
|
||||
|
||||
here_MAdv : Point -> MAdv ; -- here
|
||||
here7from_MAdv : Point -> MAdv ; -- from here
|
||||
here7to_MAdv : Point -> MAdv ; -- to here
|
||||
|
||||
-- Building an adverb as prepositional phrase.
|
||||
|
||||
MPrepNP : Prep -> MNP -> MAdv ; -- in this car
|
||||
|
||||
-- Using ordinary categories.
|
||||
|
||||
-- Mounting nondemonstrative expressions.
|
||||
|
||||
DemNP : NP -> MNP ;
|
||||
DemAdv : Adv -> MAdv ;
|
||||
|
||||
-- Top-level phrases.
|
||||
|
||||
PhrMS : Pol -> MS -> Phr ;
|
||||
PhrMS : Pol -> MS -> Phr ;
|
||||
PhrMQS : Pol -> MQS -> Phr ;
|
||||
PhrMImp : Pol -> MImp -> Phr ;
|
||||
|
||||
-- For testing and example-based grammar writing.
|
||||
|
||||
point1, point2 : Point ;
|
||||
|
||||
x_MAdv, y_MAdv : MAdv ;
|
||||
}
|
||||
4
lib/resource/multimodal/old/DemonstrativeEng.gf
Normal file
4
lib/resource/multimodal/old/DemonstrativeEng.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../english/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeEng of Demonstrative = CatEng ** DemonstrativeI with
|
||||
(Lang = LangEng) ;
|
||||
4
lib/resource/multimodal/old/DemonstrativeFin.gf
Normal file
4
lib/resource/multimodal/old/DemonstrativeFin.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../finnish/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeFin of Demonstrative = CatFin ** DemonstrativeI with
|
||||
(Lang = LangFin) ;
|
||||
2
lib/resource/multimodal/old/DemonstrativeFre.gf
Normal file
2
lib/resource/multimodal/old/DemonstrativeFre.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete DemonstrativeFre of Demonstrative = CatFre ** DemonstrativeI with
|
||||
(Lang = LangFre) ;
|
||||
4
lib/resource/multimodal/old/DemonstrativeGer.gf
Normal file
4
lib/resource/multimodal/old/DemonstrativeGer.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../german/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeGer of Demonstrative = CatGer ** DemonstrativeI with
|
||||
(Lang = LangGer) ;
|
||||
109
lib/resource/multimodal/old/DemonstrativeI.gf
Normal file
109
lib/resource/multimodal/old/DemonstrativeI.gf
Normal file
@@ -0,0 +1,109 @@
|
||||
incomplete concrete DemonstrativeI of Demonstrative = Cat **
|
||||
open Prelude, Lang, ParamX, DemRes in {
|
||||
|
||||
flags optimize = all_subs ;
|
||||
|
||||
lincat
|
||||
|
||||
MS = Dem {s : Polarity => Str} ;
|
||||
MQS = Dem {s : Polarity => Str} ;
|
||||
MImp = Dem {s : Polarity => Str} ;
|
||||
MVP = Dem VP ;
|
||||
MComp = Dem Comp ;
|
||||
MAP = Dem AP ;
|
||||
MNP = Dem NP ;
|
||||
MAdv = Dem Adv ;
|
||||
|
||||
Point = DemRes.Point ;
|
||||
|
||||
lin
|
||||
|
||||
MkPoint s = mkPoint s.s ;
|
||||
|
||||
MPredVP np vp =
|
||||
let cl = PredVP np vp
|
||||
in
|
||||
mkDem
|
||||
{s : Polarity => Str}
|
||||
(polCases
|
||||
(UttS (UseCl TPres ASimul PPos cl))
|
||||
(UttS (UseCl TPres ASimul PNeg cl)))
|
||||
(concatPoint np vp) ;
|
||||
|
||||
MQPredVP np vp =
|
||||
let cl = QuestCl (PredVP np vp)
|
||||
in
|
||||
mkDem
|
||||
{s : Polarity => Str}
|
||||
(polCases
|
||||
(UttQS (UseQCl TPres ASimul PPos cl))
|
||||
(UttQS (UseQCl TPres ASimul PNeg cl)))
|
||||
(concatPoint np vp) ;
|
||||
|
||||
MQuestVP np vp =
|
||||
let cl = QuestVP np vp
|
||||
in
|
||||
mkDem
|
||||
{s : Polarity => Str}
|
||||
(polCases
|
||||
(UttQS (UseQCl TPres ASimul PPos cl))
|
||||
(UttQS (UseQCl TPres ASimul PNeg cl)))
|
||||
vp ;
|
||||
|
||||
MImpVP vp =
|
||||
let imp = ImpVP vp
|
||||
in
|
||||
mkDem
|
||||
{s : Polarity => Str}
|
||||
(polCases
|
||||
((UttImpSg PPos imp))
|
||||
((UttImpSg PNeg imp)))
|
||||
vp ;
|
||||
|
||||
|
||||
MUseV verb = mkDem VP (UseV verb) noPoint ;
|
||||
MComplV2 verb obj = mkDem VP (ComplV2 verb obj) obj ;
|
||||
MComplVV vv vp = mkDem VP (ComplVV vv vp) vp ;
|
||||
|
||||
MUseComp comp = mkDem VP (UseComp comp) comp ;
|
||||
|
||||
MCompAP ap = mkDem Comp (CompAP ap) ap ;
|
||||
MCompAdv adv = mkDem Comp (CompAdv adv) adv ;
|
||||
MCompNP np = mkDem Comp (CompNP np) np ;
|
||||
|
||||
MPositA a = mkDem AP (PositA a) noPoint ;
|
||||
MComparA a np = mkDem AP (ComparA a np) np ;
|
||||
|
||||
|
||||
MAdvVP vp adv =
|
||||
mkDem VP (AdvVP vp adv) (concatPoint vp adv) ;
|
||||
|
||||
this_MNP = mkDem NP this_NP ;
|
||||
that_MNP = mkDem NP that_NP ;
|
||||
|
||||
thisDet_MNP cn =
|
||||
mkDem NP (DetCN (DetSg (SgQuant this_Quant) NoOrd) cn) ;
|
||||
thatDet_MNP cn =
|
||||
mkDem NP (DetCN (DetSg (SgQuant that_Quant) NoOrd) cn) ;
|
||||
|
||||
here_MAdv = mkDem Adv here_Adv ;
|
||||
here7from_MAdv = mkDem Adv here7from_Adv ;
|
||||
here7to_MAdv = mkDem Adv here7to_Adv ;
|
||||
|
||||
MPrepNP p np = mkDem Adv (PrepNP p np) np ;
|
||||
|
||||
DemNP np = nonDem NP (np ** {lock_NP = <>}) ;
|
||||
DemAdv adv = nonDem Adv (adv ** {lock_Adv = <>}) ;
|
||||
|
||||
PhrMS pol ms = {s = pol.s ++ ms.s ! pol.p ++ ";" ++ ms.point} ;
|
||||
PhrMQS pol ms = {s = pol.s ++ ms.s ! pol.p ++ ";" ++ ms.point} ;
|
||||
PhrMImp pol ms = {s = pol.s ++ ms.s ! pol.p ++ ";" ++ ms.point} ;
|
||||
|
||||
point1 = mkPoint "p1" ;
|
||||
point2 = mkPoint "p2" ;
|
||||
|
||||
x_MAdv = mkDem Adv (ss "X") noPoint ; --- relies on Adv = {s : Str}
|
||||
y_MAdv = mkDem Adv (ss "Y") noPoint ; ---
|
||||
|
||||
}
|
||||
|
||||
2
lib/resource/multimodal/old/DemonstrativeIta.gf
Normal file
2
lib/resource/multimodal/old/DemonstrativeIta.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete DemonstrativeIta of Demonstrative = CatIta ** DemonstrativeI with
|
||||
(Lang = LangIta) ;
|
||||
2
lib/resource/multimodal/old/DemonstrativeNor.gf
Normal file
2
lib/resource/multimodal/old/DemonstrativeNor.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete DemonstrativeNor of Demonstrative = CatNor ** DemonstrativeI with
|
||||
(Lang = LangNor) ;
|
||||
2
lib/resource/multimodal/old/DemonstrativeSpa.gf
Normal file
2
lib/resource/multimodal/old/DemonstrativeSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete DemonstrativeSpa of Demonstrative = CatSpa ** DemonstrativeI with
|
||||
(Lang = LangSpa) ;
|
||||
4
lib/resource/multimodal/old/DemonstrativeSwe.gf
Normal file
4
lib/resource/multimodal/old/DemonstrativeSwe.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
concrete DemonstrativeSwe of Demonstrative = CatSwe ** DemonstrativeI with
|
||||
(Lang = LangSwe) ;
|
||||
|
||||
|
||||
16
lib/resource/multimodal/old/Multimodal.gf
Normal file
16
lib/resource/multimodal/old/Multimodal.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
abstract Multimodal =
|
||||
Noun,
|
||||
-- Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
Structural,
|
||||
Demonstrative,
|
||||
Lexicon
|
||||
** {} ;
|
||||
19
lib/resource/multimodal/old/MultimodalEng.gf
Normal file
19
lib/resource/multimodal/old/MultimodalEng.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalEng of Multimodal =
|
||||
NounEng,
|
||||
-- Verb,
|
||||
AdjectiveEng,
|
||||
AdverbEng,
|
||||
NumeralEng,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralEng,
|
||||
DemonstrativeEng,
|
||||
LexiconEng
|
||||
** {} ;
|
||||
|
||||
18
lib/resource/multimodal/old/MultimodalFin.gf
Normal file
18
lib/resource/multimodal/old/MultimodalFin.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalFin of Multimodal =
|
||||
NounFin,
|
||||
-- Verb,
|
||||
AdjectiveFin,
|
||||
AdverbFin,
|
||||
NumeralFin,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralFin,
|
||||
DemonstrativeFin,
|
||||
LexiconFin
|
||||
** {} ;
|
||||
19
lib/resource/multimodal/old/MultimodalFre.gf
Normal file
19
lib/resource/multimodal/old/MultimodalFre.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalFre of Multimodal =
|
||||
NounFre,
|
||||
-- Verb,
|
||||
AdjectiveFre,
|
||||
AdverbFre,
|
||||
-- NumeralFre,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralFre,
|
||||
DemonstrativeFre,
|
||||
LexiconFre
|
||||
** {} ;
|
||||
|
||||
18
lib/resource/multimodal/old/MultimodalGer.gf
Normal file
18
lib/resource/multimodal/old/MultimodalGer.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalGer of Multimodal =
|
||||
NounGer,
|
||||
-- Verb,
|
||||
AdjectiveGer,
|
||||
AdverbGer,
|
||||
NumeralGer,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralGer,
|
||||
DemonstrativeGer,
|
||||
LexiconGer
|
||||
** {} ;
|
||||
19
lib/resource/multimodal/old/MultimodalIta.gf
Normal file
19
lib/resource/multimodal/old/MultimodalIta.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalIta of Multimodal =
|
||||
NounIta,
|
||||
-- Verb,
|
||||
AdjectiveIta,
|
||||
AdverbIta,
|
||||
-- NumeralIta,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralIta,
|
||||
DemonstrativeIta,
|
||||
LexiconIta
|
||||
** {} ;
|
||||
|
||||
19
lib/resource/multimodal/old/MultimodalNor.gf
Normal file
19
lib/resource/multimodal/old/MultimodalNor.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalNor of Multimodal =
|
||||
NounNor,
|
||||
-- Verb,
|
||||
AdjectiveNor,
|
||||
AdverbNor,
|
||||
NumeralNor,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralNor,
|
||||
DemonstrativeNor,
|
||||
LexiconNor
|
||||
** {} ;
|
||||
|
||||
19
lib/resource/multimodal/old/MultimodalSpa.gf
Normal file
19
lib/resource/multimodal/old/MultimodalSpa.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalSpa of Multimodal =
|
||||
NounSpa,
|
||||
-- Verb,
|
||||
AdjectiveSpa,
|
||||
AdverbSpa,
|
||||
-- NumeralSpa,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralSpa,
|
||||
DemonstrativeSpa,
|
||||
LexiconSpa
|
||||
** {} ;
|
||||
|
||||
19
lib/resource/multimodal/old/MultimodalSwe.gf
Normal file
19
lib/resource/multimodal/old/MultimodalSwe.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalSwe of Multimodal =
|
||||
NounSwe,
|
||||
-- Verb,
|
||||
AdjectiveSwe,
|
||||
AdverbSwe,
|
||||
NumeralSwe,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralSwe,
|
||||
DemonstrativeSwe,
|
||||
LexiconSwe
|
||||
** {} ;
|
||||
|
||||
Reference in New Issue
Block a user