summaryrefslogtreecommitdiff
path: root/examples/lrec-tutorial
diff options
context:
space:
mode:
authorjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
committerjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
commitf5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch)
tree946c9e8542b8e8271b6b529a95c0400fa6613cb4 /examples/lrec-tutorial
parent8e1c6cca407c82fc09569d80c231b8d256735989 (diff)
Remove contribs and examples
Everything has now been moved to a separate repository at https://github.com/GrammaticalFramework/gf-contrib The contents of the examples folder are build during SetupWeb
Diffstat (limited to 'examples/lrec-tutorial')
-rw-r--r--examples/lrec-tutorial/Ara.gf8
-rw-r--r--examples/lrec-tutorial/AraAra.gf9
-rw-r--r--examples/lrec-tutorial/Arabic.gf110
-rw-r--r--examples/lrec-tutorial/Grammar.gf17
-rw-r--r--examples/lrec-tutorial/GrammarIta.gf80
-rw-r--r--examples/lrec-tutorial/GrammarIta0.gf80
-rw-r--r--examples/lrec-tutorial/Lang.gf9
-rw-r--r--examples/lrec-tutorial/LangIta.gf17
-rw-r--r--examples/lrec-tutorial/LexFaceIta.gf9
-rw-r--r--examples/lrec-tutorial/Morpho.gf82
-rw-r--r--examples/lrec-tutorial/One.gf42
-rw-r--r--examples/lrec-tutorial/ResIta.gf154
-rw-r--r--examples/lrec-tutorial/Zero.gf9
-rw-r--r--examples/lrec-tutorial/ZeroDut.gf18
-rw-r--r--examples/lrec-tutorial/ZeroEng.gf11
-rw-r--r--examples/lrec-tutorial/ZeroFre.gf16
-rw-r--r--examples/lrec-tutorial/ZeroGer.gf19
-rw-r--r--examples/lrec-tutorial/ZeroHeb.gf24
-rw-r--r--examples/lrec-tutorial/ZeroHebTr.gf20
-rw-r--r--examples/lrec-tutorial/ZeroIta.gf16
-rw-r--r--examples/lrec-tutorial/ZeroLat.gf17
-rw-r--r--examples/lrec-tutorial/face/Face.gf14
-rw-r--r--examples/lrec-tutorial/face/FaceEn0.gf22
-rw-r--r--examples/lrec-tutorial/face/FaceEng.gf7
-rw-r--r--examples/lrec-tutorial/face/FaceFin.gf7
-rw-r--r--examples/lrec-tutorial/face/FaceI.gf17
-rw-r--r--examples/lrec-tutorial/face/FaceIta.gf8
-rw-r--r--examples/lrec-tutorial/face/LexFace.gf8
-rw-r--r--examples/lrec-tutorial/face/LexFaceEng.gf8
-rw-r--r--examples/lrec-tutorial/face/LexFaceFin.gf7
-rw-r--r--examples/lrec-tutorial/face/LexFaceIta.gf6
31 files changed, 0 insertions, 871 deletions
diff --git a/examples/lrec-tutorial/Ara.gf b/examples/lrec-tutorial/Ara.gf
deleted file mode 100644
index 14fbb2573..000000000
--- a/examples/lrec-tutorial/Ara.gf
+++ /dev/null
@@ -1,8 +0,0 @@
-abstract Ara = {
-
-cat S ; V ;
-
-fun ktb_V : V ;
-
- Tab : V -> S ;
-}
diff --git a/examples/lrec-tutorial/AraAra.gf b/examples/lrec-tutorial/AraAra.gf
deleted file mode 100644
index b97229ed3..000000000
--- a/examples/lrec-tutorial/AraAra.gf
+++ /dev/null
@@ -1,9 +0,0 @@
-concrete AraAra of Ara = open Arabic in {
-
-lincat V = Verb ; S = Str ;
-
-lin ktb_V = u_Verb "ktb" ;
-
- Tab v = verbTable v ;
-
-}
diff --git a/examples/lrec-tutorial/Arabic.gf b/examples/lrec-tutorial/Arabic.gf
deleted file mode 100644
index 0ac3642d5..000000000
--- a/examples/lrec-tutorial/Arabic.gf
+++ /dev/null
@@ -1,110 +0,0 @@
-resource Arabic = {
-oper
- Root : Type = {F,C,L : Str} ;
- Pattern : Type = {F,FC,CL,L : Str} ;
-
- appPattern : Root -> Pattern -> Str = \r,p ->
- p.F + r.F + p.FC + r.C + p.CL + r.L + p.L ;
-
- getRoot : Str -> Root = \s -> case s of {
- F@? + C@? + L => {F = F ; C = C ; L = L} ;
- _ => Predef.error ("cannot get root from" ++ s)
- } ;
-
- getPattern : Str -> Pattern = \s -> case s of {
- F + "F" + FC + "C" + CL + "L" + L => {F = F ; FC = FC ; CL = CL ; L = L} ;
- _ => Predef.error ("cannot get pattern from" ++ s)
- } ;
-
- getWord : Str -> Str -> Str = \r,p ->
- appPattern (getRoot r) (getPattern p) ;
-
-param
- Number = Sg | Dl | Pl ;
- Gender = Masc | Fem ;
- Tense = Perf | Impf ;
-
- VPer = Vp3 Number Gender | Vp2Sg Gender | Vp2Dl | Vp2Pl Gender | Vp1Sg | Vp1Pl ;
-
-oper
- Verb : Type = {s : Tense => VPer => Str} ;
-
- pattV_u : Tense -> VPer -> Pattern = \t,v -> getPattern (case t of {
- Perf => case v of {
- Vp3 Sg Masc => "FaCaLa" ;
- Vp3 Sg Fem => "FaCaLat" ;
- Vp3 Dl Masc => "FaCaLaA" ;
- Vp3 Dl Fem => "FaCaLataA" ;
- Vp3 Pl Masc => "FaCaLuwA" ;
- Vp3 Pl Fem => "FaCaLona" ;
-
- Vp2Sg Masc => "FaCaLota" ;
- Vp2Sg Fem => "FaCaLoti" ;
- Vp2Dl => "FaCaLotumaA" ;
- Vp2Pl Masc => "FaCaLotum" ;
- Vp2Pl Fem => "FaCaLotunv2a" ;
-
- Vp1Sg => "FaCaLotu" ;
- Vp1Pl => "FaCaLonaA"
- } ;
- Impf => case v of {
- Vp3 Sg Masc => "yaFoCuLu" ;
- Vp3 Sg Fem => "taFoCuLu" ;
- Vp3 Dl Masc => "yaFoCuLaAni" ;
- Vp3 Dl Fem => "taFoCuLaAni" ;
- Vp3 Pl Masc => "yaFoCuLuwna" ;
- Vp3 Pl Fem => "yaFoCuLna" ;
-
- Vp2Sg Masc => "taFoCuLu" ;
- Vp2Sg Fem => "taFoCuLiyna" ;
- Vp2Dl => "taFoCuLaAni" ;
- Vp2Pl Masc => "taFoCuLuwna" ;
- Vp2Pl Fem => "taFoCuLona" ;
-
- Vp1Sg => "A?aFoCuLu" ;
- Vp1Pl => "naFoCuLu"
- }
- }) ;
-
- u_Verb : Str -> Verb = \s -> {
- s = \\t,p => appPattern (getRoot s) (pattV_u t p)
- } ;
-
--- for html
-
- tag : Str -> Str = \t -> "<" + t + ">" ;
- etag : Str -> Str = \t -> "</" + t + ">" ;
- atag : Str -> Str -> Str = \t,a -> "<" + t ++ a + ">" ;
-
- intag : Str -> Str -> Str = \t,s -> tag t ++ s ++ etag t ;
- intagAttr : Str -> Str -> Str -> Str = \t,a,s -> atag t a ++ s ++ etag t ;
-
- verbTable : Verb -> Str = \v ->
- let
- vsp = v.s ! Perf ;
- vsi = v.s ! Impf ;
- tr : Str -> Str = intag "tr" ;
- td : Str -> Str = intag "td" ;
- ts : Str -> Str = \s -> td ("\"" ++ s ++ "\"") ;
- trs : Str -> Str -> VPer -> Str = \s,n,v ->
- tr (td s ++ td n ++ ts (vsp ! v) ++ ts (vsi ! v))
- in
- intagAttr "table" "border=1" (
- tr ((td "Persona") ++ (td "Numerus") ++ (td "Perfectum") ++ (td "Imperfectum")) ++
- trs "3. masc." "sing." (Vp3 Sg Masc) ++
- trs "3. fem." "sing." (Vp3 Sg Fem) ++
- trs "2. masc." "sing." (Vp2Sg Masc) ++
- trs "2. fem." "sing." (Vp2Sg Fem) ++
- trs "1." "sing." (Vp1Sg) ++
- trs "3. masc." "dual." (Vp3 Dl Masc) ++
- trs "3. fem." "dual." (Vp3 Dl Fem) ++
- trs "2." "dual." (Vp2Dl) ++
- trs "3. masc." "plur." (Vp3 Pl Masc) ++
- trs "3. fem." "plur." (Vp3 Pl Fem) ++
- trs "2. masc." "plur." (Vp2Pl Masc) ++
- trs "2. fem." "plur." (Vp2Pl Fem) ++
- trs "1." "plur." (Vp1Pl)
- ) ;
-
-
-}
diff --git a/examples/lrec-tutorial/Grammar.gf b/examples/lrec-tutorial/Grammar.gf
deleted file mode 100644
index c7872869c..000000000
--- a/examples/lrec-tutorial/Grammar.gf
+++ /dev/null
@@ -1,17 +0,0 @@
-abstract Grammar = {
- cat
- Cl ; NP ; VP ; AP ; CN ; Det ; N ; A ; V ; V2 ;
- fun
- PredVP : NP -> VP -> Cl ;
- ComplV2 : V2 -> NP -> VP ;
- DetCN : Det -> CN -> NP ;
- ModCN : CN -> AP -> CN ;
-
- UseV : V -> VP ;
- UseN : N -> CN ;
- UseA : A -> AP ;
-
- a_Det, the_Det : Det ;
- this_Det, these_Det : Det ;
- i_NP, she_NP, we_NP : NP ;
-}
diff --git a/examples/lrec-tutorial/GrammarIta.gf b/examples/lrec-tutorial/GrammarIta.gf
deleted file mode 100644
index caa5b9b02..000000000
--- a/examples/lrec-tutorial/GrammarIta.gf
+++ /dev/null
@@ -1,80 +0,0 @@
-concrete GrammarIta of Grammar = open ResIta, Prelude in {
- lincat
- Cl = {s : ResIta.Tense => Str} ;
- NP = ResIta.NP ; -- {s : Case => {clit,obj : Str} ; a : Agr} ;
- VP = ResIta.VP ; -- {v : Verb ; clit : Str ; obj : Str} ;
- AP = {s : Gender => Number => Str ; isPre : Bool} ;
- CN = Noun ; -- {s : Number => Str ; g : Gender} ;
- Det = {s : Gender => Case => Str ; n : Number} ;
- N = Noun ; -- {s : Number => Str ; g : Gender} ;
- A = Adj ; -- {s : Gender => Number => Str ; isPre : Bool} ;
- V = Verb ; -- {s : VForm => Str ; aux : Aux} ;
- V2 = Verb ** {c : Case} ;
-
- lin
- PredVP np vp =
- let
- subj = (np.s ! Nom).obj ;
- obj = vp.obj ;
- clit = vp.clit ;
- verb = table {
- Pres => agrV vp.v np.a ;
- Perf => agrV (auxVerb vp.v.aux) np.a ++ agrPart vp.v np.a
- }
- in {
- s = \\t => subj ++ clit ++ verb ! t ++ obj
- } ;
-
- ComplV2 v2 np =
- let
- nps = np.s ! v2.c
- in {
- v = {s = v2.s ; aux = v2.aux} ;
- clit = nps.clit ;
- obj = nps.obj
- } ;
-
- UseV v = {
- v = v ;
- clit = [] ;
- obj = []
- } ;
-
- DetCN det cn = {
- s = \\c => {obj = det.s ! cn.g ! c ++ cn.s ! det.n ; clit = []} ;
- a = Ag cn.g det.n Per3
- } ;
-
- ModCN cn ap = {
- s = \\n => preOrPost ap.isPre (ap.s ! cn.g ! n) (cn.s ! n) ;
- g = cn.g
- } ;
-
- UseN n = n ;
-
- UseA adj = adj ;
-
- a_Det = adjDet (mkA "un" "una" [] [] True) Sg ;
-
- the_Det = {
- s = table {
- Masc => table {
- Nom | Acc => pre {"il" ; "lo" / s_impuro ; "l'" / vowel} ;
- Dat => pre {"al" ; "allo" / s_impuro ; "all'" / vowel}
- } ;
- Fem => table {
- Nom | Acc => pre {"la" ; "l'" / vowel} ;
- Dat => pre {"alla" ; "all'" / vowel}
- }
- } ;
- n = Sg
- } ;
-
- this_Det = adjDet (mkA "questo") Sg ;
- these_Det = adjDet (mkA "questo") Pl ;
-
- i_NP = pronNP "io" "mi" "mi" Masc Sg Per1 ;
- she_NP = pronNP "lei" "la" "le" Fem Sg Per3 ;
- we_NP = pronNP "noi" "ci" "ci" Masc Pl Per1 ;
-
-}
diff --git a/examples/lrec-tutorial/GrammarIta0.gf b/examples/lrec-tutorial/GrammarIta0.gf
deleted file mode 100644
index 0e87b36e4..000000000
--- a/examples/lrec-tutorial/GrammarIta0.gf
+++ /dev/null
@@ -1,80 +0,0 @@
-concrete GrammarIta of Grammar = open ResIta, Prelude in {
- lincat
- Cl = {s : Tense => Str} ;
- NP = {s : Case => Str ; a : Agr} ;
- VP = {s : VForm => Str ; aux : Aux} ;
- AP = {s : Gender => Number => Str} ;
- CN = {s : Number => Str ; g : Gender} ;
- Det = {s : Gender => Case => Str ; n : Number} ;
- N = {s : Number => Str ; g : Gender} ;
- A = {s : Gender => Number => Str} ;
- V = {s : VForm => Str ; aux : Aux} ;
- V2 = Verb ** {c : Preposition} ;
-
- lin
- PredVP np vp =
- let
- subj = np.s ! Nom ;
- obj = vp.obj ;
- clit = vp.clit ;
- verb = table {
- Pres => agrV vp ;
- Perf => agrV (auxVerb vp.aux) np.a ++ agrPart vp np.a
- }
- in {
- s = \\t => subj ++ clit ++ verb ! t ++ obj
- } ;
-
- ComplV2 v2 np =
- let
- nps = np.s ! v2.c.c
- in {
- v = {s = v2.s ; aux = v2.aux} ;
- clit = nps.clit ;
- obj = v2.c.p ++ nps.obj
- } ;
-
- UseV v = {
- v = v ;
- clit = [] ;
- obj = []
- } ;
-
- DetCN det cn = {
- s = \\c => {obj = det.s ! cn.g ! c ++ cn.s ! det.n ; clit = []} ;
- a = Ag cn.g det.n Per3
- } ;
-
- ModCN cn ap = {
- s = \\n => preOrPost ap.isPre (ap.s ! cn.g ! n) (cn.s ! n) ;
- g = cn.g
- } ;
-
- UseN n = n ;
-
- UseA adj = adj ;
-
- a_Det = adjDet (mkA "un" "una" [] [] True) Sg ;
-
- the_Det = {
- s = table {
- Masc => table {
- Nom | Acc => pre {"il" ; "lo" / s_impuro ; "l'" / vowel} ;
- Dat => pre {"al" ; "allo" / s_impuro ; "all'" / vowel}
- } ;
- Fem => table {
- Nom | Acc => pre {"la" ; "l'" / vowel} ;
- Dat => pre {"alla" ; "all'" / vowel}
- }
- } ;
- n = Sg
- } ;
-
- this_Det = adjDet (mkA "questo") Sg ;
- these_Det = adjDet (mkA "questo") Pl ;
-
- i_NP = pronNP "io" "mi" "mi" Masc Sg Per1 ;
- she_NP = pronNP "lei" "la" "le" Fem Sg Per3 ;
- we_NP = pronNP "noi" "ci" "ci" Masc Pl Per1 ;
-
-}
diff --git a/examples/lrec-tutorial/Lang.gf b/examples/lrec-tutorial/Lang.gf
deleted file mode 100644
index b024a2331..000000000
--- a/examples/lrec-tutorial/Lang.gf
+++ /dev/null
@@ -1,9 +0,0 @@
-abstract Lang = Grammar ** {
-
-fun
- man_N, woman_N, house_N, tree_N : N ;
- big_A, small_A, green_A : A ;
- walk_V, arrive_V : V ;
- love_V2, please_V2 : V2 ;
-
-} ;
diff --git a/examples/lrec-tutorial/LangIta.gf b/examples/lrec-tutorial/LangIta.gf
deleted file mode 100644
index 41aabf6c1..000000000
--- a/examples/lrec-tutorial/LangIta.gf
+++ /dev/null
@@ -1,17 +0,0 @@
-concrete LangIta of Lang = GrammarIta ** open ResIta in {
-
-lin
- man_N = mkN "uomo" "uomini" Masc ;
- woman_N = mkN "donna" ;
- house_N = mkN "casa" ;
- tree_N = mkN "albero" ;
- big_A = preA (mkA "grande") ;
- small_A = preA (mkA "piccolo") ;
- green_A = mkA "verde" ;
- walk_V = mkV "camminare" ;
- arrive_V = essereV (mkV "arrivare") ;
- love_V2 = mkV2 "amare" ;
- please_V2 = mkV2 (mkV "piacere" "piaccio" "piaci" "piace"
- "piacciamo" "piacete" "piacciono" "piaciuto" Essere) Dat ;
-
-} ;
diff --git a/examples/lrec-tutorial/LexFaceIta.gf b/examples/lrec-tutorial/LexFaceIta.gf
deleted file mode 100644
index cf1523440..000000000
--- a/examples/lrec-tutorial/LexFaceIta.gf
+++ /dev/null
@@ -1,9 +0,0 @@
-instance LexFaceIta of LexFace = open SyntaxIta, ParadigmsIta, LexiconIta in {
-
-oper
- like_V2 = mkV2 "amare" ;
- invitation_N = mkN "invitazione" feminine ;
- friend_N = mkN "amico" ;
- have_V2 = LexiconIta.have_V2 ;
-
-}
diff --git a/examples/lrec-tutorial/Morpho.gf b/examples/lrec-tutorial/Morpho.gf
deleted file mode 100644
index dfa465483..000000000
--- a/examples/lrec-tutorial/Morpho.gf
+++ /dev/null
@@ -1,82 +0,0 @@
-resource Morpho = open Prelude in {
-
-param
- VForm = VInf | VPres | VPast | VPastPart | VPresPart ;
-
-oper
- Verb : Type = {s : VForm => Str} ;
-
--- worst-case function for data abstraction
-
- mkVerb : (_,_,_,_,_ : Str) -> Verb = \vi,vpr,vpa,vpap,vprp -> {
- s = table {
- VInf => vi ;
- VPres => vpr ;
- VPast => vpa ;
- VPastPart => vpap ;
- VPresPart => vprp
- }
- } ;
-
- regVerb : Str -> Verb = \walk ->
- mkVerb walk (walk + "s") (walk + "ed") (walk + "ed") (walk + "ing") ;
-
- s_regVerb : Str -> Verb = \kiss ->
- mkVerb kiss (kiss + "es") (kiss + "ed") (kiss + "ed") (kiss + "ing") ;
-
- e_regVerb : Str -> Verb = \use ->
- let us = init use
- in
- mkVerb use (use + "s") (us + "ed") (us + "ed") (us + "ing") ;
-
- y_regVerb : Str -> Verb = \cry ->
- let cr = init cry
- in
- mkVerb cry (cr + "ies") (cr + "ied") (cr + "ied") (cry + "ing") ;
-
- ie_regVerb : Str -> Verb = \die ->
- let dy = Predef.tk 2 die + "y"
- in
- mkVerb die (die + "s") (die + "d") (die + "d") (dy + "ing") ;
-
- dupRegVerb : Str -> Verb = \stop ->
- let stopp = stop + last stop
- in
- mkVerb stop (stop + "s") (stopp + "ed") (stopp + "ed") (stopp + "ing") ;
-
- smartVerb : Str -> Verb = \v -> case v of {
- _ + ("s"|"z"|"x"|"ch") => s_regVerb v ;
- _ + "ie" => ie_regVerb v ;
- _ + "ee" => mkVerb v (v + "s") (v + "d") (v + "d") (v + "ing") ;
- _ + "e" => e_regVerb v ;
- _ + ("a"|"e"|"o"|"u") + "y" => regVerb v ;
- _ + "y" => y_regVerb v ;
- _ + ("ea"|"ee"|"ie"|"oa"|"oo"|"ou") + ? => regVerb v ;
- _ + ("a"|"e"|"i"|"o"|"u") +
- ("b"|"d"|"g"|"m"|"n"|"p"|"s"|"t") => dupRegVerb v ;
- _ => regVerb v
- } ;
-
- irregVerb : (_,_,_ : Str) -> Verb = \sing,sang,sung ->
- let v = smartVerb sing
- in
- mkVerb sing (v.s ! VPres) sang sung (v.s ! VPresPart) ;
-
--- first example of matching
-
- add_s : Str -> Str = \v -> case v of {
- _ + ("s"|"z"|"x"|"ch") => v + "es" ;
- _ + ("a"|"e"|"o"|"u") + "y" => v + "s" ;
- cr + "y" => cr + "ies" ;
- _ => v + "s"
- } ;
-
--- user paradigm
-
- mkV = overload {
- mkV : (cry : Str) -> Verb = smartVerb ;
- mkV : (sing,sang,sung : Str) -> Verb = irregVerb ;
- mkV : (go,goes,went,gone,going : Str) -> Verb = mkVerb ;
- } ;
-
-}
diff --git a/examples/lrec-tutorial/One.gf b/examples/lrec-tutorial/One.gf
deleted file mode 100644
index 4d0e94397..000000000
--- a/examples/lrec-tutorial/One.gf
+++ /dev/null
@@ -1,42 +0,0 @@
-abstract One = {
- cat
- S ;
- Cl ;
- NP ;
- VP ;
- AP ;
- CN ;
- Det ;
- Pron ;
- PN ;
- N ;
- A ;
- V ;
- V2 ;
- Adv ;
- Prep ;
- Pol ;
- Tense ;
- fun
- DeclCl : Tense -> Pol -> Cl -> S ;
- QuestCl : Tense -> Pol -> Cl -> S ;
-
- PredVP : NP -> VP -> Cl ;
-
- ComplV2 : V2 -> NP -> VP ;
- UseAP : AP -> VP ;
- UseV : V -> VP ;
- AdVP : VP -> Adv -> VP ;
-
- DetCN : Det -> CN -> NP ;
- UsePN : PN -> NP ;
- UsePron : Pron -> NP ;
-
- ModCN : CN -> AP -> CN ;
- UseN : N -> CN ;
-
- UseA : A -> AP ;
-
- AdvA : A -> Adv ;
- PrepNP : Prep -> NP -> Adv ;
-}
diff --git a/examples/lrec-tutorial/ResIta.gf b/examples/lrec-tutorial/ResIta.gf
deleted file mode 100644
index 51066450d..000000000
--- a/examples/lrec-tutorial/ResIta.gf
+++ /dev/null
@@ -1,154 +0,0 @@
-resource ResIta = open Prelude in {
-
--- parameters
-
-param
- Number = Sg | Pl ;
- Gender = Masc | Fem ;
- Case = Nom | Acc | Dat ;
- Agr = Ag Gender Number Person ;
- Aux = Avere | Essere ;
- Tense = Pres | Perf ;
- Person = Per1 | Per2 | Per3 ;
-
- VForm = VInf | VPres Number Person | VPart Gender Number ;
-
--- parts of speech
-
-oper
- VP = {v : Verb ; clit : Str ; obj : Str} ;
- NP = {s : Case => {clit,obj : Str} ; a : Agr} ;
-
--- auxiliaries
-
- prepCase : Case -> Str = \c -> case c of {
- Dat => "a" ;
- _ => []
- } ;
-
- adjDet : Adj -> Number -> {s : Gender => Case => Str ; n : Number} = \adj,n -> {
- s = \\g,c => prepCase c ++ adj.s ! g ! n ;
- n = n
- } ;
-
- pronNP : (s,a,d : Str) -> Gender -> Number -> Person -> NP = \s,a,d,g,n,p -> {
- s = table {
- Nom => {clit = [] ; obj = s} ;
- Acc => {clit = a ; obj = []} ;
- Dat => {clit = d ; obj = []}
- } ;
- a = Ag g n p
- } ;
-
--- predication
-
- agrV : Verb -> Agr -> Str = \v,a -> case a of {
- Ag _ n p => v.s ! VPres n p
- } ;
-
- auxVerb : Aux -> Verb = \a -> case a of {
- Avere => mkVerb "avere" "ho" "hai" "ha" "abbiamo" "avete" "hanno" "avuto" Avere ;
- Essere => mkVerb "essere" "sono" "sei" "è" "siamo" "siete" "sono" "stato" Essere
- } ;
-
- agrPart : Verb -> Agr -> Str = \v,a -> case v.aux of {
- Avere => v.s ! VPart Masc Sg ;
- Essere => case a of {
- Ag g n _ => v.s ! VPart g n
- }
- } ;
-
- neg : Bool -> Str = \b -> case b of {True => [] ; False => "non"} ;
-
---------------------------------------------------------
--- morphology
-
- Noun : Type = {s : Number => Str ; g : Gender} ;
- Adj : Type = {s : Gender => Number => Str ; isPre : Bool} ;
- Verb : Type = {s : VForm => Str ; aux : Aux} ;
-
- mkNoun : Str -> Str -> Gender -> Noun = \vino,vini,g -> {
- s = table {Sg => vino ; Pl => vini} ;
- g = g
- } ;
-
- regNoun : Str -> Noun = \vino -> case vino of {
- fuo + c@("c"|"g") + "o" => mkNoun vino (fuo + c + "hi") Masc ;
- ol + "io" => mkNoun vino (ol + "i") Masc ;
- vin + "o" => mkNoun vino (vin + "i") Masc ;
- cas + "a" => mkNoun vino (cas + "e") Fem ;
- pan + "e" => mkNoun vino (pan + "i") Masc ;
- _ => mkNoun vino vino Masc
- } ;
-
- mkN = overload {
- mkN : (vino : Str) -> Noun = regNoun ;
- mkN : (uomo, uomini : Str) -> Gender -> Noun = mkNoun ;
- } ;
-
- mkAdj : (_,_,_,_ : Str) -> Bool -> Adj = \buono,buona,buoni,buone,p -> {
- s = table {
- Masc => table {Sg => buono ; Pl => buoni} ;
- Fem => table {Sg => buona ; Pl => buone}
- } ;
- isPre = p
- } ;
-
- regAdj : Str -> Adj = \nero -> case nero of {
- ner + "o" => mkAdj nero (ner + "a") (ner + "i") (ner + "e") False ;
- verd + "e" => mkAdj nero nero (verd + "i") (verd + "i") False ;
- _ => mkAdj nero nero nero nero False
- } ;
-
- mkA = overload {
- mkA : (nero : Str) -> Adj = regAdj ;
- mkN : (buono,buona,buoni,buone : Str) -> Bool -> Adj = mkAdj ;
- } ;
-
- preA : Adj -> Adj = \a -> {s = a.s ; isPre = True} ;
-
- mkVerb : (_,_,_,_,_,_,_,_ : Str) -> Aux -> Verb =
- \amare,amo,ami,ama,amiamo,amate,amano,amato,aux -> {
- s = table {
- VInf => amare ;
- VPres Sg Per1 => amo ;
- VPres Sg Per2 => ami ;
- VPres Sg Per3 => ama ;
- VPres Pl Per1 => amiamo ;
- VPres Pl Per2 => amate ;
- VPres Pl Per3 => amano ;
- VPart g n => (regAdj amato).s ! g ! n
- } ;
- aux = aux
- } ;
-
- regVerb : Str -> Verb = \amare -> case amare of {
- am + "are" => mkVerb amare (am+"o") (am+"i") (am+"a")
- (am+"iamo") (am+"ate") (am+"ano") (am+"ato") Avere ;
- tem + "ere" => mkVerb amare (tem+"o") (tem+"i") (tem+"e")
- (tem+"iamo") (tem+"ete") (tem+"ono") (tem+"uto") Avere ;
- fin + "ire" => mkVerb amare (fin+"isco") (fin+"isci") (fin+"isce")
- (fin+"iamo") (fin+"ite") (fin+"iscono") (fin+"ito") Avere
- } ;
-
- mkV = overload {
- mkV : (finire : Str) -> Verb = regVerb ;
- mkV : (andare,vado,vadi,va,andiamo,andate,vanno,andato : Str) ->
- Aux -> Verb = mkVerb ;
- } ;
-
- essereV : Verb -> Verb = \v -> {s = v.s ; aux = Essere} ;
-
- Verb2 = Verb ** {c : Case} ;
-
- mkV2 = overload {
- mkV2 : (amare : Str) -> Verb2 = \v -> regVerb v ** {c = Acc} ;
- mkV2 : (amare : Verb) -> Case -> Verb2 = \v,p -> v ** {c = p} ;
- } ;
-
--- phonological auxiliaries
-
- vowel : Strs = strs {"a" ; "e" ; "i" ; "o" ; "u" ; "h"} ;
- s_impuro : Strs = strs {"z" ; "sb" ; "sc" ; "sd" ; "sf" ; "sp"} ; --- ...
-
-}
diff --git a/examples/lrec-tutorial/Zero.gf b/examples/lrec-tutorial/Zero.gf
deleted file mode 100644
index 5ff16de34..000000000
--- a/examples/lrec-tutorial/Zero.gf
+++ /dev/null
@@ -1,9 +0,0 @@
-abstract Zero = {
- cat
- S ; NP ; VP ; V2 ;
- fun
- Pred : NP -> VP -> S ;
- Compl : V2 -> NP -> VP ;
- John, Mary : NP ;
- Love : V2 ;
-}
diff --git a/examples/lrec-tutorial/ZeroDut.gf b/examples/lrec-tutorial/ZeroDut.gf
deleted file mode 100644
index efe8bbda4..000000000
--- a/examples/lrec-tutorial/ZeroDut.gf
+++ /dev/null
@@ -1,18 +0,0 @@
-concrete ZeroDut of Zero = {
- lincat
- S, NP, VP = Str ;
- V2 = {v,p : Str} ;
- lin
- Pred np vp = np ++ vp ;
- Compl v2 np = v2.v ++ np ++ v2.p ;
- John = "Jan" ;
- Mary = "Marie" ;
- Love = {v = "heeft" ; p = "lief"} ;
-}
-
---.
-
--- illustrates: discontinuous constituents
---
--- > p -lang=ZeroEng "John loves Mary" | aw -view=open -format=png
-
diff --git a/examples/lrec-tutorial/ZeroEng.gf b/examples/lrec-tutorial/ZeroEng.gf
deleted file mode 100644
index 146c083cf..000000000
--- a/examples/lrec-tutorial/ZeroEng.gf
+++ /dev/null
@@ -1,11 +0,0 @@
-concrete ZeroEng of Zero = {
- lincat
- S, NP, VP, V2 = Str ;
- lin
- Pred np vp = np ++ vp ;
- Compl v2 np = v2 ++ np ;
- John = "John" ;
- Mary = "Mary" ;
- Love = "loves" ;
-}
-
diff --git a/examples/lrec-tutorial/ZeroFre.gf b/examples/lrec-tutorial/ZeroFre.gf
deleted file mode 100644
index 96b0dcf73..000000000
--- a/examples/lrec-tutorial/ZeroFre.gf
+++ /dev/null
@@ -1,16 +0,0 @@
-concrete ZeroFre of Zero = {
- lincat
- S, NP, VP, V2 = Str ;
- lin
- Pred np vp = np ++ vp ;
- Compl v2 np = v2 ++ np ;
- John = "Jean" ;
- Mary = "Marie" ;
- Love = "aime" ;
-}
-
---.
-
--- > gr | l
--- > p -lang=ZeroEng "John loves Mary" | l -lang=ZeroFre
-
diff --git a/examples/lrec-tutorial/ZeroGer.gf b/examples/lrec-tutorial/ZeroGer.gf
deleted file mode 100644
index ab12ddf99..000000000
--- a/examples/lrec-tutorial/ZeroGer.gf
+++ /dev/null
@@ -1,19 +0,0 @@
-concrete ZeroGer of Zero = {
- lincat
- S, NP, VP = Str ;
- V2 = {v,p : Str} ;
- lin
- Pred np vp = np ++ vp ;
- Compl v2 np = v2.v ++ np ++ v2.p ;
- John = "Johann" ;
- Mary = "Maria" ;
- Love = {v = "hat" ; p = "lieb"} ;
-}
-
---.
-
--- illustrates: discontinuous constituents
--- contrived, since we also have "liebt"
---
--- > p -lang=ZeroEng "John loves Mary" | aw -view=open -format=png
-
diff --git a/examples/lrec-tutorial/ZeroHeb.gf b/examples/lrec-tutorial/ZeroHeb.gf
deleted file mode 100644
index 4c8d4a85b..000000000
--- a/examples/lrec-tutorial/ZeroHeb.gf
+++ /dev/null
@@ -1,24 +0,0 @@
-
- concrete ZeroHeb of Zero = {
- flags coding=utf8 ;
- lincat
- S = Str ;
- NP = {s : Str ; g : Gender} ;
- VP, V2 = Gender => Str ;
- lin
- Pred np vp = np.s ++ vp ! np.g ;
- Compl v2 np = table {g => v2 ! g ++ "×ת" ++ np.s} ;
- John = {s = "ג׳ון" ; g = Masc} ;
- Mary = {s = "מרי" ; g = Fem} ;
- Love = table {Masc => "×והב" ; Fem => "×והבת"} ;
- param
- Gender = Masc | Fem ;
- }
-
---.
--- illustrates: transliteration, inherent features, agreement
--- > gr | l -to_hebrew
--- > ut -hebrew
--- > rf -file=ZeroHeb.gf | ps -env=quotes -to_hebrew
--- > dc amac aw -format=png -view=open ?0
--- > gr | %amac
diff --git a/examples/lrec-tutorial/ZeroHebTr.gf b/examples/lrec-tutorial/ZeroHebTr.gf
deleted file mode 100644
index d60290f92..000000000
--- a/examples/lrec-tutorial/ZeroHebTr.gf
+++ /dev/null
@@ -1,20 +0,0 @@
-concrete ZeroHebTr of Zero = {
- lincat
- S = Str ;
- NP = {s : Str ; g : Gender} ;
- VP, V2 = Gender => Str ;
- lin
- Pred np vp = np.s ++ vp ! np.g ;
- Compl v2 np = table {g => v2 ! g ++ "At" ++ np.s} ;
- John = {s = "gg1wN" ; g = Masc} ;
- Mary = {s = "mry" ; g = Fem} ;
- love = table {Masc => "Awhb" ; Fem => "Awhbt"} ;
- param
- Gender = Masc | Fem ;
-}
-
---.
--- illustrates: transliteration, inherent features, agreement
--- > gr | l -to_hebrew
--- > ut -hebrew
--- > rf -file=ZeroHeb.gf | ps -env=quotes -to_hebrew
diff --git a/examples/lrec-tutorial/ZeroIta.gf b/examples/lrec-tutorial/ZeroIta.gf
deleted file mode 100644
index 254fa17ca..000000000
--- a/examples/lrec-tutorial/ZeroIta.gf
+++ /dev/null
@@ -1,16 +0,0 @@
-concrete ZeroIta of Zero = {
- lincat
- S, NP, VP, V2 = Str ;
- lin
- Pred np vp = np ++ vp ;
- Compl v2 np = v2 ++ np ;
- John = "Giovanni" ;
- Mary = "Maria" ;
- Love = "ama" ;
-}
-
---.
-
--- > gr | l
--- > p -lang=ZeroEng "John loves Mary" | l -lang=ZeroIta
-
diff --git a/examples/lrec-tutorial/ZeroLat.gf b/examples/lrec-tutorial/ZeroLat.gf
deleted file mode 100644
index 10fe480a6..000000000
--- a/examples/lrec-tutorial/ZeroLat.gf
+++ /dev/null
@@ -1,17 +0,0 @@
-concrete ZeroLat of Zero = {
- lincat
- S, VP, V2 = Str ;
- NP = Case => Str ;
- lin
- Pred np vp = np ! Nom ++ vp ;
- Compl v2 np = np ! Acc ++ v2 ;
- John = table {Nom => "Ioannes" ; Acc => "Ioannem"} ;
- Mary = table {Nom => "Maria" ; Acc => "Mariam"} ;
- Love = "amat" ;
- param
- Case = Nom | Acc ;
-}
-
---.
--- illustrates: parameters, word order
--- > p -lang=ZeroEng "John loves Mary" | aw -view=open -format=png
diff --git a/examples/lrec-tutorial/face/Face.gf b/examples/lrec-tutorial/face/Face.gf
deleted file mode 100644
index 9259363da..000000000
--- a/examples/lrec-tutorial/face/Face.gf
+++ /dev/null
@@ -1,14 +0,0 @@
-abstract Face = {
-
-flags startcat = Message ;
-
-cat
- Message ; Person ; Object ; Number ;
-fun
- Have : Person -> Number -> Object -> Message ;
- Like : Person -> Object -> Message ;
- You : Person ;
- Friend, Invitation : Object ;
- One, Two, Hundred : Number ;
-
-}
diff --git a/examples/lrec-tutorial/face/FaceEn0.gf b/examples/lrec-tutorial/face/FaceEn0.gf
deleted file mode 100644
index 2c4e7123b..000000000
--- a/examples/lrec-tutorial/face/FaceEn0.gf
+++ /dev/null
@@ -1,22 +0,0 @@
---# -path=.:present
-
-concrete FaceEn0 of Face = open SyntaxEng, ParadigmsEng in {
-lincat
- Message = Cl ;
- Person = NP ;
- Object = CN ;
- Number = Numeral ;
-lin
- Have p n o = mkCl p have_V2 (mkNP n o) ;
- Like p o = mkCl p like_V2 (mkNP this_Quant o) ;
- You = mkNP youSg_Pron ;
- Friend = mkCN friend_N ;
- Invitation = mkCN invitation_N ;
- One = n1_Numeral ;
- Two = n2_Numeral ;
- Hundred = n100_Numeral ;
-oper
- like_V2 = mkV2 "like" ;
- invitation_N = mkN "invitation" ;
- friend_N = mkN "friend" ;
-}
diff --git a/examples/lrec-tutorial/face/FaceEng.gf b/examples/lrec-tutorial/face/FaceEng.gf
deleted file mode 100644
index bac0b5f5a..000000000
--- a/examples/lrec-tutorial/face/FaceEng.gf
+++ /dev/null
@@ -1,7 +0,0 @@
---# -path=.:present
-
-concrete FaceEng of Face = FaceI with
- (Syntax = SyntaxEng),
- (LexFace = LexFaceEng) ;
-
-
diff --git a/examples/lrec-tutorial/face/FaceFin.gf b/examples/lrec-tutorial/face/FaceFin.gf
deleted file mode 100644
index 47b57ce29..000000000
--- a/examples/lrec-tutorial/face/FaceFin.gf
+++ /dev/null
@@ -1,7 +0,0 @@
---# -path=.:present
-
-concrete FaceFin of Face = FaceI with
- (Syntax = SyntaxFin),
- (LexFace = LexFaceFin) ;
-
-
diff --git a/examples/lrec-tutorial/face/FaceI.gf b/examples/lrec-tutorial/face/FaceI.gf
deleted file mode 100644
index b612dcdb8..000000000
--- a/examples/lrec-tutorial/face/FaceI.gf
+++ /dev/null
@@ -1,17 +0,0 @@
-incomplete concrete FaceI of Face = open Syntax, LexFace in {
-
-lincat
- Message = Cl ;
- Person = NP ;
- Object = CN ;
- Number = Numeral ;
-lin
- Have p n o = mkCl p have_V2 (mkNP n o) ;
- Like p o = mkCl p like_V2 (mkNP this_Quant o) ;
- You = mkNP youSg_Pron ;
- Friend = mkCN friend_N ;
- Invitation = mkCN invitation_N ;
- One = n1_Numeral ;
- Two = n2_Numeral ;
- Hundred = n100_Numeral ;
-}
diff --git a/examples/lrec-tutorial/face/FaceIta.gf b/examples/lrec-tutorial/face/FaceIta.gf
deleted file mode 100644
index 7e512ce6d..000000000
--- a/examples/lrec-tutorial/face/FaceIta.gf
+++ /dev/null
@@ -1,8 +0,0 @@
---# -path=.:present
-
-concrete FaceIta of Face = FaceI - [Like] with
- (Syntax = SyntaxIta),
- (LexFace = LexFaceIta) ** open SyntaxIta in {
-lin Like p o =
- mkCl (mkNP this_Quant o) like_V2 p ;
-}
diff --git a/examples/lrec-tutorial/face/LexFace.gf b/examples/lrec-tutorial/face/LexFace.gf
deleted file mode 100644
index db60ab8fd..000000000
--- a/examples/lrec-tutorial/face/LexFace.gf
+++ /dev/null
@@ -1,8 +0,0 @@
-interface LexFace = open Syntax in {
-
-oper
- like_V2 : V2 ;
- invitation_N : N ;
- friend_N : N ;
-
-}
diff --git a/examples/lrec-tutorial/face/LexFaceEng.gf b/examples/lrec-tutorial/face/LexFaceEng.gf
deleted file mode 100644
index 042d19923..000000000
--- a/examples/lrec-tutorial/face/LexFaceEng.gf
+++ /dev/null
@@ -1,8 +0,0 @@
-instance LexFaceEng of LexFace = open SyntaxEng, ParadigmsEng in {
-
-oper
- like_V2 = mkV2 "like" ;
- invitation_N = mkN "invitation" ;
- friend_N = mkN "friend" ;
-
-}
diff --git a/examples/lrec-tutorial/face/LexFaceFin.gf b/examples/lrec-tutorial/face/LexFaceFin.gf
deleted file mode 100644
index f43dbb022..000000000
--- a/examples/lrec-tutorial/face/LexFaceFin.gf
+++ /dev/null
@@ -1,7 +0,0 @@
-instance LexFaceFin of LexFace = open SyntaxFin, ParadigmsFin in {
-
-oper
- like_V2 = mkV2 (mkV "pitää") elative ;
- invitation_N = mkN "kutsu" ;
- friend_N = mkN "ystävä" ;
-}
diff --git a/examples/lrec-tutorial/face/LexFaceIta.gf b/examples/lrec-tutorial/face/LexFaceIta.gf
deleted file mode 100644
index ce03ef126..000000000
--- a/examples/lrec-tutorial/face/LexFaceIta.gf
+++ /dev/null
@@ -1,6 +0,0 @@
-instance LexFaceIta of LexFace = open SyntaxIta, ParadigmsIta in {
-oper
- like_V2 = mkV2 (mkV (piacere_64 "piacere")) dative ;
- invitation_N = mkN "invito" ;
- friend_N = mkN "amico" ;
-}