forked from GitHub/gf-core
changed names of resource-1.3; added a note on homepage on release
This commit is contained in:
15
old-examples/regulus/toy0/Toy0.gf
Normal file
15
old-examples/regulus/toy0/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
5
old-examples/regulus/toy0/Toy0Eng.gf
Normal file
5
old-examples/regulus/toy0/Toy0Eng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Eng of Toy0 = Toy0I with
|
||||
(Syntax = SyntaxEng),
|
||||
(Lexicon = LexiconEng) ;
|
||||
5
old-examples/regulus/toy0/Toy0Fin.gf
Normal file
5
old-examples/regulus/toy0/Toy0Fin.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Fin of Toy0 = Toy0I with
|
||||
(Syntax = SyntaxFin),
|
||||
(Lexicon = LexiconFin) ;
|
||||
5
old-examples/regulus/toy0/Toy0Fre.gf
Normal file
5
old-examples/regulus/toy0/Toy0Fre.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Fre of Toy0 = Toy0I with
|
||||
(Syntax = SyntaxFre),
|
||||
(Lexicon = LexiconFre) ;
|
||||
18
old-examples/regulus/toy0/Toy0I.gf
Normal file
18
old-examples/regulus/toy0/Toy0I.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
incomplete concrete Toy0I of Toy0 = open Syntax, Lexicon in {
|
||||
|
||||
lincat
|
||||
Spec = Det ;
|
||||
Noun = N ;
|
||||
NP = Utt ;
|
||||
|
||||
lin
|
||||
SpecNoun spec noun = mkUtt (mkNP spec noun) ;
|
||||
|
||||
One = mkDet n1_Numeral ;
|
||||
Two = mkDet n2_Numeral ;
|
||||
|
||||
Felis = cat_N ;
|
||||
Canis = dog_N ;
|
||||
|
||||
}
|
||||
|
||||
5
old-examples/regulus/toy0/Toy0Swe.gf
Normal file
5
old-examples/regulus/toy0/Toy0Swe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Swe of Toy0 = Toy0I with
|
||||
(Syntax = SyntaxSwe),
|
||||
(Lexicon = LexiconSwe) ;
|
||||
15
old-examples/regulus/toy0/example-based/Toy0.gf
Normal file
15
old-examples/regulus/toy0/example-based/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
6
old-examples/regulus/toy0/example-based/Toy0Ger.gf
Normal file
6
old-examples/regulus/toy0/example-based/Toy0Ger.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Ger of Toy0 = Toy0I with
|
||||
(Grammar = GrammarGer),
|
||||
(Lexicon = LexiconGer) ;
|
||||
|
||||
23
old-examples/regulus/toy0/example-based/Toy0I.gfe
Normal file
23
old-examples/regulus/toy0/example-based/Toy0I.gfe
Normal file
@@ -0,0 +1,23 @@
|
||||
--# -resource=present/LangEng.gfc
|
||||
--# -path=.:present:prelude
|
||||
|
||||
-- to compile: gf -examples Toy0I.gfe
|
||||
|
||||
incomplete concrete Toy0I of Toy0 = open Grammar, Lexicon in {
|
||||
|
||||
lincat
|
||||
Spec = Det ;
|
||||
Noun = N ;
|
||||
NP = Utt ;
|
||||
|
||||
lin
|
||||
SpecNoun every_Det house_N = in Utt "every house" ;
|
||||
|
||||
One = in Det "one" ;
|
||||
Two = in Det "two" ;
|
||||
|
||||
Felis = in N "cat" ;
|
||||
Canis = in N "dog" ;
|
||||
|
||||
}
|
||||
|
||||
15
old-examples/regulus/toy0/no-functor/Toy0.gf
Normal file
15
old-examples/regulus/toy0/no-functor/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
16
old-examples/regulus/toy0/no-functor/Toy0Eng.gf
Normal file
16
old-examples/regulus/toy0/no-functor/Toy0Eng.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
--# -path=.:present:api:prelude
|
||||
concrete Toy0Eng of Toy0 =
|
||||
open SyntaxEng, ParadigmsEng in {
|
||||
|
||||
flags language=en_US ;
|
||||
|
||||
lincat
|
||||
Spec = Det ; Noun = N ; NP = Utt ;
|
||||
|
||||
lin
|
||||
SpecNoun s n = mkUtt (mkNP s n) ;
|
||||
One = mkDet one_Quant ;
|
||||
Two = mkDet n2_Numeral ;
|
||||
Felis = mkN "cat" ;
|
||||
Canis = mkN "dog" ;
|
||||
}
|
||||
16
old-examples/regulus/toy0/no-functor/Toy0Fin.gf
Normal file
16
old-examples/regulus/toy0/no-functor/Toy0Fin.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Fin of Toy0 = open SyntaxFin, ParadigmsFin in {
|
||||
|
||||
lincat
|
||||
Spec = Det ;
|
||||
Noun = N ;
|
||||
NP = Utt ;
|
||||
lin
|
||||
SpecNoun spec noun = mkUtt (SyntaxFin.mkNP spec noun) ;
|
||||
|
||||
One = mkDet one_Quant ;
|
||||
Two = mkDet (mkNum n2_Numeral) ;
|
||||
Felis = mkN "kissa" ;
|
||||
Canis = mkN "koira" ;
|
||||
}
|
||||
15
old-examples/regulus/toy0/no-resource/Toy0.gf
Normal file
15
old-examples/regulus/toy0/no-resource/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
27
old-examples/regulus/toy0/no-resource/Toy0Eng.gf
Normal file
27
old-examples/regulus/toy0/no-resource/Toy0Eng.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
concrete Toy0Eng of Toy0 = {
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
|
||||
lincat
|
||||
Spec = {s : Str ; n : Number} ;
|
||||
Noun = {s : Number => Str} ;
|
||||
NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
SpecNoun spec noun = {s = spec.s ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = "one" ; n = Sg} ;
|
||||
Two = {s = "two" ; n = Pl} ;
|
||||
|
||||
Felis = regNoun "cat" ;
|
||||
Canis = regNoun "dog" ;
|
||||
|
||||
oper
|
||||
regNoun : Str -> {s : Number => Str} = \s -> {
|
||||
s = table {
|
||||
Sg => s ;
|
||||
Pl => s + "s"
|
||||
}
|
||||
} ;
|
||||
}
|
||||
29
old-examples/regulus/toy0/no-resource/Toy0Fre.gf
Normal file
29
old-examples/regulus/toy0/no-resource/Toy0Fre.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
concrete Toy0Fre of Toy0 = {
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
Gender = Masc | Fem ;
|
||||
|
||||
lincat
|
||||
Spec = {s : Gender => Str ; n : Number} ;
|
||||
Noun = {s : Number => Str ; g : Gender} ;
|
||||
NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
SpecNoun spec noun = {s = spec.s ! noun.g ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = table {Fem => "une" ; _ => "un"} ; n = Sg} ;
|
||||
Two = {s = \\_ => "deux" ; n = Pl} ;
|
||||
|
||||
Felis = mkNoun "chat" Masc ;
|
||||
Canis = mkNoun "chien" Masc ;
|
||||
|
||||
oper
|
||||
mkNoun : Str -> Gender -> {s : Number => Str ; g : Gender} = \s,g -> {
|
||||
s = table {
|
||||
Sg => s ;
|
||||
Pl => s + "s"
|
||||
} ;
|
||||
g = g
|
||||
} ;
|
||||
}
|
||||
29
old-examples/regulus/toy0/no-resource/Toy0Ger.gf
Normal file
29
old-examples/regulus/toy0/no-resource/Toy0Ger.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
concrete Toy0Ger of Toy0 = {
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
Gender = Masc | Fem | Neutr ;
|
||||
|
||||
lincat
|
||||
Spec = {s : Gender => Str ; n : Number} ;
|
||||
Noun = {s : Number => Str ; g : Gender} ;
|
||||
NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
SpecNoun spec noun = {s = spec.s ! noun.g ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = table {Fem => "eine" ; _ => "ein"} ; n = Sg} ;
|
||||
Two = {s = \\_ => "zwei" ; n = Pl} ;
|
||||
|
||||
Felis = mkNoun "Katze" "Katzen" Fem ;
|
||||
Canis = mkNoun "Hund" "Hünde" Masc ;
|
||||
|
||||
oper
|
||||
mkNoun : Str -> Str -> Gender -> {s : Number => Str ; g : Gender} = \s,p,g -> {
|
||||
s = table {
|
||||
Sg => s ;
|
||||
Pl => p
|
||||
} ;
|
||||
g = g
|
||||
} ;
|
||||
}
|
||||
39
old-examples/regulus/toy0/no-resource/Toy0_eng.gf
Normal file
39
old-examples/regulus/toy0/no-resource/Toy0_eng.gf
Normal file
@@ -0,0 +1,39 @@
|
||||
-- grammar from Chapter 2 of the Regulus book
|
||||
|
||||
flags startcat=MAIN ;
|
||||
|
||||
cat
|
||||
MAIN ; NP ; Noun ; Spec ;
|
||||
|
||||
fun
|
||||
Main : NP -> MAIN ;
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
|
||||
lincat
|
||||
Spec = {s : Str ; n : Number} ;
|
||||
Noun = {s : Number => Str} ;
|
||||
MAIN,NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
Main np = np ;
|
||||
SpecNoun spec noun = {s = spec.s ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = "one" ; n = Sg} ;
|
||||
Two = {s = "two" ; n = Pl} ;
|
||||
|
||||
Felis = regNoun "cat" ;
|
||||
Canis = regNoun "dog" ;
|
||||
|
||||
oper
|
||||
regNoun : Str -> {s : Number => Str} = \s -> {
|
||||
s = table {
|
||||
Sg => s ;
|
||||
Pl => s + "s"
|
||||
}
|
||||
} ;
|
||||
1
old-examples/regulus/toy0/toy0.gfprobs
Normal file
1
old-examples/regulus/toy0/toy0.gfprobs
Normal file
@@ -0,0 +1 @@
|
||||
--# prob Felis 0.9
|
||||
Reference in New Issue
Block a user