Male/Female greetings distinguished in Phrasebook

This commit is contained in:
aarne
2011-12-04 18:09:02 +00:00
parent ea01e7181e
commit 2a0c611486
5 changed files with 16 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng - concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
[ [
PGreetingMale, PGreetingFemale,
IMale, IFemale, IMale, IFemale,
YouFamMale, YouFamFemale, YouFamMale, YouFamFemale,
YouPolMale, YouPolFemale, YouPolMale, YouPolFemale,
@@ -25,6 +26,8 @@ concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
] ]
** open SyntaxEng, ParadigmsEng, IrregEng, Prelude in { ** open SyntaxEng, ParadigmsEng, IrregEng, Prelude in {
lin 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)" ; IMale = mkP i_Pron "(male)" ;
IFemale = mkP i_Pron "(female)" ; IFemale = mkP i_Pron "(female)" ;
WeMale = mkP we_Pron "(male)" ; WeMale = mkP we_Pron "(male)" ;

View File

@@ -61,9 +61,10 @@ abstract Sentences = Numeral ** {
-- PWord : Word -> Phrase ; -- PWord : Word -> Phrase ;
PGreeting : Greeting -> Phrase ; PGreetingMale : Greeting -> Phrase ; -- depends on speaker e.g. in Thai
PSentence : Sentence -> Phrase ; PGreetingFemale : Greeting -> Phrase ;
PQuestion : Question -> Phrase ; PSentence : Sentence -> Phrase ;
PQuestion : Question -> Phrase ;
PNumber : Number -> Phrase ; PNumber : Number -> Phrase ;
PPrice : Price -> Phrase ; PPrice : Price -> Phrase ;

View File

@@ -51,7 +51,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.' PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.'
PQuestion 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 ; -- PWord w = w ;

View File

@@ -1,4 +1,5 @@
concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [ concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [
PGreetingMale, PGreetingFemale,
GObjectPlease, GObjectPlease,
ACitizen, WherePlace, WherePerson ACitizen, WherePlace, WherePerson
] with ] with
@@ -8,7 +9,11 @@ concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [
flags coding=utf8 ; flags coding=utf8 ;
lin 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))) ; ACitizen p n = mkCl p.name (mkVP (mkCN n (P.personN R.khon_s))) ;

View File

@@ -48,9 +48,9 @@ concrete WordsTha of Words = SentencesTha **
Airport = mkPlace (placeN (R.thword "สนาม" "บิน")) ; Airport = mkPlace (placeN (R.thword "สนาม" "บิน")) ;
AmusementPark = mkPlace (placeN (R.thword "สวน" "สนุก")) ; AmusementPark = mkPlace (placeN (R.thword "สวน" "สนุก")) ;
Bank = mkPlace (placeN (R.thword "ธนา" "คาร")) ; Bank = mkPlace (placeN (R.thword "ธนา" "คาร")) ;
Bar = mkPlace (placeN (R.thword "บา" "ร์")) ; Bar = mkPlace (placeN (R.thword "บาร์")) ;
Cafeteria = mkPlace (placeN (R.thword "โรง" "อา" "หาร")) ; Cafeteria = mkPlace (placeN (R.thword "โรง" "อา" "หาร")) ;
Center = mkPlace (placeN (R.thword "ศูน" "ย์" "กลาง")) ; Center = mkPlace (placeN (R.thword "ศูนย์" "กลาง")) ;
Cinema = mkPlace (placeN (R.thword "โรง" "หนัง")) ; Cinema = mkPlace (placeN (R.thword "โรง" "หนัง")) ;
Church = mkPlace (placeN (R.thword "โบส" "ถ์")) ; Church = mkPlace (placeN (R.thword "โบส" "ถ์")) ;
Disco = mkPlace (placeN (R.thword "ดิส" "โก้")) ; Disco = mkPlace (placeN (R.thword "ดิส" "โก้")) ;