Google Translate

No algorithm description given

Introduction This is a wrapper to the Google Translation API. The Google Cloud Translation API can dynamically translate text between thousands of language pairs. The Cloud Translation API lets websites and programs integrate with the translation service programmatically. The Google Translation API is part of the larger Cloud Machine Learning API family. For supported languages, please refer to the ISO-639-1 identifiers. NOTE: Please read the pricing section below to understand how pricing works. Input: For language detection: (Required): Language detection action. ("action"="detect_language") (Required): Text. ("text"="bla bla bla...") For translation (Required): Translation action. ("action"="translate") (Required): Text. ("text"="bla bla bla...") (Optional): Source language. ("source_language"="lang_code") (automatically detected when not given) (Optional): Target language. ("target_language"="lang_code") (it's English by default) (Optional): Model used for translation. ("model"="base" or "model"="nmt") Output: For language detection: Detected language ("language"="lang_code") Confidence value ("confidence"=0.98) (between 0 and 1) Given text ("text"="bla bla bla...") For translation Given text ("text"="bla bla bla...") Translated text ("translation": "bla bla bla translated...") Example(s) Example 1. Parameter 1: Language detection action. Parameter 2: Text given for detection. { "action": "detect_language", "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括" } Output: { "confidence": 1, "language": "zh-TW", "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括" } Example 2. Parameter 1: Translation action. Parameter 2: Text given for translation. { "action": "translate", "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括" } Output: { "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括", "translation": "Artificial wisdom is the history of artificial intelligence in the history of a period of money and academic research interests are significantly reduced period. This term is derived from the use of the term nuclear winter. Artificial intelligence has experienced several technical maturity curves, followed by disappointment and criticism, as well as research funding cut off, followed by a few years after the rekindle of research interest. 1974-80 and 1987-93 are two major trough periods, and others have several smaller troughs, including" } Example 3. Parameter 1: Translation action. Parameter 2: Text given for translation. Parameter 3: Target language for translation. { "action": "translate", "target_language": "nl", "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括" } Output: { "text": "人工智慧低谷是人工智慧史上一段資金及學術界研究興趣都大幅減少的時期。這個稱呼源自核冬天這個術語的使用。人工智慧領域經歷過好幾個技術成熟度曲線,緊接著是失望及批評,以及研究資金斷絕,緊接著在幾十年後重燃的研究興趣。1974-80及1987-93是兩個主要的低谷時期,其他還有幾個較小的低谷,包括", "translation": "AI Artificial Intelligence is de geschiedenis van een periode van lage financiering en academisch onderzoek belangen zijn aanzienlijk verminderd periode. Deze naam is afgeleid van het gebruik van de term nucleaire winter. Kunstmatige intelligentie veld hebben ervaren verschillende hype cycle, gevolgd door teleurstelling en kritiek, evenals middelen voor onderzoek afgesneden, gevolgd door hernieuwde na tientallen jaren van onderzoek belang. 1974-1980 en 1987-1993 zijn de twee belangrijkste lage periode, zijn er verschillende andere kleinere valleien, met inbegrip" } Pricing For both language detection and text translation, you are charged 25 credits for every 100 characters you pass to the input. You also get charged for the running time for your algorithm, which is 1 credit per second. For example, if you passed a text that is 949 characters long, you'll get charged 10 x 25 = 250 credits and for the running time. If the algorithm returned within a second, you'll be charged 250 + 1 = 251 credits for this call. Credits Google Cloud Translate is an API provided Google. This algorithm is a wrapper for an easier integration of the Google Cloud Translate API within the Algorithmia ecosystem.

Tags
(no tags)

Cost Breakdown

0 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
×
API calls
=
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Internet access

This algorithm has Internet access. This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.


Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.


To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/translation/GoogleTranslate/0.1.1
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://translation/GoogleTranslate/0.1.1 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import (
  algorithmia "github.com/algorithmiaio/algorithmia-go"
)

input := {{input | formatInput:"go"}}

var client = algorithmia.NewClient("YOUR_API_KEY", "")
algo, _ := client.Algo("algo://translation/GoogleTranslate/0.1.1")
resp, _ := algo.Pipe(input)
response := resp.(*algorithmia.AlgoResponse)
fmt.Println(response.Result)
View Go Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://translation/GoogleTranslate/0.1.1");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://translation/GoogleTranslate/0.1.1")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://translation/GoogleTranslate/0.1.1")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
using Algorithmia;

var input = "{{input | formatInput:"cs"}}";
var client = new Client("YOUR_API_KEY");
var algorithm = client.algo("algo://translation/GoogleTranslate/0.1.1");
var response = algorithm.pipe<object>(input);
Console.WriteLine(response.result);
View .NET/C# Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://translation/GoogleTranslate/0.1.1")
           .pipe(input)
           .then(function(response) {
             console.log(response.get());
           });
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('translation/GoogleTranslate/0.1.1')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("translation/GoogleTranslate/0.1.1")
result <- algo$pipe(input)$result
print(result)
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('translation/GoogleTranslate/0.1.1')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::Algorithmia;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo("translation/GoogleTranslate/0.1.1");
let response = algo.pipe(input);
View Rust Docs
import Algorithmia

let input = "{{input | formatInput:"swift"}}";
let client = Algorithmia.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "translation/GoogleTranslate/0.1.1") { resp, error in
  print(resp)
}
View Swift Docs
Discussion
  • {{comment.username}}