mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
edits in App help ; name suggestion "Language Compiler" ; sepApo(), a quick fix to French and Italian elision in the App
This commit is contained in:
@@ -2,12 +2,13 @@
|
|||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
DG Translator is a compact and completely off-line translator.
|
DG Translator is a compact and completely off-line translator.
|
||||||
We do not show adds and we do not require internet connection.
|
We do not show ads and we do not require internet connection.
|
||||||
However, if you want to use speech translation, then it might
|
However, if you encounter problems with the speech translation input
|
||||||
work better if you are on-line. We use existing
|
or output, it may work better if you are on-line.
|
||||||
Android speech services which may not be fully functional off-line.
|
In all cases you can always use keyboard input, also for editing the
|
||||||
In all cases you can always use keyboard input.
|
speech input.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
We indicate the translation confidence with colours:
|
We indicate the translation confidence with colours:
|
||||||
<ul>
|
<ul>
|
||||||
@@ -30,13 +31,13 @@ We indicate the translation confidence with colours:
|
|||||||
</ul>
|
</ul>
|
||||||
The translation works between any pair of the supported languages.
|
The translation works between any pair of the supported languages.
|
||||||
However, it works best <b>from English</b> and also from Swedish.
|
However, it works best <b>from English</b> and also from Swedish.
|
||||||
From other languages it can be slow and give more red.
|
From other languages it can be slow and give more red results.
|
||||||
But expect frequent updates and improvements!
|
But expect frequent updates and improvements!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
When you tab on a translation you get a screen with <b>alternative translations</b>.
|
When you tap on a translation you get a screen with <b>alternative translations</b>.
|
||||||
If the input is only a single word, then taping on each of the alternatives
|
If the input is only a single word, then tapping on each of the alternatives
|
||||||
gives you grammatical and morphological information for the word.
|
gives you <b>grammatical information</b> about the word.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The app also provides an <b>input method</b> which you can use as
|
The app also provides an <b>input method</b> which you can use as
|
||||||
@@ -46,8 +47,12 @@ To activate it go to Settings > Language & input.
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Powered by <a href="http://www.grammaticalframework.org/">GF</a>,
|
Powered by <a href="http://www.grammaticalframework.org/">GF</a>,
|
||||||
built by <a href="http://www.digitalgrammars.com/">Digital Grammars</a>
|
built by <a href="http://www.digitalgrammars.com/">Digital Grammars</a>.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<i>Digital Grammars can tailor this app to you needs - tell us what you want to see
|
||||||
|
in the green area!</i>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">DG Translator</string>
|
<string name="app_name">Language Compiler</string>
|
||||||
|
|
||||||
<string name="microphone">Microphone</string>
|
<string name="microphone">Microphone</string>
|
||||||
<string name="switch_languages">Switch languages</string>
|
<string name="switch_languages">Switch languages</string>
|
||||||
|
|||||||
@@ -265,6 +265,16 @@ public class Translator {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String sepApo(String in) {
|
||||||
|
String out = "";
|
||||||
|
for (int i = 0; i < in.length(); i++) {
|
||||||
|
out += in.charAt(i);
|
||||||
|
if (in.charAt(i) == '\'')
|
||||||
|
out += ' ';
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
private String translateWord(String input) {
|
private String translateWord(String input) {
|
||||||
|
|
||||||
String output = "[" + input + "]" ; // if all else fails, return the word itself in brackets
|
String output = "[" + input + "]" ; // if all else fails, return the word itself in brackets
|
||||||
@@ -311,6 +321,13 @@ public class Translator {
|
|||||||
// for Chinese we need to put space after every character
|
// for Chinese we need to put space after every character
|
||||||
input = explode(input);
|
input = explode(input);
|
||||||
}
|
}
|
||||||
|
if (getSourceLanguage().getLangCode().equals("fr-FR")) {
|
||||||
|
// for French and Italian we need to separate apostrophe by space...
|
||||||
|
input = sepApo(input);
|
||||||
|
}
|
||||||
|
if (getSourceLanguage().getLangCode().equals("it-IT")) {
|
||||||
|
input = sepApo(input);
|
||||||
|
}
|
||||||
|
|
||||||
String output = null;
|
String output = null;
|
||||||
List<ExprProb> exprs = new ArrayList<ExprProb>();
|
List<ExprProb> exprs = new ArrayList<ExprProb>();
|
||||||
|
|||||||
Reference in New Issue
Block a user