Integration of tatoeba for simple sentences translation - #177
Merged
Conversation
…models and Tatoeba)
…etooth communication protocol changes
…oth communication protocol changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is for the integration of Tatoeba for simple sentences translation for the 3.0 version of RTranslator, in general:
Tatoeba data has been integrated in a SQLite db (with this script), using that, when a language couple is selected, the data structure that contains all the translations for that language combo is loaded in RAM (with a consumption of around 1MB). With this data structure, the app can search a sentence instantly and obtain its eventual translation. If the translation has been done with Tatoeba, the writing "powered by Tatoeba" will appear in the GUI (at least in the text translation mode).
If you want to test this version of the app early, first of all, consider that this is a development preview, so it could be pretty unstable, and it will require initial setup. To try it, you need to:
Download from here the Mozilla.zip,
Madlad.zip, HY-MT.zip, Tatoeba.zip.
After the download, extract these folders (their name should remain "Mozilla", "Madlad", "HY-MT" and "Tatoeba", with the content of these .zip directly inside the corresponding extracted folders, if you change the structure of these folder the app will not work).
After that, create a folder named "models", inside it create a folder named "Translation", and inside it paste all the extracted folders, then insert the folder into the internal memory of the phone (in the top level).
Now download this apk, install it, open the app, enable the requested file access, and start the download.
After the download has finished, exit the app and enable all its permissions from the Android Settings (Settings -> Applications -> RTranslator).
Then re-open the app and everything should work.
By default, the models used for translation are the Mozilla ones, to select the other supported model you can select one from RTranslator's settings, at the buttom (note that probably, to execute Madlad and HY-MT, you will need a phone with at least 12GB of RAM, if the RAM won't be enough the app will crash until you wipe its data).