Skip to content

Commit 8cf2ae1

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added shadow removal and rotation correction options to Document Translation and Batch Document Translation API
PiperOrigin-RevId: 554540978
1 parent a3aded7 commit 8cf2ae1

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

google/cloud/translate/v3/translation_service.proto

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/longrunning/operations.proto";
24+
import "google/protobuf/empty.proto";
2425
import "google/protobuf/timestamp.proto";
2526

2627
option cc_enable_arenas = true;
@@ -178,8 +179,8 @@ service TranslationService {
178179
}
179180
}
180181

181-
// Configures which glossary should be used for a specific target language,
182-
// and defines options for applying that glossary.
182+
// Configures which glossary is used for a specific target language and defines
183+
// options for applying that glossary.
183184
message TranslateTextGlossaryConfig {
184185
// Required. The `glossary` to be applied for this translation.
185186
//
@@ -252,7 +253,7 @@ message TranslateTextRequest {
252253
// For example,
253254
// `projects/{project-number-or-id}/locations/global/models/general/nmt`.
254255
//
255-
// If not provided, the default Google model (NMT) will be used.
256+
// If not provided, the default Google model (NMT) will be used
256257
string model = 6 [(google.api.field_behavior) = OPTIONAL];
257258

258259
// Optional. Glossary to be applied. The glossary must be
@@ -757,17 +758,21 @@ message TranslateDocumentRequest {
757758
// https://cloud.google.com/translate/attribution#attribution_and_logos
758759
string customized_attribution = 10 [(google.api.field_behavior) = OPTIONAL];
759760

760-
// Optional. If true, the page limit of online native pdf translation is 300
761-
// and only native pdf pages will be translated.
761+
// Optional. is_translate_native_pdf_only field for external customers.
762+
// If true, the page limit of online native pdf translation is 300 and only
763+
// native pdf pages will be translated.
762764
bool is_translate_native_pdf_only = 11
763765
[(google.api.field_behavior) = OPTIONAL];
764766

765-
// Optional. If true, use the text removal to remove the shadow text on
767+
// Optional. If true, use the text removal server to remove the shadow text on
766768
// background image for native pdf translation.
767769
// Shadow removal feature can only be enabled when
768-
// is_translate_native_pdf_only is false
770+
// is_translate_native_pdf_only: false && pdf_native_only: false
769771
bool enable_shadow_removal_native_pdf = 12
770772
[(google.api.field_behavior) = OPTIONAL];
773+
774+
// Optional. If true, enable auto rotation correction in DVS.
775+
bool enable_rotation_correction = 13 [(google.api.field_behavior) = OPTIONAL];
771776
}
772777

773778
// A translated document message.
@@ -1293,6 +1298,16 @@ message BatchTranslateDocumentRequest {
12931298
// Customized attribution should follow rules in
12941299
// https://cloud.google.com/translate/attribution#attribution_and_logos
12951300
string customized_attribution = 10 [(google.api.field_behavior) = OPTIONAL];
1301+
1302+
// Optional. If true, use the text removal server to remove the shadow text on
1303+
// background image for native pdf translation.
1304+
// Shadow removal feature can only be enabled when
1305+
// is_translate_native_pdf_only: false && pdf_native_only: false
1306+
bool enable_shadow_removal_native_pdf = 11
1307+
[(google.api.field_behavior) = OPTIONAL];
1308+
1309+
// Optional. If true, enable auto rotation correction in DVS.
1310+
bool enable_rotation_correction = 12 [(google.api.field_behavior) = OPTIONAL];
12961311
}
12971312

12981313
// Input configuration for BatchTranslateDocument request.

0 commit comments

Comments
 (0)