From 6234e536f63e3e803286b94cee8a0e0a3adcdcb2 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 16 Aug 2007 16:18:54 +0000 Subject: moved tutorial examples to GF/examples --- examples/tutorial/food/Food.gf | 16 +++++ examples/tutorial/food/FoodEng.gf | 23 +++++++ examples/tutorial/food/FoodIta.gf | 22 +++++++ examples/tutorial/hello/Hello.gf | 10 +++ examples/tutorial/hello/HelloEng.gf | 10 +++ examples/tutorial/hello/HelloFin.gf | 10 +++ examples/tutorial/hello/HelloIta.gf | 10 +++ examples/tutorial/syntax/MorphoEng.gf | 69 ++++++++++++++++++++ examples/tutorial/syntax/MorphoIta.gf | 100 ++++++++++++++++++++++++++++ examples/tutorial/syntax/Syntax.gf | 60 +++++++++++++++++ examples/tutorial/syntax/SyntaxEng.gf | 118 ++++++++++++++++++++++++++++++++++ examples/tutorial/syntax/SyntaxIta.gf | 102 +++++++++++++++++++++++++++++ examples/tutorial/syntax/Test.gf | 8 +++ examples/tutorial/syntax/TestEng.gf | 23 +++++++ examples/tutorial/syntax/TestIta.gf | 23 +++++++ 15 files changed, 604 insertions(+) create mode 100644 examples/tutorial/food/Food.gf create mode 100644 examples/tutorial/food/FoodEng.gf create mode 100644 examples/tutorial/food/FoodIta.gf create mode 100644 examples/tutorial/hello/Hello.gf create mode 100644 examples/tutorial/hello/HelloEng.gf create mode 100644 examples/tutorial/hello/HelloFin.gf create mode 100644 examples/tutorial/hello/HelloIta.gf create mode 100644 examples/tutorial/syntax/MorphoEng.gf create mode 100644 examples/tutorial/syntax/MorphoIta.gf create mode 100644 examples/tutorial/syntax/Syntax.gf create mode 100644 examples/tutorial/syntax/SyntaxEng.gf create mode 100644 examples/tutorial/syntax/SyntaxIta.gf create mode 100644 examples/tutorial/syntax/Test.gf create mode 100644 examples/tutorial/syntax/TestEng.gf create mode 100644 examples/tutorial/syntax/TestIta.gf (limited to 'examples') diff --git a/examples/tutorial/food/Food.gf b/examples/tutorial/food/Food.gf new file mode 100644 index 000000000..c4efd5950 --- /dev/null +++ b/examples/tutorial/food/Food.gf @@ -0,0 +1,16 @@ +abstract Food = { + + cat + Phrase ; Item ; Kind ; Quality ; + + flags startcat = Phrase ; + + fun + Is : Item -> Quality -> Phrase ; + This, That : Kind -> Item ; + QKind : Quality -> Kind -> Kind ; + Wine, Cheese, Fish : Kind ; + Very : Quality -> Quality ; + Fresh, Warm, Italian, Expensive, Delicious, Boring : Quality ; + +} \ No newline at end of file diff --git a/examples/tutorial/food/FoodEng.gf b/examples/tutorial/food/FoodEng.gf new file mode 100644 index 000000000..a4f5907be --- /dev/null +++ b/examples/tutorial/food/FoodEng.gf @@ -0,0 +1,23 @@ +concrete FoodEng of Food = { + + lincat + Phrase, Item, Kind, Quality = {s : Str} ; + + lin + Is item quality = {s = item.s ++ "is" ++ quality.s} ; + This kind = {s = "this" ++ kind.s} ; + That kind = {s = "that" ++ kind.s} ; + QKind quality kind = {s = quality.s ++ kind.s} ; + Wine = {s = "wine"} ; + Cheese = {s = "cheese"} ; + Fish = {s = "fish"} ; + Very quality = {s = "very" ++ quality.s} ; + Fresh = {s = "fresh"} ; + Warm = {s = "warm"} ; + Italian = {s = "Italian"} ; + Expensive = {s = "expensive"} ; + Delicious = {s = "delicious"} ; + Boring = {s = "boring"} ; + +} + \ No newline at end of file diff --git a/examples/tutorial/food/FoodIta.gf b/examples/tutorial/food/FoodIta.gf new file mode 100644 index 000000000..fc59e1294 --- /dev/null +++ b/examples/tutorial/food/FoodIta.gf @@ -0,0 +1,22 @@ +concrete FoodIta of Food = { + + lincat + Phrase, Item, Kind, Quality = {s : Str} ; + + lin + Is item quality = {s = item.s ++ "è" ++ quality.s} ; + This kind = {s = "questo" ++ kind.s} ; + That kind = {s = "quello" ++ kind.s} ; + QKind quality kind = {s = kind.s ++ quality.s} ; + Wine = {s = "vino"} ; + Cheese = {s = "formaggio"} ; + Fish = {s = "pesce"} ; + Very quality = {s = "molto" ++ quality.s} ; + Fresh = {s = "fresco"} ; + Warm = {s = "caldo"} ; + Italian = {s = "italiano"} ; + Expensive = {s = "caro"} ; + Delicious = {s = "delizioso"} ; + Boring = {s = "noioso"} ; + +} diff --git a/examples/tutorial/hello/Hello.gf b/examples/tutorial/hello/Hello.gf new file mode 100644 index 000000000..769be5cbf --- /dev/null +++ b/examples/tutorial/hello/Hello.gf @@ -0,0 +1,10 @@ +abstract Hello = { + + cat Greeting ; Recipient ; + + flags startcat = Greeting ; + + fun + Hello : Recipient -> Greeting ; + World, Mum, Friends : Recipient ; +} \ No newline at end of file diff --git a/examples/tutorial/hello/HelloEng.gf b/examples/tutorial/hello/HelloEng.gf new file mode 100644 index 000000000..69efba6b4 --- /dev/null +++ b/examples/tutorial/hello/HelloEng.gf @@ -0,0 +1,10 @@ +concrete HelloEng of Hello = { + + lincat Greeting, Recipient = {s : Str} ; + + lin + Hello rec = {s = "hello" ++ rec.s} ; + World = {s = "world"} ; + Mum = {s = "mum"} ; + Friends = {s = "friends"} ; +} \ No newline at end of file diff --git a/examples/tutorial/hello/HelloFin.gf b/examples/tutorial/hello/HelloFin.gf new file mode 100644 index 000000000..969142a91 --- /dev/null +++ b/examples/tutorial/hello/HelloFin.gf @@ -0,0 +1,10 @@ +concrete HelloFin of Hello = { + + lincat Greeting, Recipient = {s : Str} ; + + lin + Hello rec = {s = "terve" ++ rec.s} ; + World = {s = "maailma"} ; + Mum = {s = "äiti"} ; + Friends = {s = "ystävät"} ; +} \ No newline at end of file diff --git a/examples/tutorial/hello/HelloIta.gf b/examples/tutorial/hello/HelloIta.gf new file mode 100644 index 000000000..f1465a867 --- /dev/null +++ b/examples/tutorial/hello/HelloIta.gf @@ -0,0 +1,10 @@ +concrete HelloIta of Hello = { + + lincat Greeting, Recipient = {s : Str} ; + + lin + Hello rec = {s = "ciao" ++ rec.s} ; + World = {s = "mondo"} ; + Mum = {s = "mamma"} ; + Friends = {s = "amici"} ; +} \ No newline at end of file diff --git a/examples/tutorial/syntax/MorphoEng.gf b/examples/tutorial/syntax/MorphoEng.gf new file mode 100644 index 000000000..b2255d0d4 --- /dev/null +++ b/examples/tutorial/syntax/MorphoEng.gf @@ -0,0 +1,69 @@ +--# -path=.:prelude + +resource MorphoEng = open Prelude in { + + -- the lexicon construction API + + oper + mkN : overload { + mkN : (bus : Str) -> Noun ; + mkN : (man,men : Str) -> Noun ; + } ; + + mkA : (warm : Str) -> Adjective ; + + mkV : overload { + mkV : (kiss : Str) -> Verb ; + mkV : (do,does : Str) -> Verb ; + } ; + + mkV2 : overload { + mkV2 : (love : Verb) -> Verb2 ; + mkV2 : (talk : Verb) -> (about : Str) -> Verb2 ; + } ; + + -- grammar-internal definitions + + param + Number = Sg | Pl ; + + oper + Noun, Verb : Type = {s : Number => Str} ; + Adjective : Type = {s : Str} ; + Verb2 : Type = Verb ** {c : Str} ; + + mkN = overload { + mkN : (bus : Str) -> Noun = \s -> mkNoun s (add_s s) ; + mkN : (man,men : Str) -> Noun = mkNoun ; + } ; + + mkA : (warm : Str) -> Adjective = ss ; + + mkV = overload { + mkV : (kiss : Str) -> Verb = \s -> mkVerb s (add_s s) ; + mkV : (do,does : Str) -> Verb = mkVerb ; + } ; + + mkV2 = overload { + mkV2 : (love : Verb) -> Verb2 = \love -> love ** {c = []} ; + mkV2 : (talk : Verb) -> (about : Str) -> Verb2 = + \talk,about -> talk ** {c = about} ; + } ; + + add_s : Str -> Str = \w -> case w of { + _ + "oo" => w + "s" ; -- bamboo + _ + ("s" | "z" | "x" | "sh" | "o") => w + "es" ; -- bus, hero + _ + ("a" | "o" | "u" | "e") + "y" => w + "s" ; -- boy + x + "y" => x + "ies" ; -- fly + _ => w + "s" -- car + } ; + + mkNoun : Str -> Str -> Noun = \x,y -> { + s = table { + Sg => x ; + Pl => y + } + } ; + + mkVerb : Str -> Str -> Verb = \x,y -> mkNoun y x ; + } diff --git a/examples/tutorial/syntax/MorphoIta.gf b/examples/tutorial/syntax/MorphoIta.gf new file mode 100644 index 000000000..7bf4de1a1 --- /dev/null +++ b/examples/tutorial/syntax/MorphoIta.gf @@ -0,0 +1,100 @@ +--# -path=.:prelude + + -- This is a simple Italian resource morphology for the GF tutorial. + + resource MorphoIta = open Prelude in { + + -- the lexicographer's API + + oper + masculine, feminine : Gender ; + + + + param + Number = Sg | Pl ; + Gender = Masc | Fem ; + + oper + Noun : Type = {s : Number => Str ; g : Gender} ; + Adjective : Type = {s : Gender => Number => Str} ; + + -- we will only use present indicative third person verb forms + + Verb : Type = {s : Number => Str} ; + + -- two-place verbs have a preposition + + Verb2 : Type = Verb ** {c : Str} ; + + -- this function takes the gender and both singular and plural forms + + mkNoun : Gender -> Str -> Str -> Noun = \g,vino,vini -> { + s = table { + Sg => vino ; + Pl => vini + } ; + g = g + } ; + + -- this function takes the singular form + + regNoun : Str -> Noun = \vino -> + case vino of { + vin + c@("c" | "g") + "a" + => mkNoun Fem vino (vin + c + "he") ; -- banche + vin + "a" + => mkNoun Fem vino (vin + "e") ; -- pizza + vin + c@("c" | "g") + "o" + => mkNoun Masc vino (vin + c + "hi") ; -- boschi + vin + ("o" | "e") + => mkNoun Masc vino (vin + "i") ; -- vino, pane + _ => mkNoun Masc vino vino -- tram + } ; + + -- to make nouns such as "carne", "università" feminine + + femNoun : Noun -> Noun = \mano -> { + s = mano.s ; + g = Fem + } ; + + -- this takes both genders and numbers + + mkAdjective : (x1,_,_,x4 : Str) -> Adjective = \nero,nera,neri,nere -> { + s = table { + Masc => (mkNoun Masc nero neri).s ; + Fem => (mkNoun Fem nera nere).s + } + } ; + + -- this takes the masculine singular form + + regAdjective : Str -> Adjective = \nero -> + let ner = init nero in + case last nero of { + "o" => mkAdjective (ner + "o") (ner + "a") (ner + "i") (ner + "e") ; + "e" => mkAdjective (ner + "e") (ner + "e") (ner + "i") (ner + "i") ; + _ => mkAdjective nero nero nero nero + } ; + + -- this function takes the singular and plural forms + + mkVerb : Str -> Str -> Verb = \ama,amano -> { + s = table { + Sg => ama ; + Pl => amano + } + } ; + + -- this function takes the infinitive form + + regVerb : Str -> Verb = \amare -> + let am = Predef.tk 3 amare in + case Predef.dp 3 amare of { + "ere" => mkVerb (am + "e") (am + "ono") ; -- premere + "ire" => mkVerb (am + "isce") (am + "iscono") ; -- finire + _ => mkVerb (am + "a") (am + "ano") -- amare + } ; + + } diff --git a/examples/tutorial/syntax/Syntax.gf b/examples/tutorial/syntax/Syntax.gf new file mode 100644 index 000000000..59ba7d770 --- /dev/null +++ b/examples/tutorial/syntax/Syntax.gf @@ -0,0 +1,60 @@ +abstract Syntax = { + + flags startcat=Phr ; + + cat + Phr ; -- any complete sentence e.g. "Is this pizza good?" + S ; -- declarative sentence e.g. "this pizza is good" + QS ; -- question sentence e.g. "is this pizza good" + NP ; -- noun phrase e.g. "this pizza" + IP ; -- interrogative phrase e.g "which pizza" + CN ; -- common noun phrase e.g. "very good pizza" + Det ; -- determiner e.g. "this" + AP ; -- adjectival phrase e.g. "very good" + AdA ; -- adadjective e.g. "very" + VP ; -- verb phrase e.g. "is good" + N ; -- noun e.g. "pizza" + A ; -- adjective e.g. "good" + V ; -- intransitive verb e.g. "boil" + V2 ; -- two-place verb e.g. "eat" + + fun + PhrS : S -> Phr ; + PhrQS : QS -> Phr ; + + PosVP, NegVP : NP -> VP -> S ; + QPosVP, QNegVP : NP -> VP -> QS ; + + IPPosVP, IPNegVP : IP -> VP -> QS ; + IPPosV2, IPNegV2 : IP -> NP -> V2 -> QS ; + + ComplV2 : V2 -> NP -> VP ; + ComplAP : AP -> VP ; + + DetCN : Det -> CN -> NP ; + + ModCN : AP -> CN -> CN ; + + AdAP : AdA -> AP -> AP ; + + WhichCN : CN -> IP ; + + UseN : N -> CN ; + UseA : A -> AP ; + UseV : V -> VP ; + + -- entries of the closed lexicon + + this_Det : Det ; + that_Det : Det ; + these_Det : Det ; + those_Det : Det ; + every_Det : Det ; + theSg_Det : Det ; + thePl_Det : Det ; + indef_Det : Det ; + plur_Det : Det ; + two_Det : Det ; + + very_AdA : AdA ; +} diff --git a/examples/tutorial/syntax/SyntaxEng.gf b/examples/tutorial/syntax/SyntaxEng.gf new file mode 100644 index 000000000..f1de47e21 --- /dev/null +++ b/examples/tutorial/syntax/SyntaxEng.gf @@ -0,0 +1,118 @@ +--# -path=.:prelude + +concrete SyntaxEng of Syntax = open Prelude, MorphoEng in { + + lincat + Phr = {s : Str} ; + S = {s : Str} ; + QS = {s : Str} ; + NP = NounPhrase ; + IP = NounPhrase ; + CN = Noun ; + Det = {s : Str ; n : Number} ; + AP = {s : Str} ; + AdA = {s : Str} ; + VP = VerbPhrase ; + N = Noun ; + A = {s : Str} ; + V = Verb ; + V2 = Verb2 ; + + lin + PhrS = postfixSS "." ; + PhrQS = postfixSS "?" ; + + PosVP = predVP True True ; + NegVP = predVP True False ; + QPosVP = predVP False True ; + QNegVP = predVP False False ; + IPPosVP = predVP True True ; + IPNegVP = predVP True False ; + + IPPosV2 ip np v2 = { + s = let + vp : VerbPhrase = {s = \\q,b,n => predVerb v2 q b n} ; + in + bothWays (ip.s ++ (predVP False True np vp).s) v2.c + } ; + IPNegV2 ip np v2 = { + s = let + vp : VerbPhrase = {s = \\q,b,n => predVerb v2 q b n} ; + in + bothWays (ip.s ++ (predVP False False np vp).s) v2.c + } ; + + + ComplV2 v2 np = { + s = \\q,b,n => + let vp = predVerb v2 q b n in + + } ; + + ComplAP ap = {s = \\_,b,n => } ; + + DetCN det cn = {s = det.s ++ cn.s ! det.n ; n = det.n} ; + + ModCN ap cn = {s = \\n => ap.s ++ cn.s ! n} ; + + AdAP ada ap = {s = ada.s ++ ap.s} ; + + WhichCN cn = {s = "which" ++ cn.s ! Sg ; n = Sg} ; + + UseN n = n ; + UseA a = a ; + UseV v = {s = \\q,b,n => predVerb v q b n} ; + + this_Det = {s = "this" ; n = Sg} ; + that_Det = {s = "that" ; n = Sg} ; + these_Det = {s = "these" ; n = Pl} ; + those_Det = {s = "those" ; n = Pl} ; + every_Det = {s = "every" ; n = Sg} ; + theSg_Det = {s = "the" ; n = Sg} ; + thePl_Det = {s = "the" ; n = Pl} ; + indef_Det = {s = artIndef ; n = Sg} ; + plur_Det = {s = [] ; n = Pl} ; + two_Det = {s = "two" ; n = Pl} ; + + very_AdA = {s = "very"} ; + + oper + NounPhrase = {s : Str ; n : Number} ; + VerbPhrase = {s : Bool => Bool => Number => Str * Str} ; -- decl, pol + + predVP : Bool -> Bool -> NounPhrase -> VerbPhrase -> SS = + \q,b,np,vp -> { + s = let vps = vp.s ! q ! b ! np.n + in case q of { + True => np.s ++ vps.p1 ++ vps.p2 ; + False => vps.p1 ++ np.s ++ vps.p2 + } + } ; + + copula : Bool -> Number -> Str = \b,n -> case n of { + Sg => posneg b "is" ; + Pl => posneg b "are" + } ; + + do : Bool -> Number -> Str = \b,n -> + posneg b ((mkV "do").s ! n) ; + + predVerb : Verb -> Bool -> Bool -> Number -> Str * Str = \verb,q,b,n -> + let + inf = verb.s ! Pl ; + fin = verb.s ! n ; + aux = do b n + in + case of { + => <[],fin> ; + _ => + } ; + + posneg : Bool -> Str -> Str = \b,do -> case b of { + True => do ; + False => do + "n't" + } ; + + artIndef : Str = + pre {"a" ; "an" / strs {"a" ; "e" ; "i" ; "o"}} ; +} diff --git a/examples/tutorial/syntax/SyntaxIta.gf b/examples/tutorial/syntax/SyntaxIta.gf new file mode 100644 index 000000000..4721a5d4e --- /dev/null +++ b/examples/tutorial/syntax/SyntaxIta.gf @@ -0,0 +1,102 @@ +--# -path=.:prelude + +concrete SyntaxIta of Syntax = open Prelude, MorphoIta in { + + lincat + Phr = {s : Str} ; + S = {s : Str} ; + QS = {s : Str} ; + NP = {s : Str ; g : Gender ; n : Number} ; + IP = {s : Str ; g : Gender ; n : Number} ; + CN = Noun ; + Det = {s : Gender => Str ; n : Number} ; + AP = {s : Gender => Number => Str} ; + AdA = {s : Str} ; + VP = {s : Bool => Gender => Number => Str} ; + + N = Noun ; + A = Adjective ; + V = Verb ; + V2 = Verb2 ; + + lin + PhrS = postfixSS "." ; + PhrQS = postfixSS "?" ; + + PosVP np vp = {s = np.s ++ vp.s ! True ! np.g ! np.n} ; + NegVP np vp = {s = np.s ++ vp.s ! False ! np.g ! np.n} ; + QPosVP np vp = {s = np.s ++ vp.s ! True ! np.g ! np.n} ; + QNegVP np vp = {s = np.s ++ vp.s ! False ! np.g ! np.n} ; + IPPosVP np vp = {s = np.s ++ vp.s ! True ! np.g ! np.n} ; + IPNegVP np vp = {s = np.s ++ vp.s ! False ! np.g ! np.n} ; + + IPPosV2 ip np v2 = {s = v2.c ++ ip.s ++ v2.s ! np.n ++ np.s} ; + IPNegV2 ip np v2 = {s = v2.c ++ ip.s ++ "non" ++ v2.s ! np.n ++ np.s} ; + + ComplV2 v2 np = {s = \\b,_,n => posneg b ++ v2.s ! n ++ v2.c ++ np.s} ; + ComplAP ap = {s = \\b,g,n => posneg b ++ copula n ++ ap.s ! g ! n} ; + + DetCN det cn = {s = det.s ! cn.g ++ cn.s ! det.n ; g = cn.g ; n = det.n} ; + + ModCN ap cn = {s = \\n => cn.s ! n ++ ap.s ! cn.g ! n ; g = cn.g} ; + + AdAP ada ap = {s = \\n,g => ada.s ++ ap.s ! n ! g} ; + + WhichCN cn = {s = "quale" ++ cn.s ! Sg ; g = cn.g ; n = Sg} ; + + UseN n = n ; + UseA a = a ; + UseV v = {s = \\b,_,n => posneg b ++ v.s ! n} ; + + + this_Det = mkDet Sg (regAdjective "questo") ; + that_Det = mkDet Sg (regAdjective "quello") ; + these_Det = mkDet Pl (regAdjective "questo") ; + those_Det = mkDet Pl (regAdjective "quello") ; + every_Det = {s = \\_ => "ogni" ; n = Sg} ; + theSg_Det = {s = artDef Sg ; n = Sg} ; + thePl_Det = {s = artDef Pl ; n = Pl} ; + indef_Det = {s = artIndef ; n = Sg} ; + plur_Det = {s = \\_ => [] ; n = Pl} ; + two_Det = {s = \\_ => "due" ; n = Pl} ; + + very_AdA = {s = "molto"} ; + + + oper + copula : Number -> Str = \n -> case n of { + Sg => "è" ; + Pl => "sono" + } ; + + posneg : Bool -> Str = \b -> case b of { + True => [] ; + False => "non" + } ; + + mkDet : Number -> Adjective -> Det = \n,adj -> { + s = \\g => adj.s ! g ! n ; + n = n ; + lock_Det = <> + } ; + + artDef : Number -> Gender => Str = \n -> case n of { + Sg => table { + Masc => pre {"il" ; "lo" / sImpuro} ; + Fem => "la" + } ; + Pl => table { + Masc => pre {"i" ; "gli" / sImpuro ; "gli" / vowel} ; + Fem => "le" + } + } ; + + artIndef : Gender => Str = table { + Masc => pre {"un" ; "uno" / sImpuro} ; + Fem => pre {"una" ; "un'" / vowel} + } ; + + sImpuro : Strs = strs {"sb" ; "sp" ; "sy" ; "z"} ; + vowel : Strs = strs {"a" ; "e" ; "i" ; "o" ; "u"} ; + +} diff --git a/examples/tutorial/syntax/Test.gf b/examples/tutorial/syntax/Test.gf new file mode 100644 index 000000000..3ced1e55a --- /dev/null +++ b/examples/tutorial/syntax/Test.gf @@ -0,0 +1,8 @@ +abstract Test = Syntax ** { + + fun + Wine, Cheese, Fish, Pizza, Waiter, Customer : N ; + Fresh, Warm, Italian, Expensive, Delicious, Boring : A ; + Stink : V ; + Eat, Love, Talk : V2 ; +} diff --git a/examples/tutorial/syntax/TestEng.gf b/examples/tutorial/syntax/TestEng.gf new file mode 100644 index 000000000..4099753f1 --- /dev/null +++ b/examples/tutorial/syntax/TestEng.gf @@ -0,0 +1,23 @@ +--# -path=.:resource:prelude + +concrete TestEng of Test = SyntaxEng ** open Prelude, MorphoEng in { + + lin + Wine = mkN "wine" ; + Cheese = mkN "cheese" ; + Fish = mkN "fish" "fish" ; + Pizza = mkN "pizza" ; + Waiter = mkN "waiter" ; + Customer = mkN "customer" ; + Fresh = mkA "fresh" ; + Warm = mkA "warm" ; + Italian = mkA "Italian" ; + Expensive = mkA "expensive" ; + Delicious = mkA "delicious" ; + Boring = mkA "boring" ; + Stink = mkV "stink" ; + Eat = mkV2 (mkV "eat") ; + Love = mkV2 (mkV "love") ; + Talk = mkV2 (mkV "talk") "about" ; +} + diff --git a/examples/tutorial/syntax/TestIta.gf b/examples/tutorial/syntax/TestIta.gf new file mode 100644 index 000000000..d58b258cd --- /dev/null +++ b/examples/tutorial/syntax/TestIta.gf @@ -0,0 +1,23 @@ +--# -path=.:resource:prelude + +concrete TestIta of Test = SyntaxIta ** open Prelude, MorphoIta in { + + lin + Wine = regNoun "vino" ; + Cheese = regNoun "formaggio" ; + Fish = regNoun "pesce" ; + Pizza = regNoun "pizza" ; + Waiter = regNoun "cameriere" ; + Customer = regNoun "cliente" ; + Fresh = regAdjective "fresco" ; + Warm = regAdjective "caldo" ; + Italian = regAdjective "italiano" ; + Expensive = regAdjective "caro" ; + Delicious = regAdjective "delizioso" ; + Boring = regAdjective "noioso" ; + Stink = regVerb "puzzare" ; + Eat = regVerb "mangiare" ** {c = []} ; + Love = regVerb "amare" ** {c = []} ; + Talk = regVerb "parlare" ** {c = "di"} ; +} + -- cgit v1.2.3