mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-19 16:12:52 -06:00
fixes in app help file ; commented out fake TTS for Bul and Cat ; remove []_ from output with unlinearized functions, so that speech doesn't get garbled.
This commit is contained in:
@@ -2,22 +2,22 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Speech input</b>: Press microphone icon and talk.
|
<b>Speech input</b>: Tap microphone icon and talk while it is red.
|
||||||
<br>
|
<br>
|
||||||
<b>Text input</b>: Select "keyboard" from menu, press keyboard icon.
|
<b>Text input</b>: Select "keyboard" from menu, tap keyboard icon.
|
||||||
<br>
|
<br>
|
||||||
<b>Correction</b>: Press input text.
|
<b>Correction</b>: Tap input text.
|
||||||
<br>
|
<br>
|
||||||
<b>Alternatives</b>: Press output text
|
<b>Alternatives</b>: Tap output text
|
||||||
<br>
|
<br>
|
||||||
<b>Grammar info</b>: Press any of alternatives.
|
<b>Grammar info</b>: Tap any of the alternatives.
|
||||||
<br>
|
<br>
|
||||||
<b>Confidence</b>: colour of output text
|
<b>Confidence</b>: colour of output text
|
||||||
<ul>
|
<ul>
|
||||||
<li><span style="background-color:palegreen">Green</span>: Probably correct (but not the only one)</li>
|
<li><span style="background-color:palegreen">Green</span>: Fully analysed, probably correct (but has alternatives)</li>
|
||||||
<li><span style="background-color:yellow">Yellow</span>: May be correct</li>
|
<li><span style="background-color:yellow">Yellow</span>: A good guess, may be correct</li>
|
||||||
<li><span style="background-color:pink">Light red</span>: Rough, probably incorrect</li>
|
<li><span style="background-color:pink">Light red</span>: A rough guess, probably incorrect</li>
|
||||||
<li><span style="background-color:red">Dark red</span>: If all else fails, usually incorrect</li>
|
<li><span style="background-color:red">Dark red</span>: Word by word, usually incorrect</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -27,15 +27,18 @@
|
|||||||
<p>
|
<p>
|
||||||
The Human Language Compiler is a translator for human language based on
|
The Human Language Compiler is a translator for human language based on
|
||||||
programming language technology: grammars and semantics. Therefore it is compact in size
|
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.
|
||||||
<p>
|
<p>
|
||||||
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.
|
||||||
</p>
|
</p>
|
||||||
The app indicates translation confidence with colours:
|
The app indicates translation confidence with colours:
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Green</b>:
|
<li><b>Green</b>:
|
||||||
semantic translation, should be correct.
|
semantic translation, should be correct.
|
||||||
But not necessarily the only correct one.
|
But not necessarily the only correct one.
|
||||||
|
You can tap the output to see alternatives.
|
||||||
</li>
|
</li>
|
||||||
<li><b>Yellow</b>:
|
<li><b>Yellow</b>:
|
||||||
syntactic translation, should be grammatically correct.
|
syntactic translation, should be grammatically correct.
|
||||||
@@ -52,13 +55,18 @@ The app indicates translation confidence with colours:
|
|||||||
</ul>
|
</ul>
|
||||||
The green translations come from a tourist phrasebook, which allows
|
The green translations come from a tourist phrasebook, which allows
|
||||||
you to translate things like "hello" and "how far is the airport from
|
you to translate things like "hello" and "how far is the airport from
|
||||||
the hotel". But this part can be easily adapted to other uses, such as
|
the hotel".
|
||||||
technical language.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
You can translate both speech and text, as selected in the menu in the upper right corner.
|
You can translate both speech and text, as selected in the menu in the
|
||||||
Translation works between any pair of the supported languages, which means 110
|
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 <b>speech recognition errors</b>. Changing words
|
||||||
|
from <b>upper to lower case</b> may also be needed.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
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.
|
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:
|
The following table gives a rough idea of what to expect:
|
||||||
</p>
|
</p>
|
||||||
@@ -69,21 +77,25 @@ The following table gives a rough idea of what to expect:
|
|||||||
<tr> <th></th> <th>coverage</th> <th>quality</th> <th>speed</th> <th>speech</th> </tr>
|
<tr> <th></th> <th>coverage</th> <th>quality</th> <th>speed</th> <th>speech</th> </tr>
|
||||||
<tr> <th>Bulgarian</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td><td bgcolor=palegreen></td> <td bgcolor=yellow>in only</td></tr>
|
<tr> <th>Bulgarian</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td><td bgcolor=palegreen></td> <td bgcolor=yellow>in only</td></tr>
|
||||||
<tr> <th>Catalan</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=yellow>in only</td></tr>
|
<tr> <th>Catalan</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=yellow>in only</td></tr>
|
||||||
<tr> <th>Chinese</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=palegreen></td> <td bgcolor=yellow>diff in/out</td> </tr>
|
<tr> <th>Chinese</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=palegreen></td> <td bgcolor=yellow>diff in/out*</td> </tr>
|
||||||
<tr> <th>Dutch</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> </tr>
|
<tr> <th>Dutch</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> </tr>
|
||||||
<tr> <th>English</th> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> </tr>
|
<tr> <th>English</th> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> </tr>
|
||||||
<tr> <th>Finnish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
<tr> <th>Finnish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=yellow>in only</td></tr>
|
||||||
<tr> <th>French</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=red></td> <td bgcolor=palegreen></td></tr>
|
<tr> <th>French</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=red></td> <td bgcolor=palegreen></td></tr>
|
||||||
<tr> <th>German</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
<tr> <th>German</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
||||||
<tr> <th>Hindi</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=yellow>out only</td> </tr>
|
<tr> <th>Hindi</th> <td bgcolor=pink></td> <td bgcolor=pink></td> <td bgcolor=yellow></td> <td bgcolor=yellow>in only</td> </tr>
|
||||||
<tr> <th>Italian</th> <td bgcolor=pink></td> <td bgcolor=pink></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
<tr> <th>Italian</th> <td bgcolor=pink></td> <td bgcolor=pink></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
||||||
<tr> <th>Spanish</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
<tr> <th>Spanish</th> <td bgcolor=pink></td> <td bgcolor=yellow></td><td bgcolor=pink></td> <td bgcolor=palegreen></td></tr>
|
||||||
<tr> <th>Swedish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> <td bgcolor=palegreen></td> </tr>
|
<tr> <th>Swedish</th> <td bgcolor=yellow></td> <td bgcolor=yellow></td> <td bgcolor=palegreen></td> <td bgcolor=yellow>in only</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</center>
|
</center>
|
||||||
<b>Bulgarian</b> uses Russian voice for output,
|
*<b>Chinese</b> uses Mandarin for input and Cantonese for output.
|
||||||
<b>Catalan</b> uses a Spanish voice.
|
</p>
|
||||||
<b>Chinese</b> uses Mandarin for input and Cantonese for output.
|
<p>
|
||||||
|
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.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -112,11 +124,13 @@ You can also install third-party off-line speech engines, such as SVOX.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Powered by <a href="http://www.grammaticalframework.org/">GF</a>,
|
Powered by <a href="http://www.grammaticalframework.org/">GF</a>,
|
||||||
|
based on open-source software,
|
||||||
built by support from the GF community and from <a href="http://www.digitalgrammars.com/">Digital Grammars</a>.
|
built by support from the GF community and from <a href="http://www.digitalgrammars.com/">Digital Grammars</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<i>Digital Grammars can tailor this app to you needs - tell us what you want to see
|
<i>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!</i>
|
in the green area!</i>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-18
|
target=android-21
|
||||||
|
|||||||
@@ -140,11 +140,17 @@ public class ConversationView extends ScrollView {
|
|||||||
target = target.subSequence(1, target.length()).toString().trim();
|
target = target.subSequence(1, target.length()).toString().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse error or unknown translations (in []) present, darkest red color
|
// parse error: darkest red color
|
||||||
else if (target.toString().contains("parse error:") || target.toString().contains("[")) {
|
else if (target.toString().contains("parse error:")) {
|
||||||
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
|
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
|
// parse by domain grammar, marked by +, green color
|
||||||
else if (target.charAt(0) == '+') {
|
else if (target.charAt(0) == '+') {
|
||||||
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
||||||
|
|||||||
@@ -26,13 +26,15 @@ public class TTS {
|
|||||||
|
|
||||||
if (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) {
|
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")) {
|
if (language.equals("bg-BG")) {
|
||||||
language = "ru-RU";
|
language = "ru-RU";
|
||||||
}
|
}
|
||||||
if (language.equals("ca-ES")) {
|
if (language.equals("ca-ES")) {
|
||||||
language = "es-ES"; // hardly politically correct...
|
language = "es-ES"; // hardly politically correct...
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* OR use separate entries for Cantonese and Mandarin */
|
/* OR use separate entries for Cantonese and Mandarin */
|
||||||
if (language.equals("cmn-Hans-CN")) {
|
if (language.equals("cmn-Hans-CN")) {
|
||||||
language = "yue";
|
language = "yue";
|
||||||
|
|||||||
Reference in New Issue
Block a user