mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
preserve 1.0
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
--1 Test lexicon
|
||||
|
||||
-- This lexicon is used when developing a grammar, and called by
|
||||
-- [Test Test.html]. The full lexicon is divided between
|
||||
-- [Structural Structural.html], [Lexicon Lexicon.html], and [Numeral Numeral.html].
|
||||
|
||||
abstract Lex = Cat ** {
|
||||
|
||||
-- Words of open classes
|
||||
|
||||
fun
|
||||
walk_V : V ;
|
||||
help_V2 : V2 ;
|
||||
show_V3 : V3 ;
|
||||
want_VV : VV ;
|
||||
claim_VS : VS ;
|
||||
ask_VQ : VQ ;
|
||||
|
||||
dog_N : N ;
|
||||
son_N2 : N2 ;
|
||||
way_N3 : N3 ;
|
||||
|
||||
warm_A : A ;
|
||||
close_A2 : A2 ;
|
||||
|
||||
-- Structural words
|
||||
|
||||
|
||||
only_Predet, all_Predet : Predet ;
|
||||
|
||||
this_Quant : QuantSg ;
|
||||
these_Quant : QuantPl ;
|
||||
|
||||
i_Pron, he_Pron, we_Pron : Pron ;
|
||||
|
||||
whoSg_IP, whoPl_IP : IP ;
|
||||
|
||||
when_IAdv, where_IAdv, why_IAdv : IAdv ;
|
||||
|
||||
whichSg_IDet, whichPl_IDet : IDet ;
|
||||
|
||||
here_Adv : Adv ;
|
||||
|
||||
very_AdA : AdA ;
|
||||
|
||||
always_AdV : AdV ;
|
||||
|
||||
forty_Numeral : Numeral ;
|
||||
|
||||
in_Prep, of_Prep : Prep ;
|
||||
|
||||
and_Conj : Conj ;
|
||||
either7or_DConj : DConj ;
|
||||
|
||||
but_PConj : PConj ;
|
||||
|
||||
if_Subj, because_Subj : Subj ;
|
||||
|
||||
please_Voc : Voc ;
|
||||
|
||||
more_CAdv, less_CAdv : CAdv ;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
concrete LexEng of Lex = CatEng ** open ResEng, Prelude in {
|
||||
|
||||
lin
|
||||
walk_V = regV "walk" ;
|
||||
help_V2 = regV "help" ** {c2 = []} ;
|
||||
show_V3 = regV "show" ** {c2 = [] ; c3 = "to"} ;
|
||||
want_VV = regV "want" ** {c2 = "to"} ;
|
||||
claim_VS = regV "claim" ;
|
||||
ask_VQ = regV "ask" ;
|
||||
|
||||
dog_N = regN "dog" ;
|
||||
son_N2 = regN "son" ** {c2 = "of"} ;
|
||||
way_N3 = regN "way" ** {c2 = "from" ; c3 = "to"} ;
|
||||
|
||||
warm_A = regA "warm" ;
|
||||
close_A2 = regA "close" ** {c2 = "to"} ;
|
||||
|
||||
here_Adv = {s = "here"} ;
|
||||
very_AdA = {s = "very"} ;
|
||||
always_AdV = {s = "always"} ;
|
||||
|
||||
only_Predet = {s = "only"} ;
|
||||
all_Predet = {s = "all"} ;
|
||||
this_Quant = {s = "this" ; n = Sg} ;
|
||||
these_Quant = {s = "these" ; n = Pl} ;
|
||||
|
||||
i_Pron = mkNP "I" "me" "my" Sg P1 ;
|
||||
he_Pron = mkNP "he" "him" "his" Sg P3 ;
|
||||
we_Pron = mkNP "we" "us" "our" Pl P1 ;
|
||||
|
||||
whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
||||
whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
||||
|
||||
when_IAdv = {s = "when"} ;
|
||||
where_IAdv = {s = "where"} ;
|
||||
why_IAdv = {s = "why"} ;
|
||||
|
||||
whichSg_IDet = {s = "which" ; n = Sg} ;
|
||||
whichPl_IDet = {s = "which" ; n = Pl} ;
|
||||
|
||||
forty_Numeral = {s = table {NCard => "forty" ; NOrd => "fortieth"} ; n = Pl} ;
|
||||
|
||||
in_Prep = {s = "in"} ;
|
||||
of_Prep = {s = "of"} ;
|
||||
|
||||
and_Conj = {s = "and" ; n = Pl} ;
|
||||
either7or_DConj = {s1 = "either" ; s2 = "or" ; n = Sg} ;
|
||||
|
||||
if_Subj = ss "if" ;
|
||||
because_Subj = ss "because" ;
|
||||
|
||||
but_PConj = {s = "but"} ;
|
||||
|
||||
please_Voc = {s = "," ++ "please"} ;
|
||||
|
||||
more_CAdv = ss "more" ;
|
||||
less_CAdv = ss "less" ;
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
concrete LexFre of Lex = CatFre ** open ResFre, Prelude in {
|
||||
|
||||
lin
|
||||
walk_V =
|
||||
mkVerb "gå" "går" "gå" "gick" "gått" "gången" "gånget" "gångna" ;
|
||||
help_V2 =
|
||||
mkVerb "hjälpa" "hjälper" "hjälp" "hjälpte" "hjälpt" "hjälpt" "hjälpt" "hjälpta"
|
||||
** {c2 = []} ;
|
||||
show_V3 =
|
||||
mkVerb "visa" "visar" "visa" "visade" "visat" "visad" "visat" "visade"
|
||||
** {c2 = [] ; c3 = "to"} ;
|
||||
want_VV =
|
||||
mkVerb "vilja" "vill" "vilj" "ville" "velat" "velad" "velat" "velade" ---
|
||||
** {c2 = []} ;
|
||||
claim_VS =
|
||||
mkVerb "hävda" "hävdar" "hävda" "hävdade" "hävdat" "hävdad" "hävdat" "hävdade" ;
|
||||
ask_VQ =
|
||||
mkVerb "fråga" "frågar" "fråga" "frågade" "frågat" "frågad" "frågat" "frågade" ;
|
||||
|
||||
dog_N = mkNoun "hund" "hunden" "hundar" "hundarna" utrum ;
|
||||
son_N2 = mkNoun "son" "sonen" "söner" "sönerna" utrum ** {c2 = "till"} ;
|
||||
way_N3 = mkNoun "väg" "vägen" "vägar" "vägarna" utrum ** {c2 = "från" ; c3 = "till"} ;
|
||||
|
||||
warm_A =
|
||||
mkAdjective "varm" "varmt" "varma" "varma" "varmare" "varmast" "varmaste" ;
|
||||
close_A2 =
|
||||
mkAdjective "nära" "nära" "nära" "nära" "närmare" "närmast" "närmaste"
|
||||
** {c2 = "till"} ;
|
||||
|
||||
here_Adv = {s = "här"} ;
|
||||
very_AdA = {s = "mycket"} ;
|
||||
always_AdV = {s = "alltid"} ;
|
||||
|
||||
only_Predet = {s = \\_ => "bara"} ;
|
||||
all_Predet = {s = gennumForms "all" "allt" "alla"} ;
|
||||
this_Quant = {s = \\_ => genderForms "denna" "detta" ; n = Sg ; det = DDef Indef} ;
|
||||
these_Quant = {s = \\_,_ => "dessa" ; n = Pl ; det = DDef Indef} ;
|
||||
|
||||
i_Pron = mkNP "jag" "mig" "min" "mitt" "mina" SgUtr P1 ;
|
||||
he_Pron = mkNP "han" "honom" "hans" "hans" "hans" SgUtr P3 ;
|
||||
we_Pron = mkNP "vi" "oss" "vår" "vårt" "våra" Plg P1 ;
|
||||
|
||||
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
||||
whoPl_IP = {s = vem.s ; gn = Plg} ;
|
||||
|
||||
when_IAdv = {s = "när"} ;
|
||||
where_IAdv = {s = "var"} ;
|
||||
why_IAdv = {s = "varför"} ;
|
||||
|
||||
whichSg_IDet = {s = genderForms "vilken" "vilket" ; n = Sg ; det = DDef Indef} ;
|
||||
whichPl_IDet = {s = \\_ => "vilka" ; n = Pl ; det = DDef Indef} ;
|
||||
|
||||
forty_Numeral = {
|
||||
s = table {
|
||||
NCard _ => "fyrtio" ;
|
||||
NOrd _ => "fyrtionde"
|
||||
} ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
in_Prep = {s = "i"} ;
|
||||
of_Prep = {s = "av"} ;
|
||||
|
||||
and_Conj = {s = "och" ; n = Pl} ;
|
||||
either7or_DConj = {s1 = "antingen" ; s2 = "eller" ; n = Sg} ;
|
||||
|
||||
if_Subj = ss "om" ;
|
||||
because_Subj = ss "eftersom" ;
|
||||
|
||||
but_PConj = {s = "men"} ;
|
||||
|
||||
please_Voc = {s = "," ++ "tack"} ;
|
||||
|
||||
more_CAdv = ss "mera" ;
|
||||
less_CAdv = ss "mindre" ;
|
||||
|
||||
-- Auxiliaries that are used repeatedly.
|
||||
|
||||
oper
|
||||
vem = mkNP "vem" "vem" "vems" "vems" "vems" SgUtr P3 ;
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
concrete LexGer of Lex = CatGer ** open ResGer, Prelude in {
|
||||
|
||||
flags optimize = values ;
|
||||
|
||||
lin
|
||||
walk_V =
|
||||
mkV
|
||||
"gehen" "gehe" "gehst" "geht" "geht" "geh"
|
||||
"ging" "gingst" "gingt" "gingen"
|
||||
"ginge" "gegangen" "aus" VSein ;
|
||||
help_V2 =
|
||||
mkV
|
||||
"helfen" "helfe" "hilfst" "hilft" "helft" "hilf"
|
||||
"half" "halfst" "halft" "halfen"
|
||||
"hälfe" "geholfen" [] VHaben **
|
||||
{c2 = {s = [] ; c = Dat}} ;
|
||||
show_V3 =
|
||||
regV "zeigen" **
|
||||
{c2 = {s = [] ; c = Acc} ; c3 = {s = [] ; c = Dat}} ;
|
||||
want_VV = auxVV
|
||||
(mkV
|
||||
"wollen" "will" "willst" "will" "wollt" "woll"
|
||||
"wollte" "wolltest" "wollten" "wolltet"
|
||||
"wollte" "gewollen" []
|
||||
VHaben) ;
|
||||
claim_VS =
|
||||
mkV
|
||||
"behaupten" "behaupte" "bahauptest" "behauptet" "behauptet" "behaupte"
|
||||
"behauptete" "behauptetest" "behauptetet" "behaupteten"
|
||||
"behauptete" "behauptet" [] VHaben ;
|
||||
ask_VQ =
|
||||
regV "fragen" ;
|
||||
|
||||
dog_N = mkN4 "Hund" "Hundes" "Hunde" "Hunden" Masc ;
|
||||
son_N2 = mkN4 "Sohn" "Sohnes" "Söhne" "Söhnen" Masc **
|
||||
{c2 = {s = "von" ; c = Dat}} ;
|
||||
way_N3 = mkN4 "Weg" "Weges" "Wege" "Wegen" Masc **
|
||||
{c2 = {s = "von" ; c = Dat} ; c3 = {s = "nach" ; c = Dat}} ;
|
||||
|
||||
warm_A = mkA "warm" "warm" "wärmer" "wärmst" ;
|
||||
close_A2 = regA "eng" ** {c2 = {s = "bei" ; c = Dat}} ;
|
||||
|
||||
here_Adv = {s = "hier"} ;
|
||||
very_AdA = {s = "sehr"} ;
|
||||
always_AdV = {s = "immer"} ;
|
||||
|
||||
only_Predet = {s = \\_,_,_ => "nur"} ;
|
||||
all_Predet = {s = appAdj (regA "all")} ;
|
||||
this_Quant = {s = appAdj (regA "dies") ! Sg ; n = Sg ; a = Weak} ;
|
||||
these_Quant = {s = appAdj (regA "dies") ! Pl ; n = Pl ; a = Weak} ;
|
||||
|
||||
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Sg P1 ;
|
||||
he_Pron = mkPronPers "er" "ihn" "ihm" "seiner" "sein" Sg P3 ;
|
||||
we_Pron = mkPronPers "wir" "uns" "uns" "unser" "unser" Pl P1 ;
|
||||
|
||||
whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ;
|
||||
whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Pl} ;
|
||||
|
||||
when_IAdv = {s = "wann"} ;
|
||||
where_IAdv = {s = "wo"} ;
|
||||
why_IAdv = {s = "warum"} ;
|
||||
|
||||
whichSg_IDet = {s = appAdj (regA "welch") ! Sg ; n = Sg} ;
|
||||
whichPl_IDet = {s = appAdj (regA "welch") ! Sg ; n = Pl} ;
|
||||
|
||||
-- one_Numeral = {s = table {NCard => "one" ; NOrd => "first"} ; n = Sg} ;
|
||||
forty_Numeral = {
|
||||
s = table {
|
||||
NCard => "vierzig" ;
|
||||
NOrd af => (regA "vierzigt").s ! Posit ! af
|
||||
} ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
in_Prep = {s = "in" ; c = Dat} ;
|
||||
of_Prep = {s = "von" ; c = Dat} ;
|
||||
|
||||
and_Conj = {s = "und" ; n = Pl} ;
|
||||
either7or_DConj = {s1 = "entweder" ; s2 = "oder" ; n = Sg} ;
|
||||
|
||||
if_Subj = ss "wenn" ;
|
||||
because_Subj = ss "weil" ;
|
||||
|
||||
but_PConj = {s = "aber"} ;
|
||||
|
||||
please_Voc = {s = "," ++ "bitte"} ;
|
||||
|
||||
more_CAdv = ss "mehr" ;
|
||||
less_CAdv = ss "weniger" ;
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
concrete LexSwe of Lex = CatSwe ** open ResSwe, Prelude in {
|
||||
|
||||
lin
|
||||
walk_V =
|
||||
mkVerb "gå" "går" "gå" "gick" "gått" "gången" "gånget" "gångna" ;
|
||||
help_V2 =
|
||||
mkVerb "hjälpa" "hjälper" "hjälp" "hjälpte" "hjälpt" "hjälpt" "hjälpt" "hjälpta"
|
||||
** {c2 = []} ;
|
||||
show_V3 =
|
||||
mkVerb "visa" "visar" "visa" "visade" "visat" "visad" "visat" "visade"
|
||||
** {c2 = [] ; c3 = "to"} ;
|
||||
want_VV =
|
||||
mkVerb "vilja" "vill" "vilj" "ville" "velat" "velad" "velat" "velade" ---
|
||||
** {c2 = []} ;
|
||||
claim_VS =
|
||||
mkVerb "hävda" "hävdar" "hävda" "hävdade" "hävdat" "hävdad" "hävdat" "hävdade" ;
|
||||
ask_VQ =
|
||||
mkVerb "fråga" "frågar" "fråga" "frågade" "frågat" "frågad" "frågat" "frågade" ;
|
||||
|
||||
dog_N = mkNoun "hund" "hunden" "hundar" "hundarna" utrum ;
|
||||
son_N2 = mkNoun "son" "sonen" "söner" "sönerna" utrum ** {c2 = "till"} ;
|
||||
way_N3 = mkNoun "väg" "vägen" "vägar" "vägarna" utrum ** {c2 = "från" ; c3 = "till"} ;
|
||||
|
||||
warm_A =
|
||||
mkAdjective "varm" "varmt" "varma" "varma" "varmare" "varmast" "varmaste" ;
|
||||
close_A2 =
|
||||
mkAdjective "nära" "nära" "nära" "nära" "närmare" "närmast" "närmaste"
|
||||
** {c2 = "till"} ;
|
||||
|
||||
here_Adv = {s = "här"} ;
|
||||
very_AdA = {s = "mycket"} ;
|
||||
always_AdV = {s = "alltid"} ;
|
||||
|
||||
only_Predet = {s = \\_ => "bara"} ;
|
||||
all_Predet = {s = gennumForms "all" "allt" "alla"} ;
|
||||
this_Quant = {s = \\_ => genderForms "denna" "detta" ; n = Sg ; det = DDef Indef} ;
|
||||
these_Quant = {s = \\_,_ => "dessa" ; n = Pl ; det = DDef Indef} ;
|
||||
|
||||
i_Pron = mkNP "jag" "mig" "min" "mitt" "mina" SgUtr P1 ;
|
||||
he_Pron = mkNP "han" "honom" "hans" "hans" "hans" SgUtr P3 ;
|
||||
we_Pron = mkNP "vi" "oss" "vår" "vårt" "våra" Plg P1 ;
|
||||
|
||||
whoSg_IP = {s = vem.s ; gn = SgUtr} ;
|
||||
whoPl_IP = {s = vem.s ; gn = Plg} ;
|
||||
|
||||
when_IAdv = {s = "när"} ;
|
||||
where_IAdv = {s = "var"} ;
|
||||
why_IAdv = {s = "varför"} ;
|
||||
|
||||
whichSg_IDet = {s = genderForms "vilken" "vilket" ; n = Sg ; det = DDef Indef} ;
|
||||
whichPl_IDet = {s = \\_ => "vilka" ; n = Pl ; det = DDef Indef} ;
|
||||
|
||||
forty_Numeral = {
|
||||
s = table {
|
||||
NCard _ => "fyrtio" ;
|
||||
NOrd _ => "fyrtionde"
|
||||
} ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
in_Prep = {s = "i"} ;
|
||||
of_Prep = {s = "av"} ;
|
||||
|
||||
and_Conj = {s = "och" ; n = Pl} ;
|
||||
either7or_DConj = {s1 = "antingen" ; s2 = "eller" ; n = Sg} ;
|
||||
|
||||
if_Subj = ss "om" ;
|
||||
because_Subj = ss "eftersom" ;
|
||||
|
||||
but_PConj = {s = "men"} ;
|
||||
|
||||
please_Voc = {s = "," ++ "tack"} ;
|
||||
|
||||
more_CAdv = ss "mera" ;
|
||||
less_CAdv = ss "mindre" ;
|
||||
|
||||
-- Auxiliaries that are used repeatedly.
|
||||
|
||||
oper
|
||||
vem = mkNP "vem" "vem" "vems" "vems" "vems" SgUtr P3 ;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
--1 Conjunctions of left-recursive lists
|
||||
|
||||
abstract SeqConjunction = Cat ** {
|
||||
|
||||
-- This module is for backward compatibility with API 0.9.
|
||||
-- To be used instead of [Conjunction Conjunction.html].
|
||||
|
||||
fun
|
||||
|
||||
ConjS : Conj -> SeqS -> S ; -- "John walks and Mary runs"
|
||||
ConjAP : Conj -> SeqAP -> AP ; -- "even and prime"
|
||||
ConjNP : Conj -> SeqNP -> NP ; -- "John or Mary"
|
||||
ConjAdv : Conj -> SeqAdv -> Adv ; -- "quickly or slowly"
|
||||
|
||||
DConjS : DConj -> SeqS -> S ; -- "either John walks or Mary runs"
|
||||
DConjAP : DConj -> SeqAP -> AP ; -- "both even and prime"
|
||||
DConjNP : DConj -> SeqNP -> NP ; -- "either John or Mary"
|
||||
DConjAdv : DConj -> SeqAdv -> Adv ; -- "both badly and slowly"
|
||||
|
||||
|
||||
-- these are rather uninteresting
|
||||
|
||||
TwoS : S -> S -> SeqS ;
|
||||
AddS : SeqS -> S -> SeqS ;
|
||||
TwoAdv : Adv -> Adv -> SeqAdv ;
|
||||
AddAdv : SeqAdv -> Adv -> SeqAdv ;
|
||||
TwoNP : NP -> NP -> SeqNP ;
|
||||
AddNP : SeqNP -> NP -> SeqNP ;
|
||||
TwoAP : AP -> AP -> SeqAP ;
|
||||
AddAP : SeqAP -> AP -> SeqAP ;
|
||||
|
||||
-- we use right-associative lists instead of GF's built-in lists
|
||||
|
||||
cat
|
||||
SeqS ;
|
||||
SeqAdv ;
|
||||
SeqNP ;
|
||||
SeqAP ;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
concrete SeqConjunctionEng of Conjunction =
|
||||
CatEng ** open ResEng, Coordination, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
ConjS conj ss = {s = conjunctX conj ss} ;
|
||||
DConjS conj ss = {s = conjunctDistrX conj ss} ;
|
||||
|
||||
ConjAdv conj ss = {s = conjunctX conj ss} ;
|
||||
DConjAdv conj ss = {s = conjunctDistrX conj ss} ;
|
||||
|
||||
ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
} ;
|
||||
DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctTable Agr conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
DConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
TwoS = twoSS ;
|
||||
AddS = consSS comma ;
|
||||
TwoAdv = twoSS ;
|
||||
AddAdv = consSS comma ;
|
||||
TwoNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
||||
AddNP xs x = consTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
TwoAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
AddAP xs x = consTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
|
||||
lincat
|
||||
SeqS = {s1,s2 : Str} ;
|
||||
SeqAdv = {s1,s2 : Str} ;
|
||||
SeqNP = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
SeqAP = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
--concrete SeqConjunctionGer of Conjunction =
|
||||
-- CatGer ** open ResGer, Coordination, Prelude in {
|
||||
--
|
||||
-- lin
|
||||
--
|
||||
-- ConjS conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjS conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjAdv conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjAdv conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
-- DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
--
|
||||
-- ConjAP conj ss = conjunctTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
--
|
||||
-- TwoS = twoSS ;
|
||||
-- AddS = consSS comma ;
|
||||
-- TwoAdv = twoSS ;
|
||||
-- AddAdv = consSS comma ;
|
||||
-- TwoNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
||||
-- AddNP xs x = consTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
-- TwoAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
-- AddAP xs x = consTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
--
|
||||
-- lincat
|
||||
-- SeqS = {s1,s2 : Str} ;
|
||||
-- SeqAdv = {s1,s2 : Str} ;
|
||||
-- SeqNP = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
-- SeqAP = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
--
|
||||
--}
|
||||
@@ -1,41 +0,0 @@
|
||||
--concrete SeqConjunctionRomance of Conjunction =
|
||||
-- CatRomance ** open ResRomance, Coordination, Prelude in {
|
||||
--
|
||||
-- lin
|
||||
--
|
||||
-- ConjS conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjS conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjAdv conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjAdv conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
-- DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
--
|
||||
-- ConjAP conj ss = conjunctTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
--
|
||||
-- TwoS = twoSS ;
|
||||
-- AddS = consSS comma ;
|
||||
-- TwoAdv = twoSS ;
|
||||
-- AddAdv = consSS comma ;
|
||||
-- TwoNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
||||
-- AddNP xs x = consTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
-- TwoAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
-- AddAP xs x = consTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
--
|
||||
-- lincat
|
||||
-- SeqS = {s1,s2 : Str} ;
|
||||
-- SeqAdv = {s1,s2 : Str} ;
|
||||
-- SeqNP = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
-- SeqAP = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
--
|
||||
--}
|
||||
@@ -1,41 +0,0 @@
|
||||
--concrete SeqConjunctionScand of Conjunction =
|
||||
-- CatScand ** open ResScand, Coordination, Prelude in {
|
||||
--
|
||||
-- lin
|
||||
--
|
||||
-- ConjS conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjS conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjAdv conj ss = {s = conjunctX conj ss} ;
|
||||
-- DConjAdv conj ss = {s = conjunctDistrX conj ss} ;
|
||||
--
|
||||
-- ConjNP conj ss = conjunctTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
-- DConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||
-- a = {n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
-- } ;
|
||||
--
|
||||
-- ConjAP conj ss = conjunctTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
-- DConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
||||
-- isPre = ss.isPre
|
||||
-- } ;
|
||||
--
|
||||
-- TwoS = twoSS ;
|
||||
-- AddS = consSS comma ;
|
||||
-- TwoAdv = twoSS ;
|
||||
-- AddAdv = consSS comma ;
|
||||
-- TwoNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
||||
-- AddNP xs x = consTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
-- TwoAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
-- AddAP xs x = consTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
--
|
||||
-- lincat
|
||||
-- SeqS = {s1,s2 : Str} ;
|
||||
-- SeqAdv = {s1,s2 : Str} ;
|
||||
-- SeqNP = {s1,s2 : Case => Str ; a : Agr} ;
|
||||
-- SeqAP = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
||||
--
|
||||
--}
|
||||
@@ -1,23 +0,0 @@
|
||||
--1 Tense, Polarity, and Anteriority
|
||||
|
||||
-- This module defines the abstract parameters of tense, polarity, and
|
||||
-- anteriority, which are used in [Tensed Tensed.html] to generate different
|
||||
-- forms of sentences. Together they give 2 x 4 x 4 = 16 sentence forms.
|
||||
|
||||
-- These tenses are defined for all languages in the library. More tenses
|
||||
-- can be defined in the language extensions, e.g. the "passé simple" of
|
||||
-- Romance languages.
|
||||
|
||||
abstract Tense = {
|
||||
|
||||
cat
|
||||
Pol ;
|
||||
Tense ;
|
||||
Ant ;
|
||||
|
||||
fun
|
||||
PPos, PNeg : Pol ; -- I sleep/don't sleep
|
||||
TPres, TPast, TFut, TCond : Tense ; -- I sleep/slept/will sleep/would sleep
|
||||
ASimul, AAnter : Ant ; -- I sleep/have slept
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
--1 Tensed forms of sentences, questions, and relative clauses
|
||||
|
||||
-- This module defines the 2 x 4 x 4 = 16 forms generated by different
|
||||
-- combinations of tense, polarity, and
|
||||
-- anteriority, which are defined in [Tense Tense.html].
|
||||
-- A variant with just the polarity variation is given in
|
||||
-- [Untensed Untensed.html].
|
||||
|
||||
abstract Tensed = Cat ** {
|
||||
|
||||
fun
|
||||
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||
|
||||
}
|
||||
|
||||
-- Examples for English $S$:
|
||||
{-
|
||||
Pres Simul Pos ODir : he sleeps
|
||||
Pres Simul Neg ODir : he doesn't sleep
|
||||
Pres Anter Pos ODir : he has slept
|
||||
Pres Anter Neg ODir : he hasn't slept
|
||||
Past Simul Pos ODir : he slept
|
||||
Past Simul Neg ODir : he didn't sleep
|
||||
Past Anter Pos ODir : he had slept
|
||||
Past Anter Neg ODir : he hadn't slept
|
||||
Fut Simul Pos ODir : he will sleep
|
||||
Fut Simul Neg ODir : he won't sleep
|
||||
Fut Anter Pos ODir : he will have slept
|
||||
Fut Anter Neg ODir : he won't have slept
|
||||
Cond Simul Pos ODir : he would sleep
|
||||
Cond Simul Neg ODir : he wouldn't sleep
|
||||
Cond Anter Pos ODir : he would have slept
|
||||
Cond Anter Neg ODir : he wouldn't have slept
|
||||
-}
|
||||
@@ -1,10 +0,0 @@
|
||||
concrete TensedEng of Tensed = CatEng ** open ResEng in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseCl t a p cl = {s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! ODir} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete TensedFre of Tensed = CatFre ** TensedRomance with
|
||||
(ResRomance = ResFre) ;
|
||||
@@ -1,10 +0,0 @@
|
||||
concrete TensedGer of Tensed = CatGer, TenseX ** open ResGer in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
incomplete concrete TensedRomance of Tensed = CatRomance **
|
||||
open ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
UseRCl t a p cl =
|
||||
{s = \\r,ag => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ! ag} ;
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
incomplete concrete TensedScand of Tensed = CatScand, TenseX **
|
||||
open ResScand in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
UseRCl t a p cl = {s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r} ;
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete TensedSwe of Tensed = CatSwe, TenseX ** TensedScand with
|
||||
(ResScand = ResSwe) ;
|
||||
@@ -1,26 +0,0 @@
|
||||
--1 The Reduced Top Module of the Resource Grammar
|
||||
|
||||
-- This grammar is just a collection of the different modules,
|
||||
-- and one that can be imported when one wants to test a reduced version
|
||||
-- of the grammar. The complete top module is [Lang Lang.html].
|
||||
|
||||
-- The main constructs missing are tenses of sentences, numerals, and
|
||||
-- comprehensive lexicon.
|
||||
|
||||
abstract Test =
|
||||
Noun,
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Untensed,
|
||||
-- Tensed,
|
||||
-- Structural,
|
||||
-- Lexicon,
|
||||
-- Numeral,
|
||||
Lex
|
||||
** {} ;
|
||||
@@ -1,21 +0,0 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete TestEng of Test =
|
||||
NounEng,
|
||||
VerbEng,
|
||||
AdjectiveEng,
|
||||
AdverbEng,
|
||||
-- NumeralEng,
|
||||
SentenceEng,
|
||||
QuestionEng,
|
||||
RelativeEng,
|
||||
ConjunctionEng,
|
||||
PhraseEng,
|
||||
UntensedEng,
|
||||
-- TensedEng,
|
||||
LexEng
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
} ;
|
||||
@@ -1,21 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete TestFre of Test =
|
||||
NounFre,
|
||||
VerbFre,
|
||||
AdjectiveFre,
|
||||
AdverbFre,
|
||||
-- -- NumeralFre,
|
||||
SentenceFre,
|
||||
QuestionFre,
|
||||
RelativeFre,
|
||||
ConjunctionFre,
|
||||
PhraseFre,
|
||||
UntensedFre,
|
||||
-- -- TensedFre,
|
||||
LexFre
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
} ;
|
||||
@@ -1,19 +0,0 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete TestGer of Test =
|
||||
NounGer,
|
||||
VerbGer,
|
||||
AdjectiveGer,
|
||||
AdverbGer,
|
||||
-- NumeralGer,
|
||||
SentenceGer,
|
||||
QuestionGer,
|
||||
RelativeGer,
|
||||
ConjunctionGer,
|
||||
PhraseGer,
|
||||
UntensedGer,
|
||||
-- TensedGer,
|
||||
LexGer
|
||||
** {
|
||||
flags startcat = Phr ;
|
||||
} ;
|
||||
@@ -1,21 +0,0 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
|
||||
concrete TestSwe of Test =
|
||||
NounSwe,
|
||||
VerbSwe,
|
||||
AdjectiveSwe,
|
||||
AdverbSwe,
|
||||
-- -- NumeralSwe,
|
||||
SentenceSwe,
|
||||
QuestionSwe,
|
||||
RelativeSwe,
|
||||
ConjunctionSwe,
|
||||
PhraseSwe,
|
||||
UntensedSwe,
|
||||
-- -- TensedSwe,
|
||||
LexSwe
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
} ;
|
||||
@@ -1,14 +0,0 @@
|
||||
--1 Untensed forms of sentences, questions, and relative clauses
|
||||
|
||||
-- This module defines just positive and negative present tense forms.
|
||||
-- Am alternative with full variation in polarity, tense, and anteriority is
|
||||
-- given in [Untensed Untensed.html].
|
||||
|
||||
abstract Untensed = Cat ** {
|
||||
|
||||
fun
|
||||
PosCl, NegCl : Cl -> S ;
|
||||
PosQCl, NegQCl : QCl -> QS ;
|
||||
PosRCl, NegRCl : RCl -> RS ;
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
concrete UntensedEng of Untensed = CatEng ** open ResEng in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PosCl cl = {s = cl.s ! Pres ! Simul ! Pos ! ODir} ;
|
||||
NegCl cl = {s = cl.s ! Pres ! Simul ! Neg ! ODir} ;
|
||||
|
||||
PosQCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegQCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosRCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegRCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete UntensedFre of Untensed = CatFre ** UntensedRomance with
|
||||
(DiffRomance = DiffFre) ;
|
||||
@@ -1,15 +0,0 @@
|
||||
concrete UntensedGer of Untensed = CatGer ** open ResGer in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PosCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosQCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegQCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosRCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegRCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
incomplete concrete UntensedRomance of Untensed = CatRomance ** open ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PosCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosQCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegQCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosRCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegRCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
incomplete concrete UntensedScand of Untensed = CatScand ** open ResScand in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PosCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosQCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegQCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
PosRCl cl = {s = cl.s ! Pres ! Simul ! Pos} ;
|
||||
NegRCl cl = {s = cl.s ! Pres ! Simul ! Neg} ;
|
||||
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
concrete UntensedSwe of Untensed = CatSwe ** UntensedScand with
|
||||
(ResScand = ResSwe) ;
|
||||
Reference in New Issue
Block a user