mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
bronzeage
This commit is contained in:
31
examples/bronzeage/Bronzeage.gf
Normal file
31
examples/bronzeage/Bronzeage.gf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
abstract Bronzeage = Cat, Swadesh ** {
|
||||||
|
|
||||||
|
cat
|
||||||
|
Sent ;
|
||||||
|
|
||||||
|
fun
|
||||||
|
PhrPos : Sent -> Phr ;
|
||||||
|
PhrNeg : Sent -> Phr ;
|
||||||
|
PhrQuest : Sent -> Phr ;
|
||||||
|
PhrImp : Imp -> Phr ;
|
||||||
|
PhrImpNeg : Imp -> Phr ;
|
||||||
|
|
||||||
|
SentV : V -> NP -> Sent ;
|
||||||
|
SentV2 : V2 -> NP -> NP -> Sent ;
|
||||||
|
SentV3 : V3 -> NP -> NP -> NP -> Sent ;
|
||||||
|
SentA : A -> NP -> Sent ;
|
||||||
|
SentNP : NP -> NP -> Sent ;
|
||||||
|
|
||||||
|
SentAdvV : V -> NP -> Adv -> Sent ;
|
||||||
|
SentAdvV2 : V2 -> NP -> NP -> Adv -> Sent ;
|
||||||
|
|
||||||
|
ImpV : V -> Imp ;
|
||||||
|
ImpV2 : V2 -> NP -> Imp ;
|
||||||
|
|
||||||
|
DetCN : Det -> CN -> NP ;
|
||||||
|
NumCN : Num -> CN -> NP ;
|
||||||
|
|
||||||
|
UseN : N -> CN ;
|
||||||
|
ModCN : A -> CN -> CN ;
|
||||||
|
|
||||||
|
}
|
||||||
6
examples/bronzeage/BronzeageEng.gf
Normal file
6
examples/bronzeage/BronzeageEng.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageEng of Bronzeage = CatEng, SwadeshEng ** BronzeageI with
|
||||||
|
(Lang = LangEng),
|
||||||
|
(Swadesh = SwadeshEng) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageFin.gf
Normal file
6
examples/bronzeage/BronzeageFin.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageFin of Bronzeage = CatFin, SwadeshFin ** BronzeageI with
|
||||||
|
(Lang = LangFin),
|
||||||
|
(Swadesh = SwadeshFin) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageFre.gf
Normal file
6
examples/bronzeage/BronzeageFre.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageFre of Bronzeage = CatFre, SwadeshFre ** BronzeageI with
|
||||||
|
(Lang = LangFre),
|
||||||
|
(Swadesh = SwadeshFre) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageGer.gf
Normal file
6
examples/bronzeage/BronzeageGer.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageGer of Bronzeage = CatGer, SwadeshGer ** BronzeageI with
|
||||||
|
(Lang = LangGer),
|
||||||
|
(Swadesh = SwadeshGer) ;
|
||||||
|
|
||||||
51
examples/bronzeage/BronzeageI.gf
Normal file
51
examples/bronzeage/BronzeageI.gf
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
incomplete concrete BronzeageI of Bronzeage = Cat, Swadesh ** open Lang in {
|
||||||
|
|
||||||
|
flags
|
||||||
|
startcat = Phr ; optimize = all_subs ;
|
||||||
|
unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Sent = {s : SForm => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PhrPos sent = {s = sent.s ! SPos ++ "."} ;
|
||||||
|
PhrNeg sent = {s = sent.s ! SNeg ++ "."} ;
|
||||||
|
PhrQuest sent = {s = sent.s ! SQuest ++ "?"} ;
|
||||||
|
PhrImp imp = {s = (PhrUtt NoPConj (UttImpSg PPos imp) NoVoc).s ++ "!"} ;
|
||||||
|
PhrImpNeg imp = {s = (PhrUtt NoPConj (UttImpSg PNeg imp) NoVoc).s ++ "!"} ;
|
||||||
|
|
||||||
|
SentV v np = mkSent np (UseV v) ;
|
||||||
|
|
||||||
|
SentV2 v x y = mkSent x (ComplV2 v y) ;
|
||||||
|
SentV3 v x y z = mkSent x (ComplV3 v y z) ;
|
||||||
|
SentA a x = mkSent x (UseComp (CompAP (PositA a))) ;
|
||||||
|
SentNP a x = mkSent x (UseComp (CompNP a)) ;
|
||||||
|
|
||||||
|
SentAdvV v np adv = mkSent np (AdvVP (UseV v) adv) ;
|
||||||
|
SentAdvV2 v x y adv = mkSent x (AdvVP (ComplV2 v y) adv) ;
|
||||||
|
|
||||||
|
ImpV v = ImpVP (UseV v) ;
|
||||||
|
ImpV2 v x = ImpVP (ComplV2 v x) ;
|
||||||
|
|
||||||
|
DetCN d n = DetCN d n ;
|
||||||
|
NumCN n cn = DetCN (DetPl (PlQuant IndefArt) n NoOrd) cn ;
|
||||||
|
|
||||||
|
UseN n = UseN n ;
|
||||||
|
ModCN a n = AdjCN (PositA a) n ;
|
||||||
|
|
||||||
|
param
|
||||||
|
SForm = SPos | SNeg | SQuest ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkSent : NP -> VP -> Sent ;
|
||||||
|
mkSent np vp =
|
||||||
|
let cl = PredVP np vp
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
SPos => Predef.toStr S (UseCl TPres ASimul PPos cl) ;
|
||||||
|
SNeg => Predef.toStr S (UseCl TPres ASimul PNeg cl) ;
|
||||||
|
SQuest => Predef.toStr QS (UseQCl TPres ASimul PPos (QuestCl cl))
|
||||||
|
} ;
|
||||||
|
lock_Sent = <>
|
||||||
|
} ;
|
||||||
|
}
|
||||||
6
examples/bronzeage/BronzeageIta.gf
Normal file
6
examples/bronzeage/BronzeageIta.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageIta of Bronzeage = CatIta, SwadeshIta ** BronzeageI with
|
||||||
|
(Lang = LangIta),
|
||||||
|
(Swadesh = SwadeshIta) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageNor.gf
Normal file
6
examples/bronzeage/BronzeageNor.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageNor of Bronzeage = CatNor, SwadeshNor ** BronzeageI with
|
||||||
|
(Lang = LangNor),
|
||||||
|
(Swadesh = SwadeshNor) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageSpa.gf
Normal file
6
examples/bronzeage/BronzeageSpa.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageSpa of Bronzeage = CatSpa, SwadeshSpa ** BronzeageI with
|
||||||
|
(Lang = LangSpa),
|
||||||
|
(Swadesh = SwadeshSpa) ;
|
||||||
|
|
||||||
6
examples/bronzeage/BronzeageSwe.gf
Normal file
6
examples/bronzeage/BronzeageSwe.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
|
concrete BronzeageSwe of Bronzeage = CatSwe, SwadeshSwe ** BronzeageI with
|
||||||
|
(Lang = LangSwe),
|
||||||
|
(Swadesh = SwadeshSwe) ;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageEng of Stoneage = StoneageI with
|
concrete StoneageEng of Stoneage = StoneageI with
|
||||||
(Lang = LangEng),
|
(Mathematical = MathematicalEng),
|
||||||
(Swadesh = SwadeshEng) ;
|
(Swadesh = SwadeshEng) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:resource-1.0/swadesh
|
--# -path=.:compiled:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageFin of Stoneage = StoneageI with
|
concrete StoneageFin of Stoneage = StoneageI with
|
||||||
(Lang = LangFin),
|
(Mathematical = MathematicalFin),
|
||||||
(Swadesh = SwadeshFin) ;
|
(Swadesh = SwadeshFin) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageFre of Stoneage = StoneageI with
|
concrete StoneageFre of Stoneage = StoneageI with
|
||||||
(Lang = LangFre),
|
(Mathematical = MathematicalFre),
|
||||||
(Swadesh = SwadeshFre) ;
|
(Swadesh = SwadeshFre) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:resource-1.0/swadesh
|
--# -path=.:compiled:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageGer of Stoneage = StoneageI with
|
concrete StoneageGer of Stoneage = StoneageI with
|
||||||
(Lang = LangGer),
|
(Mathematical = MathematicalGer),
|
||||||
(Swadesh = SwadeshGer) ;
|
(Swadesh = SwadeshGer) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
incomplete concrete StoneageI of Stoneage = open Lang, Swadesh in {
|
incomplete concrete StoneageI of Stoneage = open Mathematical, Swadesh in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
startcat=S ;
|
startcat=S ;
|
||||||
@@ -229,6 +229,14 @@ lin
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
|
PresV : V -> NP -> Phr = \v,s ->
|
||||||
|
PhrUtt NoPConj (UttS (PosCl (predV v s))) NoVoc ;
|
||||||
|
PresV2 : V2 -> NP -> NP -> Phr = \v,s,o ->
|
||||||
|
PhrUtt NoPConj (UttS (PosCl (predV2 v s o))) NoVoc ;
|
||||||
|
PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r ->
|
||||||
|
PhrUtt NoPConj (UttS (PosCl (predV3 v s o r))) NoVoc ;
|
||||||
|
|
||||||
|
{-
|
||||||
PresV : V -> NP -> Phr = \v,s ->
|
PresV : V -> NP -> Phr = \v,s ->
|
||||||
PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos
|
PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos
|
||||||
(PredVP s (UseV v)))) NoVoc ;
|
(PredVP s (UseV v)))) NoVoc ;
|
||||||
@@ -238,6 +246,7 @@ oper
|
|||||||
PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r ->
|
PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r ->
|
||||||
PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos
|
PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos
|
||||||
(PredVP s (ComplV3 v o r)))) NoVoc ;
|
(PredVP s (ComplV3 v o r)))) NoVoc ;
|
||||||
|
-}
|
||||||
|
|
||||||
ModA : A -> CN -> CN = \a ->
|
ModA : A -> CN -> CN = \a ->
|
||||||
AdjCN (PositA a) ;
|
AdjCN (PositA a) ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageIta of Stoneage = StoneageI with
|
concrete StoneageIta of Stoneage = StoneageI with
|
||||||
(Lang = LangIta),
|
(Mathematical = MathematicalIta),
|
||||||
(Swadesh = SwadeshIta) ;
|
(Swadesh = SwadeshIta) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageNor of Stoneage = StoneageI with
|
concrete StoneageNor of Stoneage = StoneageI with
|
||||||
(Lang = LangNor),
|
(Mathematical = MathematicalNor),
|
||||||
(Swadesh = SwadeshNor) ;
|
(Swadesh = SwadeshNor) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageSpa of Stoneage = StoneageI with
|
concrete StoneageSpa of Stoneage = StoneageI with
|
||||||
(Lang = LangSpa),
|
(Mathematical = MathematicalSpa),
|
||||||
(Swadesh = SwadeshSpa) ;
|
(Swadesh = SwadeshSpa) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||||
|
|
||||||
concrete StoneageSwe of Stoneage = StoneageI with
|
concrete StoneageSwe of Stoneage = StoneageI with
|
||||||
(Lang = LangSwe),
|
(Mathematical = MathematicalSwe),
|
||||||
(Swadesh = SwadeshSwe) ;
|
(Swadesh = SwadeshSwe) ;
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
abstract Mathematical =
|
abstract Mathematical =
|
||||||
Noun - [ComplN2], --- to avoid ambiguity
|
Noun - [ComplN2], --- to avoid ambiguity
|
||||||
-- Verb,
|
-- Verb,
|
||||||
-- Adjective,
|
Adjective,
|
||||||
-- Adverb,
|
Adverb,
|
||||||
Numeral,
|
Numeral,
|
||||||
-- Sentence,
|
-- Sentence,
|
||||||
Question,
|
Question,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalEng of Mathematical =
|
concrete MathematicalEng of Mathematical =
|
||||||
NounEng - [ComplN2], --- to avoid ambiguity
|
NounEng - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbEng,
|
-- VerbEng,
|
||||||
-- AdjectiveEng,
|
AdjectiveEng,
|
||||||
-- AdverbEng,
|
AdverbEng,
|
||||||
NumeralEng,
|
NumeralEng,
|
||||||
-- SentenceEng,
|
-- SentenceEng,
|
||||||
QuestionEng,
|
QuestionEng,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalFin of Mathematical =
|
concrete MathematicalFin of Mathematical =
|
||||||
NounFin - [ComplN2], --- to avoid ambiguity
|
NounFin - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbFin,
|
-- VerbFin,
|
||||||
-- AdjectiveFin,
|
AdjectiveFin,
|
||||||
-- AdverbFin,
|
AdverbFin,
|
||||||
NumeralFin,
|
NumeralFin,
|
||||||
-- SentenceFin,
|
-- SentenceFin,
|
||||||
QuestionFin,
|
QuestionFin,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalFre of Mathematical =
|
concrete MathematicalFre of Mathematical =
|
||||||
NounFre - [ComplN2], --- to avoid ambiguity
|
NounFre - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbFre,
|
-- VerbFre,
|
||||||
-- AdjectiveFre,
|
AdjectiveFre,
|
||||||
-- AdverbFre,
|
AdverbFre,
|
||||||
NumeralFre,
|
NumeralFre,
|
||||||
-- SentenceFre,
|
-- SentenceFre,
|
||||||
QuestionFre,
|
QuestionFre,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalGer of Mathematical =
|
concrete MathematicalGer of Mathematical =
|
||||||
NounGer - [ComplN2], --- to avoid ambiguity
|
NounGer - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbGer,
|
-- VerbGer,
|
||||||
-- AdjectiveGer,
|
AdjectiveGer,
|
||||||
-- AdverbGer,
|
AdverbGer,
|
||||||
NumeralGer,
|
NumeralGer,
|
||||||
-- SentenceGer,
|
-- SentenceGer,
|
||||||
QuestionGer,
|
QuestionGer,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalIta of Mathematical =
|
concrete MathematicalIta of Mathematical =
|
||||||
NounIta - [ComplN2], --- to avoid ambiguity
|
NounIta - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbIta,
|
-- VerbIta,
|
||||||
-- AdjectiveIta,
|
AdjectiveIta,
|
||||||
-- AdverbIta,
|
AdverbIta,
|
||||||
NumeralIta,
|
NumeralIta,
|
||||||
-- SentenceIta,
|
-- SentenceIta,
|
||||||
QuestionIta,
|
QuestionIta,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalNor of Mathematical =
|
concrete MathematicalNor of Mathematical =
|
||||||
NounNor - [ComplN2], --- to avoid ambiguity
|
NounNor - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbNor,
|
-- VerbNor,
|
||||||
-- AdjectiveNor,
|
AdjectiveNor,
|
||||||
-- AdverbNor,
|
AdverbNor,
|
||||||
NumeralNor,
|
NumeralNor,
|
||||||
-- SentenceNor,
|
-- SentenceNor,
|
||||||
QuestionNor,
|
QuestionNor,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalSpa of Mathematical =
|
concrete MathematicalSpa of Mathematical =
|
||||||
NounSpa - [ComplN2], --- to avoid ambiguity
|
NounSpa - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbSpa,
|
-- VerbSpa,
|
||||||
-- AdjectiveSpa,
|
AdjectiveSpa,
|
||||||
-- AdverbSpa,
|
AdverbSpa,
|
||||||
NumeralSpa,
|
NumeralSpa,
|
||||||
-- SentenceSpa,
|
-- SentenceSpa,
|
||||||
QuestionSpa,
|
QuestionSpa,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
concrete MathematicalSwe of Mathematical =
|
concrete MathematicalSwe of Mathematical =
|
||||||
NounSwe - [ComplN2], --- to avoid ambiguity
|
NounSwe - [ComplN2], --- to avoid ambiguity
|
||||||
-- VerbSwe,
|
-- VerbSwe,
|
||||||
-- AdjectiveSwe,
|
AdjectiveSwe,
|
||||||
-- AdverbSwe,
|
AdverbSwe,
|
||||||
NumeralSwe,
|
NumeralSwe,
|
||||||
-- SentenceSwe,
|
-- SentenceSwe,
|
||||||
QuestionSwe,
|
QuestionSwe,
|
||||||
|
|||||||
Reference in New Issue
Block a user