Code Monkey home page Code Monkey logo

Comments (7)

UlionTse avatar UlionTse commented on May 20, 2024

from translators.

haofanwang avatar haofanwang commented on May 20, 2024

@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".

from translators.

ObedH26 avatar ObedH26 commented on May 20, 2024

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)

from translators.

UlionTse avatar UlionTse commented on May 20, 2024

@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.

from translators.

haofanwang avatar haofanwang commented on May 20, 2024

Any update? @UlionTse

from translators.

UlionTse avatar UlionTse commented on May 20, 2024

@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.

from translators.

GokulNC avatar GokulNC commented on May 20, 2024

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.

from translators.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.