From dbdcff1fac26acf9e2b223cc6fb4e4d4d9e300aa Mon Sep 17 00:00:00 2001
From: aarne
-Speech input: Press microphone icon and talk.
+Speech input: Tap microphone icon and talk while it is red.
-Text input: Select "keyboard" from menu, press keyboard icon.
+Text input: Select "keyboard" from menu, tap keyboard icon.
-Correction: Press input text.
+Correction: Tap input text.
-Alternatives: Press output text
+Alternatives: Tap output text
-Grammar info: Press any of alternatives.
+Grammar info: Tap any of the alternatives.
Confidence: colour of output text
-
The Human Language Compiler is a translator for human language based on programming language technology: grammars and semantics. Therefore it is compact in size -and gives control on quality. +and gives control on quality. Most other translator are based on +statistics and have less controll of quality and either require +an internet connection or have a much bigger size.
-The app is small (under 30 MB for all languages off-line translation). We do not show ads. +The app is small (under 30 MB for all languages in off-line translation). We do not show ads.
The app indicates translation confidence with colours:-You can translate both speech and text, as selected in the menu in the upper right corner. -Translation works between any pair of the supported languages, which means 110 +You can translate both speech and text, as selected in the menu in the +upper right corner. Both kinds of input can be edited with the +keyboard by first tapping at the input field. This is often needed +because of speech recognition errors. Changing words +from upper to lower case may also be needed. +
++Translation works between any pair of the supported languages, which means 132 language pairs at the moment. But different languages are on different levels of development. The following table gives a rough idea of what to expect:
@@ -69,21 +77,25 @@ The following table gives a rough idea of what to expect:+The speech input and output use Google's voice services. Their status +can hence change without notice. You can make it more stable by +installing third-party speech tools, such as SVOX, which also provides +output in Finnish and Swedish.
@@ -112,11 +124,13 @@ You can also install third-party off-line speech engines, such as SVOX.
Powered by GF, +based on open-source software, built by support from the GF community and from Digital Grammars.
-Digital Grammars can tailor this app to you needs - tell us what you want to see +Digital Grammars can tailor this app to you needs and provide good +translation for the kind of vocabulary you need. Just tell us what you want to see in the green area!
diff --git a/src/ui/android/project.properties b/src/ui/android/project.properties index ce39f2d0a..6e18427a4 100644 --- a/src/ui/android/project.properties +++ b/src/ui/android/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-18 +target=android-21 diff --git a/src/ui/android/src/org/grammaticalframework/ui/android/ConversationView.java b/src/ui/android/src/org/grammaticalframework/ui/android/ConversationView.java index 712418898..716523462 100644 --- a/src/ui/android/src/org/grammaticalframework/ui/android/ConversationView.java +++ b/src/ui/android/src/org/grammaticalframework/ui/android/ConversationView.java @@ -140,11 +140,17 @@ public class ConversationView extends ScrollView { target = target.subSequence(1, target.length()).toString().trim(); } - // parse error or unknown translations (in []) present, darkest red color - else if (target.toString().contains("parse error:") || target.toString().contains("[")) { + // parse error: darkest red color + else if (target.toString().contains("parse error:")) { view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg)); } + // unknown linearizations in output: darkest red color. But replace [ ] by spaces and remove _ for better speech synthesis + else if (target.toString().contains("[")) { + view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg)); + target = target.toString().replace('[',' ').replace(']',' ').replaceAll("_","").trim(); + } + // parse by domain grammar, marked by +, green color else if (target.charAt(0) == '+') { view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg)); diff --git a/src/ui/android/src/org/grammaticalframework/ui/android/TTS.java b/src/ui/android/src/org/grammaticalframework/ui/android/TTS.java index 4b9242af6..d52315fec 100644 --- a/src/ui/android/src/org/grammaticalframework/ui/android/TTS.java +++ b/src/ui/android/src/org/grammaticalframework/ui/android/TTS.java @@ -26,13 +26,15 @@ public class TTS { if (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { - /* hack for missing TTS */ + /* hack for missing TTS -- don't use for official release! if (language.equals("bg-BG")) { language = "ru-RU"; } if (language.equals("ca-ES")) { language = "es-ES"; // hardly politically correct... } + */ + /* OR use separate entries for Cantonese and Mandarin */ if (language.equals("cmn-Hans-CN")) { language = "yue";