-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: google_trans_new - does not translate as correctly as https://translate.google.com/ #35
Comments
another example here, for a wrong translation. Today 06.06.2021 |
I am experiencing the same issue with bad translations. |
So I'm having the same issue with certain translations too. I checked the requests sent by google_trans_new and translate.google.com's web interface and they appear identical. However, the JSON responses are slightly different. It looks like the response includes the most likely translation along with other probable translations, but in some cases the most probable translation chosen by the google API is not the same as the web interface. For example, below is the response I got for "was meinst du" (from German to English). The best translation according to google is "what do you mean", but "What do you think" is also included. You can see that 3 options were returned in the JSON but "what do you mean" was chosen first. For some translations though, this response differs when using the google_trans_new package or when using the web interface. Instead, the wrong translation will be prioritized in the response.
Because the issue seems to be wonky responses from the Google API, my guess is that the request sent by google_trans_new must be different in some way from the one sent by the web interface. I tried messing around with the headers a little in google_trans_new but nothing seemed to work. Maybe someone just needs to thoroughly check all the headers sent by the web interface against what google_trans_new sends. If you go to the google translate page and enter a translation, you can find the request by going to https://translate.google.com/?sl=de&tl=en&text=was%20meinst%20du&op=translate and using: |
Ah, I understand. |
hello, I use the library of google_trans_new and other google-translate libraries, such as googletrans or PYGOOGLETRANSLATION to translate multiple webpages.
The problem is that this library does not translate as correctly as https://translate.google.com/
For example, this line, that I translated from english to belarusian:
Show the superiority of your conscience, by removing the destructive influences of your own feelings' oscillations.
With https://translate.google.com/ the translation is correct:
Пакажыце перавагу свайго сумлення, выдаючы разбураныя павышаныя ваганні ўласных пачуццяў.
but using google_trans_new library, I get a pretty bad translation:
Пакажыце перавагу выкарыстання сум, шляхам выдачы разбуральных уздзеянняў вашых уласных пачуццяў вагаў.
I don't know what can be the problem??? Maybe you must update something... ?
The text was updated successfully, but these errors were encountered: