summaryrefslogtreecommitdiff
path: root/examples/translator/TranslateChi.gf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/translator/TranslateChi.gf')
-rw-r--r--examples/translator/TranslateChi.gf12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/translator/TranslateChi.gf b/examples/translator/TranslateChi.gf
index 08197f6d6..869abb6cd 100644
--- a/examples/translator/TranslateChi.gf
+++ b/examples/translator/TranslateChi.gf
@@ -1,6 +1,9 @@
--# -path=.:alltenses:../phrasebook:../../lib/src/chinese:../../lib/src/chinese/sysu:../../lib/src/english
-concrete TranslateChi of Translate = ParseChi, PhrasebookChi - [at_Prep] ** open SyntaxChi, (E = ExtraChi), Prelude in {
+concrete TranslateChi of Translate =
+ ParseChi,
+ PhrasebookChi - [at_Prep, PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease]
+ ** open SyntaxChi, (E = ExtraChi), Prelude in {
lin
PPhr p = lin Text p ;
@@ -9,5 +12,12 @@ lin
NP_Item np = lin NP np ;
NP_Place np0 = let np = lin NP np0 in
{name = np ; at = SyntaxChi.mkAdv in_Prep np ; to = SyntaxChi.mkAdv to_Prep np} ;
+
+--- to remove Phrasebook punctuation, which makes the output in Translate heterogeneous
+
+ PSentence s = lin Text (mkUtt s) ;
+ PQuestion s = lin Text (mkUtt s) ;
+ PGreetingMale, PGreetingFemale = \g -> lin Text g ;
+ GObjectPlease o = lin Text (mkUtt o) ;
} \ No newline at end of file