google-translation-api

Why is Google translator skipping some text in Python?

十年热恋 提交于 2019-12-11 18:57:31
问题 I am trying to translate text which is partly in Japanese and partly in English into English. My problem is that after applying the translate function, some text from the original text seems to be missing. As can be seen from the code and output, At present only SDS of about 20 to 30% of HAZMAT of the product is obtained seems to be missing from the output. Code translator.translate( 'At present only SDS of about 20 to 30% of HAZMAT of the product is obtained. Chemicals management (Japan) Qn

Difference between the google translate API

拈花ヽ惹草 提交于 2019-12-11 18:07:23
问题 I am building an Open Source Chrome extension based on Google translate (here). I have read the other questions about Google translate API (like this one and this one) but I still don't have my answer. I found several URLs for Google translate like these: https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=fr&dt=t&q=father&ie=UTF-8&oe=UTF-8 https://clients5.google.com/translate_a/t?client=dict-chrome-ex&sl=en&tl=fr&dt=t&q=father It seems all the URL are a different

Only get single translation from Google Translate API

ぐ巨炮叔叔 提交于 2019-12-04 05:03:13
问题 So I'm using the Google Translate API in PHP as explained in the documentation... require 'vendor/autoload.php'; putenv('GOOGLE_APPLICATION_CREDENTIALS=src/i18n-php/credential.json'); use Google\Cloud\Translate\TranslateClient; $g_tr = new TranslateClient([ 'projectId' => 'my-project' ]); $source_language = "en"; $target_language = "de"; $text_to_translate = "Last name"; $result = $g_tr->translate($text_to_translate, [ 'source' => $source_language, 'target' => $target_language, ]); echo

Google Cloud Translation API The request is missing a valid API key

烈酒焚心 提交于 2019-11-29 16:59:19
I'm trying to use the Google Cloud Translation API in my application but whenever I try to translate something it comes up with this missing valid API error. I've done the quickstart steps and that didn't work. https://cloud.google.com/translate/docs/quickstart I've tried the steps in the client library authentication and that hasn't worked. https://cloud.google.com/translate/docs/reference/libraries E/AndroidRuntime: FATAL EXCEPTION: main Process: herrsa1.bit.translator, PID: 16598 com.google.cloud.translate.TranslateException: The request is missing a valid API key. at com.google.cloud

“google translate” vs “translate api”

我只是一个虾纸丫 提交于 2019-11-29 07:50:41
I hear that the Translate API will be charged for, but what exactly prevents us form using the free Google Translate service here for free ? Otherwise put, what are the limitations of the free service? According to the link below, nothing prevents you. https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=es&dt=t&q=Hello Set your requests content-type to application/json and it fixes the weird formatting, I found the uri pattern after bashing around the google websites for a while. I wouldn't recommend translating the bible with it but I've done ~10k words this week without

Google Cloud Translation API The request is missing a valid API key

懵懂的女人 提交于 2019-11-28 11:13:47
问题 I'm trying to use the Google Cloud Translation API in my application but whenever I try to translate something it comes up with this missing valid API error. I've done the quickstart steps and that didn't work. https://cloud.google.com/translate/docs/quickstart I've tried the steps in the client library authentication and that hasn't worked. https://cloud.google.com/translate/docs/reference/libraries E/AndroidRuntime: FATAL EXCEPTION: main Process: herrsa1.bit.translator, PID: 16598 com

“google translate” vs “translate api”

不问归期 提交于 2019-11-28 01:17:39
问题 I hear that the Translate API will be charged for, but what exactly prevents us form using the free Google Translate service here for free ? Otherwise put, what are the limitations of the free service? 回答1: According to the link below, nothing prevents you. https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=es&dt=t&q=Hello Set your requests content-type to application/json and it fixes the weird formatting, I found the uri pattern after bashing around the google websites