summaryrefslogtreecommitdiff
path: root/examples/morpho/Eng.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-08-15 12:41:04 +0000
committeraarne <aarne@cs.chalmers.se>2008-08-15 12:41:04 +0000
commitba78322409e2086a83c03b7b32e84940a24030b0 (patch)
tree87b13411a8d6db544461eef201f4e02207ac0ff1 /examples/morpho/Eng.gf
parent0475ef3414cff410b826c9f06e6c7043625972fa (diff)
examples of morphological synthesis/analysis as top-level grammars
Diffstat (limited to 'examples/morpho/Eng.gf')
-rw-r--r--examples/morpho/Eng.gf27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/morpho/Eng.gf b/examples/morpho/Eng.gf
new file mode 100644
index 000000000..e508f09e2
--- /dev/null
+++ b/examples/morpho/Eng.gf
@@ -0,0 +1,27 @@
+-- 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
+
+}