-
Notifications
You must be signed in to change notification settings - Fork 60
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
ReversoTranslator BUG #96
Comments
|
@reddere, as a workaround, please specify the source language of the text, as Reverso recognises text in Catalan. However, the translate endpoint doesn't support Catalan translation: from translatepy.translators.reverso import ReversoTranslate
translator = ReversoTranslate()
text = 'Una manera única de conseguir la victoria\n\nJonesyTheGoat'
t = translator.translate(text, 'Italian', 'Spanish')
print(t) |
I made some investigation and came to conclusion that when we send request from Chromium, even from Icnognito mode, Reverso correctly detects language as Spanish, if we export same request as |
I deeply appreciate the insightful replies @ZhymabekRoman . Unfortunately I cannot set the source language as I'm using the translator to translate from multiple languages (english, spanish and german mainly) to italian. If reverso detects the source of incoming requests, will passing a Chromium User-Agent in headers work? |
Nope |
As a workaround, I think you can use Google to detect the language and pass it to Reverso for translation. |
Hmm |
ReversoTranslator
is bugged as when words likeúnica
are getting passed in the source text field, it throws error:requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
Here is a piece of code to replicate:
Note how if you remove
única
, it works great. Somehow it throw error even if you replace theú
with a normalu
. No idea why, @Animenosekai thanks in advance <3The text was updated successfully, but these errors were encountered: