forked from GitHub/gf-core
tested "minimal" resource to compile Foods and Bronzeage
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:present
|
--# -path=.:minimal:present
|
||||||
|
|
||||||
concrete BronzeageEng of Bronzeage = SwadeshEng ** BronzeageI with
|
concrete BronzeageEng of Bronzeage = SwadeshEng ** BronzeageI with
|
||||||
(Syntax = SyntaxEng) ** open ResEng in {
|
(Syntax = SyntaxEng) ** open ResEng in {
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
|
|
||||||
concrete SwadeshEng of Swadesh = SwadeshI with
|
concrete SwadeshEng of Swadesh = SwadeshI with
|
||||||
(Syntax = SyntaxEng),
|
(Syntax = SyntaxEng),
|
||||||
(L = LexiconEng),
|
|
||||||
(Lexicon = LexiconEng) ;
|
(Lexicon = LexiconEng) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../foods:present:prelude
|
--# -path=.:../foods:minimal:present
|
||||||
|
|
||||||
concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
|
concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
|
||||||
lincat
|
lincat
|
||||||
@@ -8,10 +8,10 @@ concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
|
|||||||
Quality = AP ;
|
Quality = AP ;
|
||||||
lin
|
lin
|
||||||
Is item quality = mkCl item quality ;
|
Is item quality = mkCl item quality ;
|
||||||
This kind = mkNP this_QuantSg kind ;
|
This kind = mkNP this_Quant kind ;
|
||||||
That kind = mkNP that_QuantSg kind ;
|
That kind = mkNP that_Quant kind ;
|
||||||
These kind = mkNP these_QuantPl kind ;
|
These kind = mkNP this_Quant plNum kind ;
|
||||||
Those kind = mkNP those_QuantPl kind ;
|
Those kind = mkNP that_Quant plNum kind ;
|
||||||
QKind quality kind = mkCN quality kind ;
|
QKind quality kind = mkCN quality kind ;
|
||||||
Wine = mkCN (mkN "wine") ;
|
Wine = mkCN (mkN "wine") ;
|
||||||
Pizza = mkCN (mkN "pizza") ;
|
Pizza = mkCN (mkN "pizza") ;
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
|
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
|
||||||
lincat
|
lincat
|
||||||
Phrase = Cl ;
|
Phrase = Utt ;
|
||||||
Item = NP ;
|
Item = NP ;
|
||||||
Kind = CN ;
|
Kind = CN ;
|
||||||
Quality = AP ;
|
Quality = AP ;
|
||||||
lin
|
lin
|
||||||
Is item quality = mkCl item quality ;
|
Is item quality = mkUtt (mkCl item quality) ;
|
||||||
This kind = mkNP this_QuantSg kind ;
|
This kind = mkNP this_Quant kind ;
|
||||||
That kind = mkNP that_QuantSg kind ;
|
That kind = mkNP that_Quant kind ;
|
||||||
These kind = mkNP these_QuantPl kind ;
|
These kind = mkNP this_Quant plNum kind ;
|
||||||
Those kind = mkNP those_QuantPl kind ;
|
Those kind = mkNP that_Quant plNum kind ;
|
||||||
QKind quality kind = mkCN quality kind ;
|
QKind quality kind = mkCN quality kind ;
|
||||||
Very quality = mkAP very_AdA quality ;
|
Very quality = mkAP very_AdA quality ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:../foods:present:prelude
|
--# -path=.:../foods:minimal:present:prelude
|
||||||
|
|
||||||
concrete FoodsIta of Foods = FoodsI with
|
concrete FoodsIta of Foods = FoodsI with
|
||||||
(Syntax = SyntaxIta),
|
(Syntax = SyntaxIta),
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ langsLang = langs `except` ["Ara","Ina"]
|
|||||||
-- languages for which to compile Try
|
-- languages for which to compile Try
|
||||||
langsAPI = langsLang `except` ["Ara","Hin","Ina","Tha"]
|
langsAPI = langsLang `except` ["Ara","Hin","Ina","Tha"]
|
||||||
|
|
||||||
|
-- languages for which to compile minimal Syntax
|
||||||
|
langsMinimal = langs `only` ["Eng","Bul","Ita"]
|
||||||
|
|
||||||
-- languages for which to run treebank test
|
-- languages for which to run treebank test
|
||||||
langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Rus","Spa","Tha"]
|
langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Rus","Spa","Tha"]
|
||||||
|
|
||||||
@@ -97,6 +100,9 @@ make xx = do
|
|||||||
mapM_ (gfc pres presApiPath . try) (optl langsAPI)
|
mapM_ (gfc pres presApiPath . try) (optl langsAPI)
|
||||||
mapM_ (gfc pres presApiPath . symbolic) (optl langsAPI)
|
mapM_ (gfc pres presApiPath . symbolic) (optl langsAPI)
|
||||||
copy "*/*.gfo" dir
|
copy "*/*.gfo" dir
|
||||||
|
ifx "minimal" $ do
|
||||||
|
mapM_ (gfcmin presApiPath . syntax) (optl langsMinimal)
|
||||||
|
copy "api/*.gfo" "../minimal"
|
||||||
ifxx "pgf" $ do
|
ifxx "pgf" $ do
|
||||||
run_gfc $ ["-s","--make","--name=langs","--parser=off",
|
run_gfc $ ["-s","--make","--name=langs","--parser=off",
|
||||||
"--output-dir=" ++ dir]
|
"--output-dir=" ++ dir]
|
||||||
@@ -126,6 +132,11 @@ gfc pres ppath file = do
|
|||||||
putStrLn $ "Compiling " ++ file
|
putStrLn $ "Compiling " ++ file
|
||||||
run_gfc ["-s","-src", preproc, path, file]
|
run_gfc ["-s","-src", preproc, path, file]
|
||||||
|
|
||||||
|
gfcmin path file = do
|
||||||
|
let preproc = "-preproc=./mkMinimal"
|
||||||
|
putStrLn $ "Compiling minimal " ++ file
|
||||||
|
run_gfc ["-s","-src", preproc, path, file]
|
||||||
|
|
||||||
gf comm file = do
|
gf comm file = do
|
||||||
putStrLn $ "Reading " ++ file
|
putStrLn $ "Reading " ++ file
|
||||||
let cmd = "echo \"" ++ comm ++ "\" | gf -s " ++ file
|
let cmd = "echo \"" ++ comm ++ "\" | gf -s " ++ file
|
||||||
@@ -142,6 +153,7 @@ lang (lla,la) = lla ++ "/All" ++ la ++ ".gf"
|
|||||||
compat (lla,la) = lla ++ "/Compatibility" ++ la ++ ".gf"
|
compat (lla,la) = lla ++ "/Compatibility" ++ la ++ ".gf"
|
||||||
symbol (lla,la) = lla ++ "/Symbol" ++ la ++ ".gf"
|
symbol (lla,la) = lla ++ "/Symbol" ++ la ++ ".gf"
|
||||||
try (lla,la) = "api/Try" ++ la ++ ".gf"
|
try (lla,la) = "api/Try" ++ la ++ ".gf"
|
||||||
|
syntax (lla,la) = "api/Syntax" ++ la ++ ".gf"
|
||||||
symbolic (lla,la) = "api/Symbolic" ++ la ++ ".gf"
|
symbolic (lla,la) = "api/Symbolic" ++ la ++ ".gf"
|
||||||
parse (lla,la) = "parse/Parse" ++ la ++ ".gf"
|
parse (lla,la) = "parse/Parse" ++ la ++ ".gf"
|
||||||
|
|
||||||
|
|||||||
@@ -962,8 +962,8 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
= \y -> ExistNP (DetArtSg IndefArt y) ; --# notminimal
|
= \y -> ExistNP (DetArtSg IndefArt y) ; --# notminimal
|
||||||
mkCl : NP -> Cl -- there is a house --# notminimal
|
mkCl : NP -> Cl -- there is a house --# notminimal
|
||||||
= ExistNP ; --# notminimal
|
= ExistNP ; --# notminimal
|
||||||
mkCl : NP -> AP -> Cl -- John is nice and warm --# notminimal
|
mkCl : NP -> AP -> Cl -- John is nice and warm
|
||||||
= \x,y -> PredVP x (UseComp (CompAP y)) ; --# notminimal
|
= \x,y -> PredVP x (UseComp (CompAP y)) ;
|
||||||
mkCl : NP -> A -> Cl -- John is warm
|
mkCl : NP -> A -> Cl -- John is warm
|
||||||
= \x,y -> PredVP x (UseComp (CompAP (PositA y))) ;
|
= \x,y -> PredVP x (UseComp (CompAP (PositA y))) ;
|
||||||
mkCl : NP -> A -> NP -> Cl -- John is warmer than Mary
|
mkCl : NP -> A -> NP -> Cl -- John is warmer than Mary
|
||||||
@@ -1124,8 +1124,8 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
mkCard = overload {
|
mkCard = overload {
|
||||||
mkCard : Numeral -> Card
|
mkCard : Numeral -> Card
|
||||||
= NumNumeral ;
|
= NumNumeral ;
|
||||||
mkCard : Digits -> Card -- 51
|
mkCard : Digits -> Card -- 51 --# notminimal
|
||||||
= NumDigits ;
|
= NumDigits ; --# notminimal
|
||||||
mkCard : AdN -> Card -> Card --# notminimal
|
mkCard : AdN -> Card -> Card --# notminimal
|
||||||
= AdNum --# notminimal
|
= AdNum --# notminimal
|
||||||
} ;
|
} ;
|
||||||
@@ -1539,11 +1539,11 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
= \t,u -> {s = t.s ++ u.s ; lock_Text = <>} ; --# notminimal
|
= \t,u -> {s = t.s ++ u.s ; lock_Text = <>} ; --# notminimal
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVP = overload { --# notminimal
|
mkVP = overload {
|
||||||
mkVP : V -> VP -- sleep --# notminimal
|
mkVP : V -> VP -- sleep
|
||||||
= UseV ; --# notminimal
|
= UseV ;
|
||||||
mkVP : V2 -> NP -> VP -- use it --# notminimal
|
mkVP : V2 -> NP -> VP -- use it
|
||||||
= ComplV2 ; --# notminimal
|
= ComplV2 ;
|
||||||
mkVP : V3 -> NP -> NP -> VP -- send a message to her --# notminimal
|
mkVP : V3 -> NP -> NP -> VP -- send a message to her --# notminimal
|
||||||
= ComplV3 ; --# notminimal
|
= ComplV3 ; --# notminimal
|
||||||
mkVP : VV -> VP -> VP -- want to run --# notminimal
|
mkVP : VV -> VP -> VP -- want to run --# notminimal
|
||||||
@@ -1580,15 +1580,15 @@ incomplete resource Constructors = open Grammar in {
|
|||||||
= \y -> (UseComp (CompNP (DetArtSg IndefArt (UseN y)))) ; --# notminimal
|
= \y -> (UseComp (CompNP (DetArtSg IndefArt (UseN y)))) ; --# notminimal
|
||||||
mkVP : Adv -> VP -- be here --# notminimal
|
mkVP : Adv -> VP -- be here --# notminimal
|
||||||
= \a -> UseComp (CompAdv a) ; --# notminimal
|
= \a -> UseComp (CompAdv a) ; --# notminimal
|
||||||
mkVP : VP -> Adv -> VP -- sleep here --# notminimal
|
mkVP : VP -> Adv -> VP -- sleep here
|
||||||
= AdvVP ; --# notminimal
|
= AdvVP ;
|
||||||
mkVP : AdV -> VP -> VP -- always sleep --# notminimal
|
mkVP : AdV -> VP -> VP -- always sleep --# notminimal
|
||||||
= AdVVP ; --# notminimal
|
= AdVVP ; --# notminimal
|
||||||
mkVP : VPSlash -> NP -> VP -- always sleep --# notminimal
|
mkVP : VPSlash -> NP -> VP -- always sleep --# notminimal
|
||||||
= ComplSlash ; --# notminimal
|
= ComplSlash ; --# notminimal
|
||||||
mkVP : VPSlash -> VP --# notminimal
|
mkVP : VPSlash -> VP --# notminimal
|
||||||
= ReflVP --# notminimal
|
= ReflVP --# notminimal
|
||||||
} ; --# notminimal
|
} ;
|
||||||
|
|
||||||
reflexiveVP : V2 -> VP = \v -> ReflVP (SlashV2a v) ; --# notminimal
|
reflexiveVP : V2 -> VP = \v -> ReflVP (SlashV2a v) ; --# notminimal
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
ASimul
|
ASimul
|
||||||
AdAP
|
AdAP
|
||||||
AdjCN
|
AdjCN
|
||||||
|
AdvVP
|
||||||
CompAP
|
CompAP
|
||||||
CompAdv
|
CompAdv
|
||||||
CompNP
|
CompNP
|
||||||
ComparA
|
ComparA
|
||||||
ComplSlash
|
ComplSlash
|
||||||
ComplV2
|
|
||||||
ComplV3
|
|
||||||
DefArt
|
DefArt
|
||||||
DetArtCard
|
|
||||||
DetArtSg
|
|
||||||
DetCN
|
DetCN
|
||||||
DetQuant
|
DetQuant
|
||||||
Grammar
|
Grammar
|
||||||
@@ -22,22 +19,17 @@ MassNP
|
|||||||
NoPConj
|
NoPConj
|
||||||
NoVoc
|
NoVoc
|
||||||
NumCard
|
NumCard
|
||||||
NumDigits
|
|
||||||
NumNumeral
|
NumNumeral
|
||||||
NumPl
|
NumPl
|
||||||
NumSg
|
NumSg
|
||||||
PExclMark
|
|
||||||
PFullStop
|
|
||||||
PNeg
|
PNeg
|
||||||
PPos
|
PPos
|
||||||
PQuestMark
|
|
||||||
PhrUtt
|
PhrUtt
|
||||||
PositA
|
PositA
|
||||||
PositAdvAdj
|
PositAdvAdj
|
||||||
PredVP
|
PredVP
|
||||||
PredetNP
|
PredetNP
|
||||||
PrepNP
|
PrepNP
|
||||||
Quant
|
|
||||||
QuestCl
|
QuestCl
|
||||||
QuestIAdv
|
QuestIAdv
|
||||||
QuestVP
|
QuestVP
|
||||||
@@ -45,14 +37,11 @@ Slash3V3
|
|||||||
SlashV2A
|
SlashV2A
|
||||||
SlashV2a
|
SlashV2a
|
||||||
TEmpty
|
TEmpty
|
||||||
TEmpty;
|
|
||||||
TExclMark
|
TExclMark
|
||||||
TFullStop
|
TFullStop
|
||||||
TPres
|
TPres
|
||||||
TQuestMark
|
TQuestMark
|
||||||
TTAnt
|
TTAnt
|
||||||
TUseCl
|
|
||||||
TUseQCl
|
|
||||||
UseCl
|
UseCl
|
||||||
UseComp
|
UseComp
|
||||||
UseN
|
UseN
|
||||||
|
|||||||
Reference in New Issue
Block a user