From d6e3bcc8750f193b719efc2f6522194c6673bb20 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 3 Sep 2013 08:51:39 +0200 Subject: [PATCH] Remove Gla and Gle from Gf test samples --- .../Grammatical Framework/CharactersGla.gf | 12 --- .../Grammatical Framework/CharactersGle.gf | 12 --- samples/Grammatical Framework/FoodsGla.gf | 66 ------------- samples/Grammatical Framework/FoodsGle.gf | 59 ------------ samples/Grammatical Framework/MutationsGla.gf | 53 ----------- samples/Grammatical Framework/MutationsGle.gf | 92 ------------------- 6 files changed, 294 deletions(-) delete mode 100644 samples/Grammatical Framework/CharactersGla.gf delete mode 100644 samples/Grammatical Framework/CharactersGle.gf delete mode 100644 samples/Grammatical Framework/FoodsGla.gf delete mode 100644 samples/Grammatical Framework/FoodsGle.gf delete mode 100644 samples/Grammatical Framework/MutationsGla.gf delete mode 100644 samples/Grammatical Framework/MutationsGle.gf diff --git a/samples/Grammatical Framework/CharactersGla.gf b/samples/Grammatical Framework/CharactersGla.gf deleted file mode 100644 index 453741a5..00000000 --- a/samples/Grammatical Framework/CharactersGla.gf +++ /dev/null @@ -1,12 +0,0 @@ -resource CharactersGla = { - - --Character classes - oper - vowel : pattern Str = #("a"|"e"|"i"|"o"|"u"|"à"|"è"|"ì"|"ò"|"ù") ; - vowelCap : pattern Str = #("A"|"E"|"I"|"O"|"U"|"À"|"É"|"Ì"|"Ò"|"Ù") ; - consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"z") ; - consonantCap : pattern Str = #("B"|"C"|"D"|"F"|"G"|"H"|"J"|"K"|"L"|"M"|"N"|"P"|"Q"|"R"|"S"|"T"|"V"|"W"|"X"|"Z") ; - broadVowel : pattern Str = #("a"|"o"|"u"|"à"|"ò"|"ù") ; - slenderVowel : pattern Str = #("e"|"i"|"è"|"ì") ; - -} \ No newline at end of file diff --git a/samples/Grammatical Framework/CharactersGle.gf b/samples/Grammatical Framework/CharactersGle.gf deleted file mode 100644 index 4e7f454c..00000000 --- a/samples/Grammatical Framework/CharactersGle.gf +++ /dev/null @@ -1,12 +0,0 @@ -resource CharactersGle = { - - --Character classes - oper - vowel : pattern Str = #("a"|"e"|"i"|"o"|"u"|"á"|"é"|"í"|"ó"|"ú") ; - vowelCap : pattern Str = #("A"|"E"|"I"|"O"|"U"|"Á"|"É"|"Í"|"Ó"|"Ú") ; - consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"z") ; - consonantCap : pattern Str = #("B"|"C"|"D"|"F"|"G"|"H"|"J"|"K"|"L"|"M"|"N"|"P"|"Q"|"R"|"S"|"T"|"V"|"W"|"X"|"Z") ; - broadVowel : pattern Str = #("a"|"o"|"u"|"á"|"ó"|"ú") ; - slenderVowel : pattern Str = #("e"|"i"|"é"|"í") ; - -} \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsGla.gf b/samples/Grammatical Framework/FoodsGla.gf deleted file mode 100644 index 691b26bb..00000000 --- a/samples/Grammatical Framework/FoodsGla.gf +++ /dev/null @@ -1,66 +0,0 @@ -concrete FoodsGla of Foods = open MutationsGla, CharactersGla, Prelude in { - param Gender = Masc|Fem ; - param Number = Sg|Pl ; - param Breadth = Broad|Slender|NoBreadth ; - param Beginning = Bcgmp|Other ; - - lincat Comment = Str; - lin Pred item quality = "tha" ++ item ++ quality.s!Sg!Unmutated ; - - lincat Item = Str; - lin - This kind = (addArticleSg kind) ++ "seo" ; - That kind = (addArticleSg kind) ++ "sin"; - These kind = (addArticlePl kind) ++ "seo" ; - Those kind = (addArticlePl kind) ++ "sin" ; - oper addArticleSg : {s : Number => Mutation => Str; g : Gender} -> Str = - \kind -> case kind.g of { Masc => "an" ++ kind.s!Sg!PrefixT; Fem => "a'" ++ kind.s!Sg!Lenition1DNTLS } ; - oper addArticlePl : {s : Number => Mutation => Str; g : Gender} -> Str = - \kind -> "na" ++ kind.s!Pl!PrefixH ; - - oper Noun : Type = {s : Number => Mutation => Str; g : Gender; pe : Breadth; beginning: Beginning; }; - lincat Kind = Noun; - lin - Mod quality kind = { - s = table{ - Sg => table{mutation => kind.s!Sg!mutation ++ case kind.g of {Masc => quality.s!Sg!Unmutated; Fem => quality.s!Sg!Lenition1} }; - Pl => table{mutation => kind.s!Pl!mutation ++ case kind.pe of {Slender => quality.s!Pl!Lenition1; _ => quality.s!Pl!Unmutated} } - }; - g = kind.g; - pe = kind.pe; - beginning = kind.beginning - } ; - Wine = makeNoun "fìon" "fìontan" Masc ; - Cheese = makeNoun "càise" "càisean" Masc ; - Fish = makeNoun "iasg" "èisg" Masc ; - Pizza = makeNoun "pizza" "pizzathan" Masc ; - oper makeNoun : Str -> Str -> Gender -> Noun = \sg,pl,g -> { - s = table{Sg => (mutate sg); Pl => (mutate pl)}; - g = g; - pe = pe; - beginning = Bcgmp - } - where { - pe : Breadth = case pl of { - _ + v@(#broadVowel) + c@(#consonant*) + #consonant => Broad; - _ + v@(#slenderVowel) + c@(#consonant*) + #consonant => Slender; - _ => NoBreadth - } - }; - - oper Adjective : Type = {s : Number => Mutation => Str; sVery : Number => Str}; - lincat Quality = Adjective; - lin - Very quality = {s=table{number => table{_ => quality.sVery!number}}; sVery=quality.sVery } ; - Fresh = makeAdjective "úr" "ùra" ; - Warm = makeAdjective "blàth" "blàtha" ; - Italian = makeAdjective "Eadailteach" "Eadailteach" ; - Expensive = makeAdjective "daor" "daora" ; - Delicious = makeAdjective "blasta" "blasta" ; - Boring = makeAdjective "leamh" "leamha" ; - oper makeAdjective : Str -> Str -> Adjective = - \sg,pl -> { - s=table{Sg => (mutate sg); Pl => (mutate pl)}; - sVery=table{Sg => "glè"++(lenition1dntls sg); Pl => "glè"++(lenition1dntls pl)} - } ; -} \ No newline at end of file diff --git a/samples/Grammatical Framework/FoodsGle.gf b/samples/Grammatical Framework/FoodsGle.gf deleted file mode 100644 index e48c0c21..00000000 --- a/samples/Grammatical Framework/FoodsGle.gf +++ /dev/null @@ -1,59 +0,0 @@ -concrete FoodsGle of Foods = open MutationsGle, CharactersGle in { - param Gender = Masc|Fem ; - param Number = Sg|Pl ; - param Breadth = Broad|Slender|NoBreadth ; - - lincat Comment = Str; - lin Pred item quality = "tá" ++ item ++ quality.s!Sg!Unmutated ; - - lincat Item = Str; - lin - This kind = (addArticleSg kind) ++ "seo" ; - That kind = (addArticleSg kind) ++ "sin"; - These kind = (addArticlePl kind) ++ "seo" ; - Those kind = (addArticlePl kind) ++ "sin" ; - oper addArticleSg : {s : Number => Mutation => Str; g : Gender} -> Str = - \kind -> "an" ++ case kind.g of { Masc => kind.s!Sg!PrefixT; Fem => kind.s!Sg!Lenition1DNTLS } ; - oper addArticlePl : {s : Number => Mutation => Str; g : Gender} -> Str = - \kind -> "na" ++ kind.s!Pl!PrefixH ; - - lincat Kind = {s : Number => Mutation => Str; g : Gender; pe : Breadth} ; - lin - Mod quality kind = { - s = table{ - Sg => table{mutation => kind.s!Sg!mutation ++ case kind.g of {Masc => quality.s!Sg!Unmutated; Fem => quality.s!Sg!Lenition1} }; - Pl => table{mutation => kind.s!Pl!mutation ++ case kind.pe of {Slender => quality.s!Pl!Lenition1; _ => quality.s!Pl!Unmutated} } - }; - g = kind.g; - pe = kind.pe - } ; - Wine = makeNoun "fíon" "fíonta" Masc ; - Cheese = makeNoun "cáis" "cáiseanna" Fem ; - Fish = makeNoun "iasc" "éisc" Masc ; - Pizza = makeNoun "píotsa" "píotsaí" Masc ; - oper makeNoun : Str -> Str -> Gender -> {s : Number => Mutation => Str; g : Gender; pe : Breadth} = - \sg,pl,g -> { - s = table{Sg => (mutate sg); Pl => (mutate pl)}; - g = g; - pe = case pl of { - _ + v@(#broadVowel) + c@(#consonant*) + #consonant => Broad; - _ + v@(#slenderVowel) + c@(#consonant*) + #consonant => Slender; - _ => NoBreadth - } - } ; - - lincat Quality = {s : Number => Mutation => Str; sVery : Number => Str} ; - lin - Very quality = {s=table{number => table{_ => quality.sVery!number}}; sVery=quality.sVery } ; - Fresh = makeAdjective "úr" "úra" ; - Warm = makeAdjective "te" "te" ; - Italian = makeAdjective "Iodálach" "Iodálacha" ; - Expensive = makeAdjective "daor" "daora" ; - Delicious = makeAdjective "blasta" "blasta" ; - Boring = makeAdjective "leamh" "leamha" ; - oper makeAdjective : Str -> Str -> {s : Number => Mutation => Str; sVery : Number => Str} = - \sg,pl -> { - s=table{Sg => (mutate sg); Pl => (mutate pl)}; - sVery=table{Sg => "an-"+(lenition1dntls sg); Pl => "an-"+(lenition1dntls pl)} - } ; -} \ No newline at end of file diff --git a/samples/Grammatical Framework/MutationsGla.gf b/samples/Grammatical Framework/MutationsGla.gf deleted file mode 100644 index 41eb1100..00000000 --- a/samples/Grammatical Framework/MutationsGla.gf +++ /dev/null @@ -1,53 +0,0 @@ -resource MutationsGla = open CharactersGla in { - param Mutation = Unmutated|Lenition1|Lenition1DNTLS|Lenition2|PrefixT|PrefixH; - - --Turns a string into a mutation table - oper mutate : (_ : Str) -> (Mutation => Str) = \str -> table { - Unmutated => str ; - Lenition1 => lenition1 str ; - Lenition1DNTLS => lenition1dntls str ; - Lenition2 => lenition2 str ; - PrefixT => prefixT str ; - PrefixH => prefixH str - }; - - --Performs lenition 1: inserts "h" if the word begins with a lenitable character - oper lenition1 : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"t"|"d"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"T"|"D"|"C"|"G") + rest => start + "h" + rest ; - ("s"|"S") + ("p"|"t"|"c") + _ => str ; --the sequences "sp", "st", "sc" are never mutated - start@("s"|"S") + rest => start + "h" + rest ; - _ => str - }; - - --Performs lenition 1 with dentals: same as lenition 1 but leaves "d", "t" and "s" unmutated - oper lenition1dntls : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"C"|"G") + rest => start + "h" + rest ; - _ => str - }; - - --Performs lenition 2: same as lenition 1 with dentals but also changes "s" into "ts" - oper lenition2 : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"C"|"G") + rest => start + "h" + rest ; - ("s"|"S") + ("p"|"t"|"c") + _ => str ; --the sequences "sp", "st", "sc" are never mutated - start@("s"|"S") + rest => "t-" + start + rest ; - _ => str - }; - - --Prefixes a "t" to words beginning with a vowel - oper prefixT : Str -> Str = \str -> case str of { - start@(#vowel) + rest => "t-" + start + rest ; - start@(#vowelCap) + rest => "t-" + start + rest ; - _ => str - }; - - --Prefixes a "h" to words beginning with a vowel - oper prefixH : Str -> Str = \str -> case str of { - start@(#vowel) + rest => "h-" + start + rest ; - start@(#vowelCap) + rest => "h-" + start + rest ; - _ => str - }; - -} \ No newline at end of file diff --git a/samples/Grammatical Framework/MutationsGle.gf b/samples/Grammatical Framework/MutationsGle.gf deleted file mode 100644 index 9ae734a9..00000000 --- a/samples/Grammatical Framework/MutationsGle.gf +++ /dev/null @@ -1,92 +0,0 @@ -resource MutationsGle = open CharactersGle in { - param Mutation = Unmutated|Lenition1|Lenition1DNTLS|Lenition2|Eclipsis1|Eclipsis2|Eclipsis3|PrefixT|PrefixH; - - --Turns a string into a mutation table - oper mutate : (_ : Str) -> (Mutation => Str) = \str -> table { - Unmutated => str ; - Lenition1 => lenition1 str ; - Lenition1DNTLS => lenition1dntls str ; - Lenition2 => lenition2 str ; - Eclipsis1 => eclipsis1 str ; - Eclipsis2 => eclipsis2 str ; - Eclipsis3 => eclipsis3 str ; - PrefixT => prefixT str ; - PrefixH => prefixH str - }; - - --Performs lenition 1: inserts "h" if the word begins with a lenitable character - oper lenition1 : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"t"|"d"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"T"|"D"|"C"|"G") + rest => start + "h" + rest ; - ("s"|"S") + ("p"|"t"|"c") + _ => str ; --the sequences "sp", "st", "sc" are never mutated - start@("s"|"S") + rest => start + "h" + rest ; - _ => str - }; - - --Performs lenition 1 with dentals: same as lenition 1 but leaves "d", "t" and "s" unmutated - oper lenition1dntls : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"C"|"G") + rest => start + "h" + rest ; - _ => str - }; - - --Performs lenition 2: same as lenition 1 with dentals but also changes "s" into "ts" - oper lenition2 : Str -> Str = \str -> case str of { - start@("p"|"b"|"m"|"f"|"c"|"g") + rest => start + "h" + rest ; - start@("P"|"B"|"M"|"F"|"C"|"G") + rest => start + "h" + rest ; - ("s"|"S") + ("p"|"t"|"c") + _ => str ; --the sequences "sp", "st", "sc" are never mutated - start@("s"|"S") + rest => "t" + start + rest ; - _ => str - }; - - --Performs eclisis 1: prefixes something to every word that begins with an ecliptable character - oper eclipsis1 : Str -> Str = \str -> case str of { - start@("p"|"P") + rest => "b" + start + rest ; - start@("b"|"B") + rest => "m" + start + rest ; - start@("f"|"F") + rest => "bh" + start + rest ; - start@("c"|"C") + rest => "g" + start + rest ; - start@("g"|"G") + rest => "n" + start + rest ; - start@("t"|"T") + rest => "d" + start + rest ; - start@("d"|"D") + rest => "n" + start + rest ; - start@(#vowel) + rest => "n-" + start + rest ; - start@(#vowelCap) + rest => "n" + start + rest ; - _ => str - }; - - --Performs eclipsis 2: same as eclipsis 1 but leaves "t", "d" and vowels unchanges - oper eclipsis2 : Str -> Str = \str -> case str of { - start@("p"|"P") + rest => "b" + start + rest ; - start@("b"|"B") + rest => "m" + start + rest ; - start@("f"|"F") + rest => "bh" + start + rest ; - start@("c"|"C") + rest => "g" + start + rest ; - start@("g"|"G") + rest => "n" + start + rest ; - _ => str - }; - - --Performs eclipsis 3: same as eclipsis 2 but also changes "s" to "ts" - eclipsis3 : Str -> Str = \str -> case str of { - start@("p"|"P") + rest => "b" + start + rest ; - start@("b"|"B") + rest => "m" + start + rest ; - start@("f"|"F") + rest => "bh" + start + rest ; - start@("c"|"C") + rest => "g" + start + rest ; - start@("g"|"G") + rest => "n" + start + rest ; - ("s"|"S") + ("p"|"t"|"c") + _ => str ; --the sequences "sp", "st", "sc" are never mutated - start@("s"|"S") + rest => "t" + start + rest ; - _ => str - }; - - --Prefixes a "t" to words beginning with a vowel - oper prefixT : Str -> Str = \str -> case str of { - start@(#vowel) + rest => "t-" + start + rest ; - start@(#vowelCap) + rest => "t" + start + rest ; - _ => str - }; - - --Prefixes a "h" to words beginning with a vowel - oper prefixH : Str -> Str = \str -> case str of { - start@(#vowel) + rest => "h" + start + rest ; - start@(#vowelCap) + rest => "h" + start + rest ; - _ => str - }; - -} \ No newline at end of file