See: Description
Package | Description |
---|---|
com.azure.ai.documenttranslator |
Package containing the classes for BatchDocumentTranslationClient.
|
Microsoft Azure Cognitive Services Document Translator API enables you to translate documents in batch.
Source code | Package (Maven) | Product Documentation | Samples
For more information about creating the resource or how to get the location and sku information see here.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-ai-documenttranslator</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
In order to interact with the Document Translator service, you'll need to create an instance of the BatchDocumentTranslationClient
class. You will need an endpoint and an API key to instantiate a client object.
You can obtain the endpoint and API key from the resource information in the Azure Portal from your Document Translator resource. The endpoint is of format https://<NAME-OF-YOUR-RESOURCE>.cognitiveservices.azure.com
.
String endpoint = String.format("https://%s.cognitiveservices.azure.com/translator/text/batch/v1.0-preview.1",
"<document-translator-resource-name>");
String apiKey = "<document-translator-api-key>";
BatchDocumentTranslationRestClient client = new BatchDocumentTranslationClientBuilder()
.credential(new AzureKeyCredential(apiKey))
.endpoint(endpoint)
.httpClient(new NettyAsyncHttpClientBuilder().build())
.buildRestClient();
More examples can be found in samples.
Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][cocfaq] or contact [opencode@microsoft.com][coccontact] with any additional questions or comments.
Copyright © 2021 Microsoft Corporation. All rights reserved.