mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -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) ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user