Open bropines opened 1 month ago
And also, Yandex can translate Japanese, but apparently you haven’t updated this in the code
@bropines Sorry for long time.
# My judgment:
if translators's google result == google web result:
return True
# Your judgment:
if translators's google result == My idea result:
return True
Of course, Maybe this: #35 Second lost: Maybe your request is so fast that you could not recieve complete result. (Imagine a rendering of a web page)
import translators as ts
print(ts.translate_text(query_text='你好', translator='yandex')) ts.server._yandex.language_map.update({'ja': ['ru']}) # add lang_pair you want print(ts.translate_text(query_text='こんにちは', translator='yandex', from_language='ja', to_language='ru'))
Imagine typing a sentence in real time in a web page translation window. How many times does the request result refresh behind it? If the input generated a large number of translation requests queue in a short time, if I were a developer, I would design a sliding window such as 24ms, I only handle the latest request in the sliding window, so as to basically meet the effect of real-time translation of the web page. As you asked, if your requests are too fast and multiple requests are planned into a sliding window, will the results be lost?
That is, I make requests so quickly that the second part of the translation simply doesn’t load for me... Right?
And essentially I can just make the wait a little longer when receiving a transfer. I wish I knew how....
Debug Tips
What happened?
For some reason, in response to the request, only one part of the text (brackets) is received, and the second is lost
APP Version
5.9.3 (default)
Python Version
3.10
Runtime Environment
Windows
Country/Region
Russia
Relevant log output
No response
Screenshots
No response
Code of Conduct