Introducing v3

The Cloud Translation API v3 includes several new features and updates:

New features

  • Glossaries - Create a custom dictionary to correctly and consistently translate terms that are customer-specific.

  • Batch requests - Make an asynchronous request to translate large amounts of text.

Updates

  • AutoML models - Cloud Translation adds support for translating text with custom models that you create using AutoML Translation.

  • Labels - The Cloud Translation API supports adding user-defined labels (key-value pairs) to requests.

  • IAM roles - Cloud Translation v3 integrates with IAM to provide additional security for your translation requests, and to support integration with AutoML Translation.

  • No API Key Support - Cloud Translation v3 does not currently support API keys. We recommend that you create a service account for Cloud Translation v3beta1 requests. For information on creating a service account, see Creating and managing service accounts. Your service account must be added to one of the IAM roles added for Cloud Translation v3.

Getting started with Cloud Translation v3

To get started using Cloud Translation v3, see the v3beta1 quickstarts:

Migrating to Cloud Translation v3

Cloud Translation v3 updates the way that you specify which model to use to translate text, detect languages, and get supported languages. For information on how to update your application and client library code to Cloud Translation v3, see Migrating to Translation v3beta1.

Glossaries

A glossary is a custom dictionary that the Cloud Translation API v3 uses to correctly and consistently translate terms that are specific to you. Glossaries are commonly used to translate customer-specific terms and named entities. For example, you can use a glossary to specify a specific translation for terms such as "Google Summer of Code," "Gmail confidential mode," or "placement performance report."

For information on creating and using glossaries, see Custom glossaries (v3beta1).

Batch requests

Batch translation requests let you make an asynchronous request to translate large amounts of text. The Cloud Translation API v3 performs the batch translation as a long-running operation and writes the output to a Google Cloud Storage bucket that you specify. The input for a batch translation request must also come from a Google Cloud Storage bucket--inline requests for batch translation are not supported.

For information on making batch requests, see Batch requests(v3beta1).

AutoML models

Cloud Translation v3 supports translating text with custom models that you create using AutoML Translation. You can create a custom model using AutoML Translation that lets you to get more accurate translations for customer-specific terminology.

For information on using an AutoML Translation model for translate text requests, see Translating text (v3beta1).

Labels

The Cloud Translation API supports adding user-defined labels (key-value pairs) to TranslateText, BatchTranslateText and DetectLanguage requests. Information about a request's usage is forwarded to the billing system where you can break down your billing charges by filtering by label.

For more information about user-defined labels, see Reporting usage with labels (v3beta1).

IAM roles

Cloud Translation v3 integrates with IAM to provide additional security for your translation requests, enable fine-grained access control, and support integration with AutoML Translation.

You must add users and service accounts to one of the following roles in order for the accounts to have access to the Cloud Translation API.

Role Role ID Description
Cloud Translation API Viewer roles/cloudtranslate.viewer Can access get and list operations.
Cloud Translation API User roles/cloudtranslate.user

Includes the permissions of roles/cloudtranslate.viewer. Can translate text using general and AutoML Translation models in online and asynchronous (batch) mode. Can detect language. Can list supported languages for general and AutoML Translation models. Can use glossaries for translation.

Cloud Translation API Editor roles/cloudtranslate.editor

Includes the permissions of roles/cloudtranslate.user, and can create and delete glossaries, and cancel or delete long-running operations.

Cloud Translation API Admin roles/cloudtranslate.admin

Includes the permissions of roles/cloudtranslate.editor, and can set IAM policies and grant IAM permissions for the Cloud Translation API. Has all IAM permissions for the Cloud Translation API.

These pre-configured roles address many typical use cases. However, you may need a role that includes a custom set of permissions. For instance, you may wish to create a role that allows a user to create a glossary in a project, without letting them delete or update existing glossaries in the project. In those cases, you may be able to create an Cloud IAM custom role that meets your needs (see also Understanding IAM custom roles).

For information on managing IAM roles, see Granting, changing, and revoking access to resources and Granting roles to service accounts.

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น

ส่งความคิดเห็นเกี่ยวกับ...

หากต้องการความช่วยเหลือ ให้ไปที่หน้าการสนับสนุน