summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2011-12-04 18:09:02 +0000
committeraarne <aarne@chalmers.se>2011-12-04 18:09:02 +0000
commit2a0c611486ec46d63a7109e51a5ad0a1b5dd2184 (patch)
treea1aa88d894daee13eb80aded98a849959aea866d /examples
parentea01e7181e4632aa4c0a9e9151b9bb38dcc8e75e (diff)
Male/Female greetings distinguished in Phrasebook
Diffstat (limited to 'examples')
-rw-r--r--examples/phrasebook/DisambPhrasebookEng.gf3
-rw-r--r--examples/phrasebook/Sentences.gf7
-rw-r--r--examples/phrasebook/SentencesI.gf2
-rw-r--r--examples/phrasebook/SentencesTha.gf7
-rw-r--r--examples/phrasebook/WordsTha.gf4
5 files changed, 16 insertions, 7 deletions
diff --git a/examples/phrasebook/DisambPhrasebookEng.gf b/examples/phrasebook/DisambPhrasebookEng.gf
index 8d606c909..af8753869 100644
--- a/examples/phrasebook/DisambPhrasebookEng.gf
+++ b/examples/phrasebook/DisambPhrasebookEng.gf
@@ -2,6 +2,7 @@
concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
[
+ PGreetingMale, PGreetingFemale,
IMale, IFemale,
YouFamMale, YouFamFemale,
YouPolMale, YouPolFemale,
@@ -25,6 +26,8 @@ concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
]
** open SyntaxEng, ParadigmsEng, IrregEng, Prelude in {
lin
+ PGreetingMale g = mkText (lin Text g) (lin Text (ss "(by male)")) ;
+ PGreetingFemale g = mkText (lin Text g) (lin Text (ss "(by female)")) ;
IMale = mkP i_Pron "(male)" ;
IFemale = mkP i_Pron "(female)" ;
WeMale = mkP we_Pron "(male)" ;
diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf
index 5e9354bd7..8dbd8483e 100644
--- a/examples/phrasebook/Sentences.gf
+++ b/examples/phrasebook/Sentences.gf
@@ -61,9 +61,10 @@ abstract Sentences = Numeral ** {
-- PWord : Word -> Phrase ;
- PGreeting : Greeting -> Phrase ;
- PSentence : Sentence -> Phrase ;
- PQuestion : Question -> Phrase ;
+ PGreetingMale : Greeting -> Phrase ; -- depends on speaker e.g. in Thai
+ PGreetingFemale : Greeting -> Phrase ;
+ PSentence : Sentence -> Phrase ;
+ PQuestion : Question -> Phrase ;
PNumber : Number -> Phrase ;
PPrice : Price -> Phrase ;
diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf
index b292657ea..91367cdc0 100644
--- a/examples/phrasebook/SentencesI.gf
+++ b/examples/phrasebook/SentencesI.gf
@@ -51,7 +51,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.'
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional '?'
- PGreeting g = mkText (lin Phr g) exclMarkPunct | g ;
+ PGreetingMale, PGreetingFemale = \g -> mkText (lin Phr g) exclMarkPunct | g ;
-- PWord w = w ;
diff --git a/examples/phrasebook/SentencesTha.gf b/examples/phrasebook/SentencesTha.gf
index ec6389b21..55662e1df 100644
--- a/examples/phrasebook/SentencesTha.gf
+++ b/examples/phrasebook/SentencesTha.gf
@@ -1,4 +1,5 @@
concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [
+ PGreetingMale, PGreetingFemale,
GObjectPlease,
ACitizen, WherePlace, WherePerson
] with
@@ -8,7 +9,11 @@ concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [
flags coding=utf8 ;
lin
- GObjectPlease o = lin Text (mkPhr (lin PConj (ss "ขอ")) (mkUtt o) (lin Voc (ss "หน่อย"))) | lin Text (mkUtt o) ;
+ PGreetingMale g = mkText (lin Text g) (lin Text (ss "ครับ")) | g ;
+ PGreetingFemale g = mkText (lin Text g) (lin Text (ss "ค่ะ")) | g ;
+
+ GObjectPlease o =
+ lin Text (mkPhr (lin PConj (ss "ขอ")) (mkUtt o) (lin Voc (ss "หน่อย"))) | lin Text (mkUtt o) ;
ACitizen p n = mkCl p.name (mkVP (mkCN n (P.personN R.khon_s))) ;
diff --git a/examples/phrasebook/WordsTha.gf b/examples/phrasebook/WordsTha.gf
index 13def3593..2192dd5bd 100644
--- a/examples/phrasebook/WordsTha.gf
+++ b/examples/phrasebook/WordsTha.gf
@@ -48,9 +48,9 @@ concrete WordsTha of Words = SentencesTha **
Airport = mkPlace (placeN (R.thword "สนาม" "บิน")) ;
AmusementPark = mkPlace (placeN (R.thword "สวน" "สนุก")) ;
Bank = mkPlace (placeN (R.thword "ธนา" "คาร")) ;
- Bar = mkPlace (placeN (R.thword "บา" "ร์")) ;
+ Bar = mkPlace (placeN (R.thword "บาร์")) ;
Cafeteria = mkPlace (placeN (R.thword "โรง" "อา" "หาร")) ;
- Center = mkPlace (placeN (R.thword "ศูน" "ย์" "กลาง")) ;
+ Center = mkPlace (placeN (R.thword "ศูนย์" "กลาง")) ;
Cinema = mkPlace (placeN (R.thword "โรง" "หนัง")) ;
Church = mkPlace (placeN (R.thword "โบส" "ถ์")) ;
Disco = mkPlace (placeN (R.thword "ดิส" "โก้")) ;