1
0
forked from GitHub/gf-rgl

documentation written; some weird constructors excluded from demo

This commit is contained in:
aarne
2008-06-27 14:14:01 +00:00
parent bc9dcae9a5
commit 97cf0b9dd2
19 changed files with 2661 additions and 35 deletions

View File

@@ -8,7 +8,8 @@ import System
-- - OPT = (lang | api | math | pgf | test | demo | clean) -- - OPT = (lang | api | math | pgf | test | demo | clean)
-- - LANGS has the form e.g. langs=Eng,Fin,Rus -- - LANGS has the form e.g. langs=Eng,Fin,Rus
-- - clone with a flag file=FILENAME clones the file to the specified languages, -- - clone with a flag file=FILENAME clones the file to the specified languages,
-- by replacing the 3-letter language name of the original in both the filename and the body -- by replacing the 3-letter language name of the original in both
-- the filename and the body
-- with each name in the list (default: all languages) -- with each name in the list (default: all languages)
-- With no argument, lang and api are done, in this order. -- With no argument, lang and api are done, in this order.
-- See 'make' below for what is done by which command. -- See 'make' below for what is done by which command.
@@ -39,7 +40,7 @@ langsCoding = [
langs = map fst langsCoding langs = map fst langsCoding
-- languagues for which to compile Lang -- languagues for which to compile Lang
langsLang = langs langsLang = langs `except` ["Ara"]
-- languages for which to compile Try -- languages for which to compile Try
langsAPI = langsLang `except` ["Ara","Bul","Cat","Hin","Ina","Rus","Tha"] langsAPI = langsLang `except` ["Ara","Bul","Cat","Hin","Ina","Rus","Tha"]
@@ -114,7 +115,7 @@ mathstack = " +RTS -K100M"
gf comm file = do gf comm file = do
putStrLn $ "reading " ++ file putStrLn $ "reading " ++ file
system $ "echo \"" ++ comm ++ "\" | gf3 -s " ++ file system $ "echo \"" ++ comm ++ "\" | gf -s " ++ file
treeb abstr ls = "rf -lines -tree -file=" ++ treebankExx ++ treeb abstr ls = "rf -lines -tree -file=" ++ treebankExx ++
" | l -treebank " ++ unlexer abstr ls ++ " | wf -file=" ++ treebankResults " | l -treebank " ++ unlexer abstr ls ++ " | wf -file=" ++ treebankResults

View File

@@ -74,7 +74,10 @@ oper
_ => <[],P2,False> _ => <[],P2,False>
} }
in case <paccp.p2, pdatp.p2> of { in case <paccp.p2, pdatp.p2> of {
<P3,P3> => <"se" ++ paccp.p1, [],True> ; ---- AR 8/6/2008 efficiency problem in pgf generation:
---- replace the case expr with
---- a constant produces an error in V3 predication with two pronouns
---- <P3,P3> => <"se" ++ paccp.p1, [],True> ;
_ => <pdatp.p1 ++ paccp.p1, [],orB paccp.p3 pdatp.p3> _ => <pdatp.p1 ++ paccp.p1, [],orB paccp.p3 pdatp.p3>
} ; } ;

View File

@@ -353,5 +353,8 @@ lin
wipe_V2 = dirV2 (verbV (pregar_86 "eixugar")) ; wipe_V2 = dirV2 (verbV (pregar_86 "eixugar")) ;
breathe_V = regV "respirar" ; breathe_V = regV "respirar" ;
-- --
john_PN = mkPN "Joan" masculine ;
today_Adv = mkAdv "hui" ;
} ; } ;

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoBul of Demo = concrete DemoBul of Demo =
NounBul - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounBul - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbBul, -- VerbBul,
ClauseBul, -- ClauseBul, --
AdjectiveBul - [SentAP], AdjectiveBul - [SentAP,ComplA2,UseA2,DemoA2],
AdverbBul, AdverbBul,
NumeralBul, NumeralBul,
---- SentenceBul, ---- SentenceBul,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoCat of Demo = concrete DemoCat of Demo =
NounCat - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounCat - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbCat, -- VerbCat,
ClauseCat, -- ClauseCat, --
AdjectiveCat - [SentAP], AdjectiveCat - [SentAP,ComplA2,UseA2,DemoA2],
AdverbCat, AdverbCat,
NumeralCat, NumeralCat,
---- SentenceCat, ---- SentenceCat,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoDan of Demo = concrete DemoDan of Demo =
NounDan - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounDan - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbDan, -- VerbDan,
ClauseDan, -- ClauseDan, --
AdjectiveDan - [SentAP], AdjectiveDan - [SentAP,ComplA2,UseA2,DemoA2],
AdverbDan, AdverbDan,
NumeralDan, NumeralDan,
---- SentenceDan, ---- SentenceDan,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoEng of Demo = concrete DemoEng of Demo =
NounEng - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounEng - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbEng, -- VerbEng,
ClauseEng, -- ClauseEng, --
AdjectiveEng - [SentAP], AdjectiveEng - [SentAP,ComplA2,UseA2,DemoA2],
AdverbEng, AdverbEng,
NumeralEng, NumeralEng,
---- SentenceEng, ---- SentenceEng,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoFin of Demo = concrete DemoFin of Demo =
NounFin - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounFin - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbFin, -- VerbFin,
ClauseFin, -- ClauseFin, --
AdjectiveFin - [SentAP], AdjectiveFin - [SentAP,ComplA2,UseA2,DemoA2],
AdverbFin, AdverbFin,
NumeralFin, NumeralFin,
---- SentenceFin, ---- SentenceFin,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoFre of Demo = concrete DemoFre of Demo =
NounFre - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounFre - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbFre, -- VerbFre,
ClauseFre, -- ClauseFre, --
AdjectiveFre - [SentAP], AdjectiveFre - [SentAP,ComplA2,UseA2,DemoA2],
AdverbFre, AdverbFre,
NumeralFre, NumeralFre,
---- SentenceFre, ---- SentenceFre,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoGer of Demo = concrete DemoGer of Demo =
NounGer - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounGer - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbGer, -- VerbGer,
ClauseGer, -- ClauseGer, --
AdjectiveGer - [SentAP], AdjectiveGer - [SentAP,ComplA2,UseA2,DemoA2],
AdverbGer, AdverbGer,
NumeralGer, NumeralGer,
---- SentenceGer, ---- SentenceGer,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoIta of Demo = concrete DemoIta of Demo =
NounIta - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounIta - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbIta, -- VerbIta,
ClauseIta, -- ClauseIta, --
AdjectiveIta - [SentAP], AdjectiveIta - [SentAP,ComplA2,UseA2,DemoA2],
AdverbIta, AdverbIta,
NumeralIta, NumeralIta,
---- SentenceIta, ---- SentenceIta,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoNor of Demo = concrete DemoNor of Demo =
NounNor - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounNor - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbNor, -- VerbNor,
ClauseNor, -- ClauseNor, --
AdjectiveNor - [SentAP], AdjectiveNor - [SentAP,ComplA2,UseA2,DemoA2],
AdverbNor, AdverbNor,
NumeralNor, NumeralNor,
---- SentenceNor, ---- SentenceNor,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoRus of Demo = concrete DemoRus of Demo =
NounRus - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounRus - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbRus, -- VerbRus,
ClauseRus, -- ClauseRus, --
AdjectiveRus - [SentAP], AdjectiveRus - [SentAP,ComplA2,UseA2,DemoA2],
AdverbRus, AdverbRus,
NumeralRus, NumeralRus,
---- SentenceRus, ---- SentenceRus,
@@ -18,6 +19,6 @@ concrete DemoRus of Demo =
LexiconRus LexiconRus
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ; flags startcat = Phr ; unlexer = text ; lexer = text ;
} ; } ;

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoSpa of Demo = concrete DemoSpa of Demo =
NounSpa - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounSpa - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbSpa, -- VerbSpa,
ClauseSpa, -- ClauseSpa, --
AdjectiveSpa - [SentAP], AdjectiveSpa - [SentAP,ComplA2,UseA2,DemoA2],
AdverbSpa, AdverbSpa,
NumeralSpa, NumeralSpa,
---- SentenceSpa, ---- SentenceSpa,

View File

@@ -1,10 +1,11 @@
--# -path=.:alltenses --# -path=.:alltenses
concrete DemoSwe of Demo = concrete DemoSwe of Demo =
NounSwe - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,ApposCN,MassNP,DetNP], NounSwe - [AdvCN,PredetNP,PPartNP,RelNP,RelCN,SentCN,
ApposCN,MassNP,DetNP,ComplN3,Use2N3,Use3N3,AdvNP],
-- VerbSwe, -- VerbSwe,
ClauseSwe, -- ClauseSwe, --
AdjectiveSwe - [SentAP], AdjectiveSwe - [SentAP,ComplA2,UseA2,DemoA2],
AdverbSwe, AdverbSwe,
NumeralSwe, NumeralSwe,
---- SentenceSwe, ---- SentenceSwe,

2603
resource/doc/resdemo.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ resource PhonoFre = open Prelude in {
oper oper
voyelle : Strs = strs { voyelle : Strs = strs {
"a" ; "à" ; "â " ; "e" ; "é" ; "è" ; "ê¨" ; "a" ; "à" ; "â" ; "e" ; "é" ; "è" ; "ê¨" ;
"h" ; "h" ;
"i" ; "î" ; "o" ; "ô" ; "u" ; "û" ; "y" "i" ; "î" ; "o" ; "ô" ; "u" ; "û" ; "y"
} ; } ;

View File

@@ -72,12 +72,13 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
} ; } ;
defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3> defaultPronArg = <pdatp.p1 ++ paccp.p1, [], orB paccp.p3 pdatp.p3>
in in
case <<paccp.p2, pdatp.p2> : Person * Person> of { ---- case <<paccp.p2, pdatp.p2> : Person * Person> of {
<P3,P3> => <"se" ++ paccp.p1, [], True> ; ---- <P3,P3> => <"se" ++ paccp.p1, [], True> ;
_ => defaultPronArg ---- _ => defaultPronArg
} ; --- } ;
---- 8/6/2008 efficiency problem in pgf generation: replace the case expr with ---- 8/6/2008 efficiency problem in pgf generation: replace the case expr with
---- defaultPronArg ; ---- a constant produces an error in V3 predication with two pronouns
defaultPronArg ;
mkImperative b p vp = { mkImperative b p vp = {
s = \\pol,aag => s = \\pol,aag =>

View File

@@ -348,6 +348,9 @@ lin
wipe_V2 = dirV2 (regV "secar") ; wipe_V2 = dirV2 (regV "secar") ;
breathe_V = (regV "respirar") ; breathe_V = (regV "respirar") ;
john_PN = mkPN "Juan" masculine ;
today_Adv = mkAdv "hoy" ;
grammar_N = regN "gramática" ; grammar_N = regN "gramática" ;
language_N = regN "lengua" ; language_N = regN "lengua" ;
rule_N = regN "regla" ; rule_N = regN "regla" ;