summaryrefslogtreecommitdiff
path: root/doc/tutorial/gf-tutorial.t2t
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2020-10-02 20:32:21 +0200
committerGitHub <noreply@github.com>2020-10-02 20:32:21 +0200
commit670a58e7e724018de5624b75eeb39f04ffe12c98 (patch)
tree12e6da192b0d6a683e4579332b1a0275c2575a67 /doc/tutorial/gf-tutorial.t2t
parentf3a8658cc1ed5b2721ee9d3f670f6b9a49f0f049 (diff)
parentdf77205c435870804d70eec077ca6f40a197e7ac (diff)
Merge pull request #77 from inariksit/tutorial-fixes
Minor tweaks and updates to the tutorial
Diffstat (limited to 'doc/tutorial/gf-tutorial.t2t')
-rw-r--r--doc/tutorial/gf-tutorial.t2t25
1 files changed, 12 insertions, 13 deletions
diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t
index 7467e107e..63407a38a 100644
--- a/doc/tutorial/gf-tutorial.t2t
+++ b/doc/tutorial/gf-tutorial.t2t
@@ -2475,7 +2475,7 @@ can be used to read a text and return for each word its analyses
```
The command ``morpho_quiz = mq`` generates inflection exercises.
```
- % gf -path=alltenses:prelude $GF_LIB_PATH/alltenses/IrregFre.gfo
+ % gf alltenses/IrregFre.gfo
> morpho_quiz -cat=V
@@ -2488,11 +2488,6 @@ The command ``morpho_quiz = mq`` generates inflection exercises.
réapparaîtriez
Score 0/1
```
-To create a list for later use, use the command ``morpho_list = ml``
-```
- > morpho_list -number=25 -cat=V | write_file exx.txt
-```
-
@@ -2651,12 +2646,12 @@ The verb //switch off// is called a
We can define transitive verbs and their combinations as follows:
```
- lincat TV = {s : Number => Str ; part : Str} ;
+ lincat V2 = {s : Number => Str ; part : Str} ;
- fun AppTV : Item -> TV -> Item -> Phrase ;
+ fun AppV2 : Item -> V2 -> Item -> Phrase ;
- lin AppTV subj tv obj =
- {s = subj.s ++ tv.s ! subj.n ++ obj.s ++ tv.part} ;
+ lin AppV2 subj v2 obj =
+ {s = subj.s ++ v2.s ! subj.n ++ obj.s ++ v2.part} ;
```
**Exercise**. Define the language ``a^n b^n c^n`` in GF, i.e.
@@ -2722,11 +2717,11 @@ This topic will be covered in #Rseclexing.
The symbol ``**`` is used for both record types and record objects.
```
- lincat TV = Verb ** {c : Case} ;
+ lincat V2 = Verb ** {c : Case} ;
lin Follow = regVerb "folgen" ** {c = Dative} ;
```
-``TV`` becomes a **subtype** of ``Verb``.
+``V2`` (transitive verb) becomes a **subtype** of ``Verb``.
If //T// is a subtype of //R//, an object of //T// can be used whenever
an object of //R// is required.
@@ -2757,7 +2752,11 @@ Thus the labels ``p1, p2,...`` are hard-coded.
English indefinite article:
```
oper artIndef : Str =
- pre {"a" ; "an" / strs {"a" ; "e" ; "i" ; "o"}} ;
+ pre {
+ ("a" | "e" | "i" | "o") => "an" ;
+ _ => "a"
+ } ;
+
```
Thus
```