Fix encoding on tutorial

This commit is contained in:
John J. Camilleri
2018-11-04 21:12:32 +01:00
parent a7b2f77227
commit 37e0754cf0

View File

@@ -8,7 +8,7 @@ December 2010 for GF 3.2
% txt2tags --toc -ttex gf-tutorial.txt % txt2tags --toc -ttex gf-tutorial.txt
%!target:html %!target:html
%!encoding: iso-8859-1 %!encoding: utf-8
%!options: --toc %!options: --toc
%!postproc(tex) : "\\subsection\*" "\\newslide" %!postproc(tex) : "\\subsection\*" "\\newslide"
@@ -836,8 +836,8 @@ Finnish and an Italian concrete syntaxes:
lin lin
Hello recip = {s = "terve" ++ recip.s} ; Hello recip = {s = "terve" ++ recip.s} ;
World = {s = "maailma"} ; World = {s = "maailma"} ;
Mum = {s = "äiti"} ; Mum = {s = "äiti"} ;
Friends = {s = "ystävät"} ; Friends = {s = "ystävät"} ;
} }
concrete HelloIta of Hello = { concrete HelloIta of Hello = {
@@ -925,7 +925,7 @@ Default of the language flag (``-lang``): the last-imported concrete syntax.
**Multilingual generation**: **Multilingual generation**:
``` ```
> parse -lang=HelloEng "hello friends" | linearize > parse -lang=HelloEng "hello friends" | linearize
terve ystävät terve ystävät
ciao amici ciao amici
hello friends hello friends
``` ```
@@ -1335,7 +1335,7 @@ Just (?) replace English words with their dictionary equivalents:
Phrase, Item, Kind, Quality = {s : Str} ; Phrase, Item, Kind, Quality = {s : Str} ;
lin lin
Is item quality = {s = item.s ++ "č" ++ quality.s} ; Is item quality = {s = item.s ++ "è" ++ quality.s} ;
This kind = {s = "questo" ++ kind.s} ; This kind = {s = "questo" ++ kind.s} ;
That kind = {s = "quel" ++ kind.s} ; That kind = {s = "quel" ++ kind.s} ;
QKind quality kind = {s = kind.s ++ quality.s} ; QKind quality kind = {s = kind.s ++ quality.s} ;
@@ -1446,11 +1446,11 @@ linearizations in different languages:
> gr -number=2 | l -treebank > gr -number=2 | l -treebank
Is (That Cheese) (Very Boring) Is (That Cheese) (Very Boring)
quel formaggio č molto noioso quel formaggio è molto noioso
that cheese is very boring that cheese is very boring
Is (That Cheese) Fresh Is (That Cheese) Fresh
quel formaggio č fresco quel formaggio è fresco
that cheese is fresh that cheese is fresh
``` ```
@@ -1472,14 +1472,14 @@ answer given in another language.
You can interrupt the quiz by entering a line consisting of a dot ('.'). You can interrupt the quiz by entering a line consisting of a dot ('.').
this fish is warm this fish is warm
questo pesce č caldo questo pesce è caldo
> Yes. > Yes.
Score 1/1 Score 1/1
this cheese is Italian this cheese is Italian
questo formaggio č noioso questo formaggio è noioso
> No, not questo formaggio č noioso, but > No, not questo formaggio è noioso, but
questo formaggio č italiano questo formaggio è italiano
Score 1/2 Score 1/2
this fish is expensive this fish is expensive
@@ -1756,7 +1756,7 @@ Simultaneous extension and opening:
lincat lincat
Question = SS ; Question = SS ;
lin lin
QIs item quality = ss (item.s ++ "č" ++ quality.s) ; QIs item quality = ss (item.s ++ "è" ++ quality.s) ;
Pizza = ss "pizza" ; Pizza = ss "pizza" ;
} }
``` ```
@@ -2364,10 +2364,10 @@ in English, with special care taken of variations with the suffix
+ Implement the German **Umlaut** operation on word stems. + Implement the German **Umlaut** operation on word stems.
The operation changes the vowel of the stressed stem syllable as follows: The operation changes the vowel of the stressed stem syllable as follows:
//a// to //ä//, //au// to //äu//, //o// to //ö//, and //u// to //ü//. You //a// to //ä//, //au// to //äu//, //o// to //ö//, and //u// to //ü//. You
can assume that the operation only takes syllables as arguments. Test the can assume that the operation only takes syllables as arguments. Test the
operation to see whether it correctly changes //Arzt// to //Ärzt//, operation to see whether it correctly changes //Arzt// to //Ärzt//,
//Baum// to //Bäum//, //Topf// to //Töpf//, and //Kuh// to //Küh//. //Baum// to //Bäum//, //Topf// to //Töpf//, and //Kuh// to //Küh//.
@@ -2480,10 +2480,10 @@ The command ``morpho_quiz = mq`` generates inflection exercises.
Welcome to GF Morphology Quiz. Welcome to GF Morphology Quiz.
... ...
réapparaître : VFin VCondit Pl P2 réapparaître : VFin VCondit Pl P2
réapparaitriez réapparaitriez
> No, not réapparaitriez, but > No, not réapparaitriez, but
réapparaîtriez réapparaîtriez
Score 0/1 Score 0/1
``` ```
To create a list for later use, use the command ``morpho_list = ml`` To create a list for later use, use the command ``morpho_list = ml``
@@ -2563,7 +2563,7 @@ We need only number variation for the copula.
``` ```
copula : Number -> Str = copula : Number -> Str =
\n -> case n of { \n -> case n of {
Sg => "č" ; Sg => "è" ;
Pl => "sono" Pl => "sono"
} ; } ;
``` ```
@@ -3305,13 +3305,13 @@ we can write a **functor instantiation**,
oper oper
wine_N = mkN "Wein" ; wine_N = mkN "Wein" ;
pizza_N = mkN "Pizza" "Pizzen" feminine ; pizza_N = mkN "Pizza" "Pizzen" feminine ;
cheese_N = mkN "Käse" "Käsen" masculine ; cheese_N = mkN "Käse" "Käsen" masculine ;
fish_N = mkN "Fisch" ; fish_N = mkN "Fisch" ;
fresh_A = mkA "frisch" ; fresh_A = mkA "frisch" ;
warm_A = mkA "warm" "wärmer" "wärmste" ; warm_A = mkA "warm" "wärmer" "wärmste" ;
italian_A = mkA "italienisch" ; italian_A = mkA "italienisch" ;
expensive_A = mkA "teuer" ; expensive_A = mkA "teuer" ;
delicious_A = mkA "köstlich" ; delicious_A = mkA "köstlich" ;
boring_A = mkA "langweilig" ; boring_A = mkA "langweilig" ;
} }
``` ```
@@ -3362,11 +3362,11 @@ Lexicon instance
cheese_N = mkN "juusto" ; cheese_N = mkN "juusto" ;
fish_N = mkN "kala" ; fish_N = mkN "kala" ;
fresh_A = mkA "tuore" ; fresh_A = mkA "tuore" ;
warm_A = mkA "lämmin" ; warm_A = mkA "lämmin" ;
italian_A = mkA "italialainen" ; italian_A = mkA "italialainen" ;
expensive_A = mkA "kallis" ; expensive_A = mkA "kallis" ;
delicious_A = mkA "herkullinen" ; delicious_A = mkA "herkullinen" ;
boring_A = mkA "tylsä" ; boring_A = mkA "tylsä" ;
} }
``` ```
Functor instantiation Functor instantiation
@@ -3626,7 +3626,7 @@ Goals:
- semantic definitions - semantic definitions
These concepts are inherited from **type theory** (more precisely: These concepts are inherited from **type theory** (more precisely:
constructive type theory, or Martin-Löf type theory). constructive type theory, or Martin-Löf type theory).
Type theory is the basis **logical frameworks**. Type theory is the basis **logical frameworks**.
@@ -4639,7 +4639,7 @@ output. Therefore it can be a part of a pipe and read and write files.
The simplest way to translate is to ``echo`` input to the program: The simplest way to translate is to ``echo`` input to the program:
``` ```
% echo "this wine is delicious" | ./trans Food.pgf % echo "this wine is delicious" | ./trans Food.pgf
questo vino č delizioso questo vino è delizioso
``` ```
The result is given in all languages except the input language. The result is given in all languages except the input language.