diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
| commit | e9e80fc389365e24d4300d7d5390c7d833a96c50 (patch) | |
| tree | f0b58473adaa670bd8fc52ada419d8cad470ee03 /old-examples/regulus/toy0 | |
| parent | b96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff) | |
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'old-examples/regulus/toy0')
| -rw-r--r-- | old-examples/regulus/toy0/Toy0.gf | 15 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/Toy0Eng.gf | 5 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/Toy0Fin.gf | 5 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/Toy0Fre.gf | 5 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/Toy0I.gf | 18 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/Toy0Swe.gf | 5 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/example-based/Toy0.gf | 15 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/example-based/Toy0Ger.gf | 6 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/example-based/Toy0I.gfe | 23 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-functor/Toy0.gf | 15 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-functor/Toy0Eng.gf | 16 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-functor/Toy0Fin.gf | 16 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-resource/Toy0.gf | 15 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-resource/Toy0Eng.gf | 27 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-resource/Toy0Fre.gf | 29 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-resource/Toy0Ger.gf | 29 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/no-resource/Toy0_eng.gf | 39 | ||||
| -rw-r--r-- | old-examples/regulus/toy0/toy0.gfprobs | 1 |
18 files changed, 284 insertions, 0 deletions
diff --git a/old-examples/regulus/toy0/Toy0.gf b/old-examples/regulus/toy0/Toy0.gf new file mode 100644 index 000000000..b1e2d6a40 --- /dev/null +++ b/old-examples/regulus/toy0/Toy0.gf @@ -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 ; +} diff --git a/old-examples/regulus/toy0/Toy0Eng.gf b/old-examples/regulus/toy0/Toy0Eng.gf new file mode 100644 index 000000000..edfe520e4 --- /dev/null +++ b/old-examples/regulus/toy0/Toy0Eng.gf @@ -0,0 +1,5 @@ +--# -path=.:present:prelude + +concrete Toy0Eng of Toy0 = Toy0I with + (Syntax = SyntaxEng), + (Lexicon = LexiconEng) ; diff --git a/old-examples/regulus/toy0/Toy0Fin.gf b/old-examples/regulus/toy0/Toy0Fin.gf new file mode 100644 index 000000000..f550e751e --- /dev/null +++ b/old-examples/regulus/toy0/Toy0Fin.gf @@ -0,0 +1,5 @@ +--# -path=.:present:prelude + +concrete Toy0Fin of Toy0 = Toy0I with + (Syntax = SyntaxFin), + (Lexicon = LexiconFin) ; diff --git a/old-examples/regulus/toy0/Toy0Fre.gf b/old-examples/regulus/toy0/Toy0Fre.gf new file mode 100644 index 000000000..513e9b390 --- /dev/null +++ b/old-examples/regulus/toy0/Toy0Fre.gf @@ -0,0 +1,5 @@ +--# -path=.:present:prelude + +concrete Toy0Fre of Toy0 = Toy0I with + (Syntax = SyntaxFre), + (Lexicon = LexiconFre) ; diff --git a/old-examples/regulus/toy0/Toy0I.gf b/old-examples/regulus/toy0/Toy0I.gf new file mode 100644 index 000000000..efb6e730a --- /dev/null +++ b/old-examples/regulus/toy0/Toy0I.gf @@ -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 ; + +} + diff --git a/old-examples/regulus/toy0/Toy0Swe.gf b/old-examples/regulus/toy0/Toy0Swe.gf new file mode 100644 index 000000000..5de273d00 --- /dev/null +++ b/old-examples/regulus/toy0/Toy0Swe.gf @@ -0,0 +1,5 @@ +--# -path=.:present:prelude + +concrete Toy0Swe of Toy0 = Toy0I with + (Syntax = SyntaxSwe), + (Lexicon = LexiconSwe) ; diff --git a/old-examples/regulus/toy0/example-based/Toy0.gf b/old-examples/regulus/toy0/example-based/Toy0.gf new file mode 100644 index 000000000..b1e2d6a40 --- /dev/null +++ b/old-examples/regulus/toy0/example-based/Toy0.gf @@ -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 ; +} diff --git a/old-examples/regulus/toy0/example-based/Toy0Ger.gf b/old-examples/regulus/toy0/example-based/Toy0Ger.gf new file mode 100644 index 000000000..7355cbfac --- /dev/null +++ b/old-examples/regulus/toy0/example-based/Toy0Ger.gf @@ -0,0 +1,6 @@ +--# -path=.:present:prelude + +concrete Toy0Ger of Toy0 = Toy0I with + (Grammar = GrammarGer), + (Lexicon = LexiconGer) ; + diff --git a/old-examples/regulus/toy0/example-based/Toy0I.gfe b/old-examples/regulus/toy0/example-based/Toy0I.gfe new file mode 100644 index 000000000..4589bf4b6 --- /dev/null +++ b/old-examples/regulus/toy0/example-based/Toy0I.gfe @@ -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" ; + +} + diff --git a/old-examples/regulus/toy0/no-functor/Toy0.gf b/old-examples/regulus/toy0/no-functor/Toy0.gf new file mode 100644 index 000000000..b1e2d6a40 --- /dev/null +++ b/old-examples/regulus/toy0/no-functor/Toy0.gf @@ -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 ; +} diff --git a/old-examples/regulus/toy0/no-functor/Toy0Eng.gf b/old-examples/regulus/toy0/no-functor/Toy0Eng.gf new file mode 100644 index 000000000..3bd6613a3 --- /dev/null +++ b/old-examples/regulus/toy0/no-functor/Toy0Eng.gf @@ -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" ; +} diff --git a/old-examples/regulus/toy0/no-functor/Toy0Fin.gf b/old-examples/regulus/toy0/no-functor/Toy0Fin.gf new file mode 100644 index 000000000..4ebbf6f36 --- /dev/null +++ b/old-examples/regulus/toy0/no-functor/Toy0Fin.gf @@ -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" ; +} diff --git a/old-examples/regulus/toy0/no-resource/Toy0.gf b/old-examples/regulus/toy0/no-resource/Toy0.gf new file mode 100644 index 000000000..b1e2d6a40 --- /dev/null +++ b/old-examples/regulus/toy0/no-resource/Toy0.gf @@ -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 ; +} diff --git a/old-examples/regulus/toy0/no-resource/Toy0Eng.gf b/old-examples/regulus/toy0/no-resource/Toy0Eng.gf new file mode 100644 index 000000000..977fb09c5 --- /dev/null +++ b/old-examples/regulus/toy0/no-resource/Toy0Eng.gf @@ -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" + } + } ; +} diff --git a/old-examples/regulus/toy0/no-resource/Toy0Fre.gf b/old-examples/regulus/toy0/no-resource/Toy0Fre.gf new file mode 100644 index 000000000..c5267ae18 --- /dev/null +++ b/old-examples/regulus/toy0/no-resource/Toy0Fre.gf @@ -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 + } ; +} diff --git a/old-examples/regulus/toy0/no-resource/Toy0Ger.gf b/old-examples/regulus/toy0/no-resource/Toy0Ger.gf new file mode 100644 index 000000000..091790f94 --- /dev/null +++ b/old-examples/regulus/toy0/no-resource/Toy0Ger.gf @@ -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 + } ; +} diff --git a/old-examples/regulus/toy0/no-resource/Toy0_eng.gf b/old-examples/regulus/toy0/no-resource/Toy0_eng.gf new file mode 100644 index 000000000..ed8fe8063 --- /dev/null +++ b/old-examples/regulus/toy0/no-resource/Toy0_eng.gf @@ -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" + } + } ; diff --git a/old-examples/regulus/toy0/toy0.gfprobs b/old-examples/regulus/toy0/toy0.gfprobs new file mode 100644 index 000000000..7c97562e2 --- /dev/null +++ b/old-examples/regulus/toy0/toy0.gfprobs @@ -0,0 +1 @@ +--# prob Felis 0.9 |
