translators
translators copied to clipboard
Inconsistency with web result
I found the result from ts.google() is different from the website (https://translate.google.com/), why this happen?
Give me the evidence and I will give you the answer.
-------- 原始邮件 -------- 发件人: Haofan Wang @.> 日期: 2021年3月17日周三 17:14 收件人: UlionTse/translators @.> 抄送: Subscribed @.***> 主 题: [UlionTse/translators] Inconsistency with web result (#35)
I found the result from ts.google() is different from the website (https://translate.google.com/), why this happen?
― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/UlionTse/translators/issues/35, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADNLW2TTCIKNOXUEZ6MRMCTTEBXFPANCNFSM4ZKF3JOQ.
@UlionTse Thanks for the reply. Below is the code I called the method
novel_sentenses = ['在一次做小白鼠的实验中']
for sent in novel_sentenses:
print(ts.google(sent, if_use_cn_host=True))
The result is "In the experiment of a small mouse", but on the website, the translated result is "In an experiment with mice".
I have the same thing and im curious what is happening,i know translators car work weirdos i use a lot google trad.
My code generate all possibility of a word and translate all : Here for the word fox in french : Syntaxe of explanation : Word-given:word-returned(google website translate of word-given). Dont change mean the word given is same as what google trad site find about
Renard(FOX): Radrne : radné (dont change) Rderna : RDDE (dont change EdrRan : MADRA (cédran) Dnearr : dnarr (dont change) Nderar : nda (dont change) Enardr : celui qui racommode(le centre) Edarnr : firener(adner ) Neadrr : norrr (dont change)
@haofanwang Sorry for the late reply. It is confirmed that some of the request parameters (seemingly unnecessary) are missing, which results in inconsistency with the results returned by the webpage. At present, I tested it after adding parameters on the weekend, and the return has not changed, so it will take some time.
Any update? @UlionTse
@haofanwang Hi, friend
There is no update at present, because the root of the problem has not been found yet. I suggest you use ts.bing()
or ts.sogou()
instead of ts.google()
first. If there is a new update, I will notify you as soon as possible.
It seems Google does a lot of verification to ensure the translation request is from the browser by real human. I guess it would be difficult to crack it to get the actual high quality translations. Until then, this API would return only intermediate quality translations.
The request headers to batchexecute
have things like this which might help them verify:
x-client-data: CIm2yQEIpLbJAQjBtskBCKmdygEIibnKAQj4x8oBCK2UywEIsZrLAQjknMsBCKmdywEY4JrLAQ==
Decoded:
message ClientVariations {
// Active client experiment variation IDs.
repeated int32 variation_id = [3300105, 3300132, 3300161, 3313321, 3316873, 3318776, 3328557, 3329329, 3329636, 3329705];
// Active client experiment variation IDs that trigger server-side behavior.
repeated int32 trigger_variation_id = [3329376];
}
x-goog-batchexecute-bgr: ["!0NOl057NAAY7smA8O7JCjEl6w44Y3sc7ACkAIwj8RodHJkY6L0wA2rSDjXofVKKwkRB1SNCmjxIJiT7bjJsBIh_dSwIAAALtUgAAABdoAQcKAPmrXXgFz97-Y2Q3gUxYqhk_Btybpi7hZ8_8FqlhD1-CXDlCVmaD1cmOddiv3SxvQLykXjAsQHWkTlnldF5tECSnOA1TjyjCFkzZ1ZGCTaxj6MYXWq4RX-nHRI499eE4MJSDjVZ6Co4R-_fpw_w7RYri5YX5jYD8WN5P6JjjxRd2YkCpRe0dY70xCYy_ixdaSrKf8BLeyasMU-wAcaapd1y1BOpDvvf8RppRZaraCrGpqZsfAWUYhdddcfBCi3nfuL9ItnHekMve2wn9HGx03PSklg_zwBrGnBxoGRjAcQNHANzX-AlVTZx4jMyZFfU4Sipuyw68XCJsKoGZAdJf28UdCoTsfGylKZmfuSB0E-nIj83vE-Xmlhn5nGYrhROX-o_td58o6F2anPc5dJHEiQ9M2ouu2G26CSbRWW-jwMrEZxw79wkHq-HxgSq84MgsoslBfP26kxhs1ozyPwXHbSmYwGnuNkArO7NWAZhB0IAB4_CTsdODSRmJGVKKyq9AunNwWjY-DwR-unI5QbUuRTOPDToZbVLnLgb1hM-uD58hkd_1fuhCGODI_gRKaiJFykVqiRqJr8cFz1PVyA4EyClhVE0AYVx3VpBWQhkzuMnG5-bw53W8PIjXtMpKjdOW8eABSxx1ua2cQUs8U9azhmGB2uowVehALA13djy_WUtN7yOniT0DaxumGyQQsIW3Ywjxx3zSBY5leHywLBsf3rfn8WXdDhXyiEzk_DmFuLtyDmo9KNeuJkKD9cIiaGWFs_AZjCLdtKD2BBs0giNm1KW7d4ZHBpD01YFdvXQo5udgW7fVXeuDb9wuYIp_uapnPcE3mhsXVPR5JGe1RnfXGGarR2MPmWPwwDpGcOoLu4GFQtnCZoaC_4bwTxxlL6NtA6ug5Oj_BlUpMdvlcZIU4Z5YZb3CXiLRYaKqFBIA2p73fndYpzMQfXK0PoNnYPUd",null,null,2100,146,null,null,0]
Not sure where these are coming from. Could have been from some handshakes while loading the translate.google.cn page itself.