mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 16:52:50 -06:00
preserve 1.0
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
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 ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
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 ;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../english/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeEng of Demonstrative = CatEng ** DemonstrativeI with
|
||||
(Lang = LangEng) ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../finnish/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeFin of Demonstrative = CatFin ** DemonstrativeI with
|
||||
(Lang = LangFin) ;
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete DemonstrativeFre of Demonstrative = CatFre ** DemonstrativeI with
|
||||
(Lang = LangFre) ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../german/:../abstract:../common:prelude
|
||||
|
||||
concrete DemonstrativeGer of Demonstrative = CatGer ** DemonstrativeI with
|
||||
(Lang = LangGer) ;
|
||||
@@ -1,109 +0,0 @@
|
||||
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 ; ---
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete DemonstrativeIta of Demonstrative = CatIta ** DemonstrativeI with
|
||||
(Lang = LangIta) ;
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete DemonstrativeNor of Demonstrative = CatNor ** DemonstrativeI with
|
||||
(Lang = LangNor) ;
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete DemonstrativeSpa of Demonstrative = CatSpa ** DemonstrativeI with
|
||||
(Lang = LangSpa) ;
|
||||
@@ -1,4 +0,0 @@
|
||||
concrete DemonstrativeSwe of Demonstrative = CatSwe ** DemonstrativeI with
|
||||
(Lang = LangSwe) ;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
abstract Multimodal =
|
||||
Noun,
|
||||
-- Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
Structural,
|
||||
Demonstrative,
|
||||
Lexicon
|
||||
** {} ;
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalEng of Multimodal =
|
||||
NounEng,
|
||||
-- Verb,
|
||||
AdjectiveEng,
|
||||
AdverbEng,
|
||||
NumeralEng,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralEng,
|
||||
DemonstrativeEng,
|
||||
LexiconEng
|
||||
** {} ;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalFin of Multimodal =
|
||||
NounFin,
|
||||
-- Verb,
|
||||
AdjectiveFin,
|
||||
AdverbFin,
|
||||
NumeralFin,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralFin,
|
||||
DemonstrativeFin,
|
||||
LexiconFin
|
||||
** {} ;
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalFre of Multimodal =
|
||||
NounFre,
|
||||
-- Verb,
|
||||
AdjectiveFre,
|
||||
AdverbFre,
|
||||
-- NumeralFre,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralFre,
|
||||
DemonstrativeFre,
|
||||
LexiconFre
|
||||
** {} ;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalGer of Multimodal =
|
||||
NounGer,
|
||||
-- Verb,
|
||||
AdjectiveGer,
|
||||
AdverbGer,
|
||||
NumeralGer,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralGer,
|
||||
DemonstrativeGer,
|
||||
LexiconGer
|
||||
** {} ;
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalIta of Multimodal =
|
||||
NounIta,
|
||||
-- Verb,
|
||||
AdjectiveIta,
|
||||
AdverbIta,
|
||||
-- NumeralIta,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralIta,
|
||||
DemonstrativeIta,
|
||||
LexiconIta
|
||||
** {} ;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalNor of Multimodal =
|
||||
NounNor,
|
||||
-- Verb,
|
||||
AdjectiveNor,
|
||||
AdverbNor,
|
||||
NumeralNor,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralNor,
|
||||
DemonstrativeNor,
|
||||
LexiconNor
|
||||
** {} ;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete MultimodalSpa of Multimodal =
|
||||
NounSpa,
|
||||
-- Verb,
|
||||
AdjectiveSpa,
|
||||
AdverbSpa,
|
||||
-- NumeralSpa,
|
||||
-- Sentence,
|
||||
-- Question,
|
||||
-- Relative,
|
||||
-- Conjunction,
|
||||
-- Phrase,
|
||||
-- Tensed,
|
||||
StructuralSpa,
|
||||
DemonstrativeSpa,
|
||||
LexiconSpa
|
||||
** {} ;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -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