In my Android application I am using OCR. I would like to translate the text from the image to English. The language of the text is unknown. I am using AWS services together with Amplify, so I would like to use Predictions module to translate the text.
In Amazon Translate FAQ it is written that Amazon Translate has the automatic source language detection:
If the source language is unknown, Amazon Translate will identify the source language using Amazon Comprehend behind the scenes, and report that language back along with the translation to the target language.
Unfortunately,during configuration of Amplify backend it is necessary to indicate the source language:
? What is the source language? (Use arrow keys)
US English
?
Later it is possible to override the source language, but it has to be given. I've heard about tools for language detection like Lingua, however they require lots of memory or usage of different services.
Is it possible to use the feature of automatic source language detection of AWS Translate with the aid of Amplify in an Android application?
Amplify dev here.
Amplify Android currently (as of v1.4.2) does not support directly using Amazon Translate's source language detection feature. However, it is a feature in our backlog to be supported in the future.
To achieve your use-case at the moment, you have two slightly less-convenient options:
AmazonTranslateClient
service client. See the following doc for its usage guidance.Amplify.Predictions.interpret(...)
method on source text to identify its language.