summaryrefslogtreecommitdiff
path: root/examples/morpho
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/morpho
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/morpho')
-rw-r--r--examples/morpho/Eng.gf27
-rw-r--r--examples/morpho/EngDescr.gf23
-rw-r--r--examples/morpho/EngReal.gf31
-rw-r--r--examples/morpho/Fre.gf38
-rw-r--r--examples/morpho/FreDescr.gf44
-rw-r--r--examples/morpho/FreReal.gf72
-rw-r--r--examples/morpho/README.txt25
7 files changed, 0 insertions, 260 deletions
diff --git a/examples/morpho/Eng.gf b/examples/morpho/Eng.gf
deleted file mode 100644
index e508f09e2..000000000
--- a/examples/morpho/Eng.gf
+++ /dev/null
@@ -1,27 +0,0 @@
--- Abstract syntax for a top-level grammar for morphological analysis and synthesis
--- AR 15/8/2008
--- Use this as a template to port other morphologies to javascript, etc.
-
--- First import a lexicon.
-
-abstract Eng = IrregEngAbs ** {
-
-cat
- Display ; -- what is shown: word form, analysis, or full table
- Word ; -- lexical unit
- Form ; -- form description
-
-flags startcat = Display ;
-
-fun
- DAll : Word -> Display ; -- to show full table
- DForm : Word -> Form -> Display ; -- to show one form
-
--- Here are the possible forms; this is really a copy of ResEng.VForm
--- and should be generated automatically.
-
- VInf, VPres, VPast, VPPart, VPresPart : Form ;
-
- WVerb : V -> Word ; -- use category V from IrregEngAbs
-
-}
diff --git a/examples/morpho/EngDescr.gf b/examples/morpho/EngDescr.gf
deleted file mode 100644
index 3e5efec77..000000000
--- a/examples/morpho/EngDescr.gf
+++ /dev/null
@@ -1,23 +0,0 @@
---# -path=.:alltenses
-
-concrete EngDescr of Eng = IrregEng ** open (R = ResEng) in {
-
-lincat
- Display, Word, Form = Str ;
-
-lin
- DAll w = w ++ ":" ++ "all forms" ;
-
- DForm w f = w ++ ":" ++ f ;
-
--- names of forms displayed
-
- VInf = "Infinitive" ;
- VPres = "Present" ;
- VPast = "Past" ;
- VPPart = "Past Participle" ;
- VPresPart = "Present Participle" ;
-
- WVerb v = v.s ! R.VInf ; -- the dictionary form shown in word description
-
-}
diff --git a/examples/morpho/EngReal.gf b/examples/morpho/EngReal.gf
deleted file mode 100644
index b28f1e0eb..000000000
--- a/examples/morpho/EngReal.gf
+++ /dev/null
@@ -1,31 +0,0 @@
---# -path=.:alltenses
-
-concrete EngReal of Eng = IrregEng ** open (R = ResEng) in {
-
-lincat
- Display = Str ;
- Word = R.VForm => Str ;
- Form = {s : Str ; v : R.VForm} ;
-
-lin
-
--- select the forms to display (here all forms)
-
- DAll w = w ! R.VInf ++ w ! R.VPres ++ w ! R.VPast ++ w ! R.VPPart ++ w ! R.VPresPart ;
-
--- this code should be generated automatically
-
- DForm w f = w ! f.v ++ f.s ;
-
- VInf = vf R.VInf ;
- VPres = vf R.VPres ;
- VPast = vf R.VPast ;
- VPPart = vf R.VPPart ;
- VPresPart = vf R.VPresPart ;
-
- WVerb v = v.s ;
-
-oper
- vf : R.VForm -> {s : Str ; v : R.VForm} = \f -> {s = [] ; v = f} ; ---
-
-}
diff --git a/examples/morpho/Fre.gf b/examples/morpho/Fre.gf
deleted file mode 100644
index c27825163..000000000
--- a/examples/morpho/Fre.gf
+++ /dev/null
@@ -1,38 +0,0 @@
--- French irregular verbs, built using Eng as template.
-
-abstract Fre = IrregFreAbs ** {
-
-flags startcat = Display ;
-
-cat
- Display ; Word ; Form ;
-
--- French verb forms have an internal structure.
-
- TMood ; Number ; Person ; NumPersI ; Gender ; Mood ;
-
-fun
--- DAll : Word -> Display ;
- DForm : Word -> Form -> Display ;
-
- VInfin : Form ;
- VFin : TMood -> Number -> Person -> Form ;
- VImper : NumPersI -> Form ;
- VPart : Gender -> Number -> Form ;
- VGer : Form ;
-
- VPres : Mood -> TMood ;
- VImperf : Mood -> TMood ;
- VPasse, VFut, VCondit : TMood ;
-
- SgP2, PlP1, PlP2 : NumPersI ;
-
- Sg, Pl : Number ;
- P1, P2, P3 : Person ;
- Masc, Fem : Gender ;
- Indic, Conjunct : Mood ;
-
- WVerb : V -> Word ;
- WVerb2 : V2 -> Word ;
-
-}
diff --git a/examples/morpho/FreDescr.gf b/examples/morpho/FreDescr.gf
deleted file mode 100644
index dc6c8c67f..000000000
--- a/examples/morpho/FreDescr.gf
+++ /dev/null
@@ -1,44 +0,0 @@
---# -path=.:alltenses
-
-concrete FreDescr of Fre = IrregFre - [S] ** open (R = CommonRomance), Prelude in {
-
-flags coding=utf8 ;
-
-lincat
- Display, Word, Form = Str ;
- TMood, Number, Person, NumPersI, Gender, Mood = Str ;
-
-lin
--- DAll w = w ++ ":" ++ "la conjugaison" ;
-
- DForm w f = w ++ ":" ++ f ;
-
- VInfin = "infinitif" ;
- VFin m n p = m ++ n ++ p ;
- VImper np = "impératif" ++ np ;
- VPart g n = "participe passé" ++ g ++ n ;
- VGer = "participe présent" ;
-
- VPres m = m ++ "présent" ;
- VImperf m = m ++ "imparfait" ;
- VPasse = "passé simple" ;
- VFut = "futur" ;
- VCondit = "conditionnel" ;
-
- SgP2 = "singulier 2e" ;
- PlP1 = "pluriel 1ère" ;
- PlP2 = "pluriel 2e" ;
- Sg = "singulier" ;
- Pl = "pluriel" ;
- P1 = "1ère" ;
- P2 = "2e" ;
- P3 = "3e" ;
- Masc = "masculin" ;
- Fem = "féminin" ;
- Indic = "indicatif" ;
- Conjunct = "subjonctif" ;
-
- WVerb v = v.s ! R.VInfin True ;
- WVerb2 v = v.s ! R.VInfin True ;
-
-}
diff --git a/examples/morpho/FreReal.gf b/examples/morpho/FreReal.gf
deleted file mode 100644
index 86a56c164..000000000
--- a/examples/morpho/FreReal.gf
+++ /dev/null
@@ -1,72 +0,0 @@
---# -path=.:alltenses
-
-concrete FreReal of Fre = IrregFre ** open (R = CommonRomance), Prelude in {
-
-lincat
- Display = Str ;
- Word = R.VF => Str ;
- Form = {s : Str ; v : R.VF} ;
- TMood = {s : Str ; v : R.TMood} ;
- Number = {s : Str ; v : R.Number} ;
- Person = {s : Str ; v : R.Person} ;
- NumPersI = {s : Str ; v : R.NumPersI} ;
- Gender = {s : Str ; v : R.Gender} ;
- Mood = {s : Str ; v : R.Mood} ;
-
-lin
- -- display the same subset of forms as Petit Robert
-
-{-
- DAll w =
- w ! R.VInfin True ++
- w ! R.VFin (R.VPres R.Indic) R.Sg R.P1 ++
- w ! R.VFin (R.VPres R.Indic) R.Sg R.P3 ++
- w ! R.VFin (R.VPres R.Indic) R.Pl R.P1 ++
- w ! R.VFin (R.VPres R.Indic) R.Pl R.P3 ++
- w ! R.VFin (R.VImperf R.Indic) R.Sg R.P1 ++
- w ! R.VFin (R.VImperf R.Indic) R.Pl R.P1 ++
- w ! R.VFin R.VPasse R.Sg R.P1 ++
- w ! R.VFin R.VPasse R.Pl R.P1 ++
- w ! R.VFin R.VFut R.Sg R.P1 ++
- w ! R.VFin R.VCondit R.Sg R.P1 ++
- w ! R.VFin (R.VPres R.Conjunct) R.Sg R.P1 ++
- w ! R.VImper R.SgP2 ++
- w ! R.VImper R.PlP1 ++
- w ! R.VGer ++
- w ! R.VPart R.Masc R.Sg ;
--}
- DForm w f = w ! f.v ++ f.s ; ---
-
- VInfin = {s = [] ; v = R.VInfin True} ;
- VFin m n p = {s = m.s ++ n.s ++ p.s ; v = R.VFin m.v n.v p.v} ;
-
- VImper np = {s = np.s ; v = R.VImper np.v} ;
- VPart g n = {s = g.s ++ n.s ; v = R.VPart g.v n.v} ;
- VGer = {s = [] ; v = R.VGer} ;
-
- VPres m = {s = m.s ; v = R.VPres m.v} ;
- VImperf m = {s = m.s ; v = R.VImperf m.v} ;
- VPasse = {s = [] ; v = R.VPasse} ;
- VFut = {s = [] ; v = R.VFut} ;
- VCondit = {s = [] ; v = R.VCondit} ;
-
- SgP2 = {s = [] ; v = R.SgP2} ;
- PlP1 = {s = [] ; v = R.PlP1} ;
- PlP2 = {s = [] ; v = R.PlP2} ;
- Sg = {s = [] ; v = R.Sg} ;
- Pl = {s = [] ; v = R.Pl} ;
- P1 = {s = [] ; v = R.P1} ;
- P2 = {s = [] ; v = R.P2} ;
- P3 = {s = [] ; v = R.P3} ;
- Masc = {s = [] ; v = R.Masc} ;
- Fem = {s = [] ; v = R.Fem} ;
- Indic = {s = [] ; v = R.Indic} ;
- Conjunct = {s = [] ; v = R.Conjunct} ;
-
- WVerb v = v.s ;
- WVerb2 v = v.s ;
-
-oper
- vf : R.VF -> {s : Str ; v : R.VF} = \f -> {s = [] ; v = f} ; ---
-
-}
diff --git a/examples/morpho/README.txt b/examples/morpho/README.txt
deleted file mode 100644
index 41bdd545b..000000000
--- a/examples/morpho/README.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-AR 15/8/2008
-
-Here are some examples of morphological lexica turned into top-level GF grammars.
-
-Top level is useful because it supports analysis and synthesis by normal
-e.g. JavaScript tools.
-
-The simplest example is in the following three files:
-
- Eng.gf -- abstract syntax (English irregular verbs)
- EngDescr.gf -- concrete syntax showing form descriptions
- EngReal.gf -- concrete syntax showing real forms
-
-Compile the result with
-
- gfc --make -f js EngDescr.gf EngReal.gf
-
-Then use Eng.js in place of GF/lib/javascript/grammar.js
-
-Other examples:
-
- Fre* -- French irregular verbs
-
-NB: there are issues on character encoding of abstract verb names in Fre.
-