1
0
forked from GitHub/gf-core

more demo languages; an entry for demo in Make.hs

This commit is contained in:
aarne
2008-06-23 12:59:26 +00:00
parent c140794c98
commit f47b1a7487
14 changed files with 133 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ module Main where
import System
-- Make commands for compiling and testing resource grammars.
-- usage: runghc Make present? (lang | api | math | pgf | test | clean)?
-- usage: runghc Make present? (lang | api | math | pgf | test | demo | clean)?
-- With no argument, lang and api are done, in this order.
-- See 'make' below for what is done by which command.
@@ -38,6 +38,9 @@ langsMath = langsAPI
-- languages for which to run treebank test
langsTest = langsLang `except` ["Bul","Cat","Hin","Rus","Spa","Tha"]
-- languages for which to run demo test
langsDemo = langsLang `except` ["Bul","Hin","Ina","Rus","Tha"] ---- fix utf8 for Bul,Rus
-- languages for which langs.pgf is built
langsPGF = langsTest `only` ["Eng","Fre","Swe"]
@@ -70,6 +73,8 @@ make xx = do
" +RTS -K100M"
ifxx "test" $ do
gf treeb $ unwords [dir ++ "/Lang" ++ la ++ ".gfo" | (_,la) <- langsTest]
ifxx "demo" $ do
gf demos $ unwords ["demo/Demo" ++ la ++ ".gf" | (_,la) <- langsDemo]
ifxx "clean" $ do
system "rm */*.gfo ../alltenses/*.gfo ../present/*.gfo"
return ()
@@ -87,6 +92,8 @@ gf comm file = do
treeb = "rf -lines -tree -file=" ++ treebankExx ++
" | l -treebank | wf -file=" ++ treebankResults
demos = "gr -number=100 | l -treebank | ps -to_utf8 -to_html | wf -file=resdemo.html"
lang (lla,la) = lla ++ "/Lang" ++ la ++ ".gf"
try (lla,la) = "api/Try" ++ la ++ ".gf"
math (lla,la) = "mathematical/Mathematical" ++ la ++ ".gf"

View File

@@ -21,7 +21,7 @@ oper
Pl => case co of {
NCard Masc => "-cents" ;
NCard Fem => "-centes" ;
_ => variants {} } ;
_ => "-cents" ; ---- variants {} } ; ---- AR 23/6/2008
Sg => "cent"
} ;
cardOrd1 : CardOrd -> (_,_,_:Str) -> Str = \co,dos,dues,segon -> case co of {

View File

@@ -10,12 +10,12 @@ fun
QuestV : IP -> V -> QCl ;
QuestV2 : IP -> V2 -> NP -> QCl ;
QuestV2Slash : IP -> NP -> V2 -> QCl ;
-- QuestV2Slash : IP -> NP -> V2 -> QCl ;
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
ImpV : V -> Imp ;
ImpV2 : V2 -> NP -> Imp ;
-- ImpV2 : V2 -> NP -> Imp ;
}

View File

@@ -0,0 +1 @@
concrete ClauseCat of Clause = CatCat ** ClauseI with (Grammar = GrammarCat) ;

View File

@@ -0,0 +1 @@
concrete ClauseDan of Clause = CatDan ** ClauseI with (Grammar = GrammarDan) ;

View File

@@ -10,11 +10,11 @@ lin
QuestV np v = QuestVP np (UseV v) ;
QuestV2 s v o = QuestVP s (ComplSlash (SlashV2a v) o) ;
QuestV2Slash ip s v = QuestSlash ip (SlashVP s (SlashV2a v)) ;
-- QuestV2Slash ip s v = QuestSlash ip (SlashVP s (SlashV2a v)) ;
UseQCl = Grammar.UseQCl ;
ImpV v = ImpVP (UseV v) ;
ImpV2 v o = ImpVP (ComplSlash (SlashV2a v) o) ;
-- ImpV2 v o = ImpVP (ComplSlash (SlashV2a v) o) ;
}

View File

@@ -0,0 +1 @@
concrete ClauseNor of Clause = CatNor ** ClauseI with (Grammar = GrammarNor) ;

View File

@@ -0,0 +1 @@
concrete ClauseRus of Clause = CatRus ** ClauseI with (Grammar = GrammarRus) ;

View File

@@ -0,0 +1 @@
concrete ClauseSpa of Clause = CatSpa ** ClauseI with (Grammar = GrammarSpa) ;

View File

@@ -0,0 +1,23 @@
--# -path=.:alltenses
concrete DemoCat of Demo =
NounCat - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP],
-- VerbCat,
ClauseCat, --
AdjectiveCat - [SentAP],
AdverbCat,
NumeralCat,
---- SentenceCat,
---- QuestionCat,
---- RelativeCat,
---- ConjunctionCat,
---- PhraseCat,
---- TextX - [Tense,TPres,TPast,TFut,TCond],
---- IdiomCat,
StructuralCat,
LexiconCat
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,23 @@
--# -path=.:alltenses
concrete DemoDan of Demo =
NounDan - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP],
-- VerbDan,
ClauseDan, --
AdjectiveDan - [SentAP],
AdverbDan,
NumeralDan,
---- SentenceDan,
---- QuestionDan,
---- RelativeDan,
---- ConjunctionDan,
---- PhraseDan,
---- TextX - [Tense,TPres,TPast,TFut,TCond],
---- IdiomDan,
StructuralDan,
LexiconDan
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,23 @@
--# -path=.:alltenses
concrete DemoNor of Demo =
NounNor - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP],
-- VerbNor,
ClauseNor, --
AdjectiveNor - [SentAP],
AdverbNor,
NumeralNor,
---- SentenceNor,
---- QuestionNor,
---- RelativeNor,
---- ConjunctionNor,
---- PhraseNor,
---- TextX - [Tense,TPres,TPast,TFut,TCond],
---- IdiomNor,
StructuralNor,
LexiconNor
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,23 @@
--# -path=.:alltenses
concrete DemoRus of Demo =
NounRus - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP],
-- VerbRus,
ClauseRus, --
AdjectiveRus - [SentAP],
AdverbRus,
NumeralRus,
---- SentenceRus,
---- QuestionRus,
---- RelativeRus,
---- ConjunctionRus,
---- PhraseRus,
---- TextX - [Tense,TPres,TPast,TFut,TCond],
---- IdiomRus,
StructuralRus,
LexiconRus
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;

View File

@@ -0,0 +1,23 @@
--# -path=.:alltenses
concrete DemoSpa of Demo =
NounSpa - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP],
-- VerbSpa,
ClauseSpa, --
AdjectiveSpa - [SentAP],
AdverbSpa,
NumeralSpa,
---- SentenceSpa,
---- QuestionSpa,
---- RelativeSpa,
---- ConjunctionSpa,
---- PhraseSpa,
---- TextX - [Tense,TPres,TPast,TFut,TCond],
---- IdiomSpa,
StructuralSpa,
LexiconSpa
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
} ;