TextBlob icon indicating copy to clipboard operation
TextBlob copied to clipboard

Translation API returned the input string unchanged for some languages

Open RavishWorld opened this issue 8 years ago • 10 comments

Hi,

I am facing a problem in with language translation. When I give 1000 Mandarin comments it translates it to English. When I give 200 mixed content of English, German, Spanish and Mandarin it gives me "raise NotTranslated('Translation API returned the input string unchanged"

Can any one please help me on this.

RavishWorld avatar Jul 24 '17 09:07 RavishWorld

NotTranslated means that the Google API simply returned the same string unchanged; it doesn't think there is any work to do. Are the strings in question the same in both source and target languages?

I presume when you say 'mixed content', you don't mean that all of those languages are present in the same string, right? I don't think that will work - each request should only contain one language.

If you can provide an example, we can look into it.

jschnurr avatar Jan 03 '18 00:01 jschnurr

The things is that the for loop stops once it finds an English sentence. I think you should put the for loop in a while loop and handle to bypas the NotTranslated error raised by the TextBlob. Good luck!

Nfekih avatar Sep 01 '18 10:09 Nfekih

Hi @itsravimalhotra3 did u find a fix to it?

dripti avatar Oct 15 '18 17:10 dripti

Hi Jeff,

Sorry for so late reply. It worked for me. Thanks.

On 03-Jan-2018, at 1:44 AM, Jeff Schnurr [email protected] wrote:

NotTranslated means that the Google API simply returned the same string unchanged; it doesn't think there is any work to do. Are the strings in question the same in both source and target languages?

I presume when you say 'mixed content', you don't mean that all of those languages are present in the same string, right? I don't think that will work - each request should only contain one language.

If you can provide an example, we can look into it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

RavishWorld avatar Oct 15 '18 20:10 RavishWorld

Hi,

It worked for me. Sorry for so late response.

Thank you.

On 01-Sep-2018, at 12:16 PM, Nfekih [email protected] wrote:

The things is that the for loop stops once it finds an English sentence. I think you should put the for loop in a while loop and handle to bypas the NotTranslated error raised by the TextBlob. Good luck!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

RavishWorld avatar Oct 15 '18 20:10 RavishWorld

Hi,

It worked for me. Sorry for so late response.

Thank you.

On 15-Oct-2018, at 7:41 PM, dripti [email protected] wrote:

Hi @itsravimalhotra3 did u find a fix to it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

RavishWorld avatar Oct 15 '18 20:10 RavishWorld

what did u do to make it work?

dripti avatar Oct 16 '18 07:10 dripti

what did u do to make it work?

vmmelo avatar Dec 05 '18 19:12 vmmelo

The things is that the for loop stops once it finds an English sentence. I think you should put the for loop in a while loop and handle to bypas the NotTranslated error raised by the TextBlob. Good luck!

I am also facing the same problem. So, can you please share the code for this problem?

DGLadha avatar Aug 14 '19 13:08 DGLadha

please tell how to fix this problem :(

widianapw avatar Oct 13 '19 12:10 widianapw