You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dyn/translate_v3.projects.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,7 @@ <h3>Method Details</h3>
219
219
"a_key": "A String",
220
220
},
221
221
"mimeType": "A String", # Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
222
-
"model": "A String", # Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used
222
+
"model": "A String", # Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used
223
223
"sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
224
224
"targetLanguageCode": "A String", # Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
225
225
"transliterationConfig": { # Configures transliteration feature on top of translation. # Optional. Transliteration to be applied.
Copy file name to clipboardExpand all lines: docs/dyn/translate_v3.projects.locations.glossaries.glossaryEntries.html
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ <h3>Method Details</h3>
112
112
113
113
{ # Represents a single entry in a glossary.
114
114
"description": "A String", # Describes the glossary entry.
115
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
115
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
116
116
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
117
117
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
118
118
"languageCode": "A String", # The language for this glossary term.
@@ -143,7 +143,7 @@ <h3>Method Details</h3>
143
143
144
144
{ # Represents a single entry in a glossary.
145
145
"description": "A String", # Describes the glossary entry.
146
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
146
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
147
147
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
148
148
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
149
149
"languageCode": "A String", # The language for this glossary term.
@@ -199,7 +199,7 @@ <h3>Method Details</h3>
199
199
200
200
{ # Represents a single entry in a glossary.
201
201
"description": "A String", # Describes the glossary entry.
202
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
202
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
203
203
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
204
204
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
205
205
"languageCode": "A String", # The language for this glossary term.
@@ -241,7 +241,7 @@ <h3>Method Details</h3>
241
241
"glossaryEntries": [ # Optional. The Glossary Entries
242
242
{ # Represents a single entry in a glossary.
243
243
"description": "A String", # Describes the glossary entry.
244
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
244
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
245
245
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
246
246
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
247
247
"languageCode": "A String", # The language for this glossary term.
@@ -285,13 +285,13 @@ <h3>Method Details</h3>
285
285
<pre>Updates a glossary entry.
286
286
287
287
Args:
288
-
name: string, Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*" (required)
288
+
name: string, Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*" (required)
289
289
body: object, The request body.
290
290
The object takes the form of:
291
291
292
292
{ # Represents a single entry in a glossary.
293
293
"description": "A String", # Describes the glossary entry.
294
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
294
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
295
295
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
296
296
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
297
297
"languageCode": "A String", # The language for this glossary term.
@@ -322,7 +322,7 @@ <h3>Method Details</h3>
322
322
323
323
{ # Represents a single entry in a glossary.
324
324
"description": "A String", # Describes the glossary entry.
325
-
"name": "A String", # Required. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
325
+
"name": "A String", # Identifier. The resource name of the entry. Format: "projects/*/locations/*/glossaries/*/glossaryEntries/*"
326
326
"termsPair": { # Represents a single entry for an unidirectional glossary. # Used for an unidirectional glossary.
327
327
"sourceTerm": { # Represents a single glossary term # The source term is the term that will get match in the text,
328
328
"languageCode": "A String", # The language for this glossary term.
Copy file name to clipboardExpand all lines: docs/dyn/translate_v3.projects.locations.html
+25-2Lines changed: 25 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -146,10 +146,28 @@ <h3>Method Details</h3>
146
146
The object takes the form of:
147
147
148
148
{ # The request for sending an AdaptiveMt translation query.
149
-
"content": [ # Required. The content of the input in string format. For now only one sentence per request is supported.
149
+
"content": [ # Required. The content of the input in string format.
150
150
"A String",
151
151
],
152
152
"dataset": "A String", # Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
153
+
"glossaryConfig": { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
154
+
"glossary": "A String", # Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
155
+
"ignoreCase": True or False, # Optional. Indicates match is case insensitive. The default value is `false` if missing.
156
+
},
157
+
"referenceSentenceConfig": { # Message of caller-provided reference configuration. # Configuration for caller provided reference sentences.
158
+
"referenceSentencePairLists": [ # Reference sentences pair lists. Each list will be used as the references to translate the sentence under "content" field at the corresponding index. Length of the list is required to be equal to the length of "content" field.
{ # A pair of sentences used as reference in source and target languages.
162
+
"sourceSentence": "A String", # Source sentence in the sentence pair.
163
+
"targetSentence": "A String", # Target sentence in the sentence pair.
164
+
},
165
+
],
166
+
},
167
+
],
168
+
"sourceLanguageCode": "A String", # Source language code.
169
+
"targetLanguageCode": "A String", # Target language code.
170
+
},
153
171
}
154
172
155
173
x__xgafv: string, V1 error format.
@@ -161,6 +179,11 @@ <h3>Method Details</h3>
161
179
An object of the form:
162
180
163
181
{ # An AdaptiveMtTranslate response.
182
+
"glossaryTranslations": [ # Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.
183
+
{ # An AdaptiveMt translation.
184
+
"translatedText": "A String", # Output only. The translated text.
185
+
},
186
+
],
164
187
"languageCode": "A String", # Output only. The translation's language code.
165
188
"translations": [ # Output only. The translation.
166
189
{ # An AdaptiveMt translation.
@@ -582,7 +605,7 @@ <h3>Method Details</h3>
582
605
"a_key": "A String",
583
606
},
584
607
"mimeType": "A String", # Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
585
-
"model": "A String", # Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used
608
+
"model": "A String", # Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used
586
609
"sourceLanguageCode": "A String", # Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
587
610
"targetLanguageCode": "A String", # Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
588
611
"transliterationConfig": { # Configures transliteration feature on top of translation. # Optional. Transliteration to be applied.
"description": "Required. The content of the input in string format. For now only one sentence per request is supported.",
1821
+
"description": "Required. The content of the input in string format.",
1821
1822
"items": {
1822
1823
"type": "string"
1823
1824
},
@@ -1826,6 +1827,14 @@
1826
1827
"dataset": {
1827
1828
"description": "Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`",
1828
1829
"type": "string"
1830
+
},
1831
+
"glossaryConfig": {
1832
+
"$ref": "TranslateTextGlossaryConfig",
1833
+
"description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned."
1834
+
},
1835
+
"referenceSentenceConfig": {
1836
+
"$ref": "ReferenceSentenceConfig",
1837
+
"description": "Configuration for caller provided reference sentences."
"description": "Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.",
1848
+
"items": {
1849
+
"$ref": "AdaptiveMtTranslation"
1850
+
},
1851
+
"type": "array"
1852
+
},
1837
1853
"languageCode": {
1838
1854
"description": "Output only. The translation's language code.",
1839
1855
"readOnly": true,
@@ -2360,7 +2376,7 @@
2360
2376
"type": "string"
2361
2377
},
2362
2378
"name": {
2363
-
"description": "Required. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
2379
+
"description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"",
2364
2380
"type": "string"
2365
2381
},
2366
2382
"termsPair": {
@@ -2848,6 +2864,57 @@
2848
2864
},
2849
2865
"type": "object"
2850
2866
},
2867
+
"ReferenceSentenceConfig": {
2868
+
"description": "Message of caller-provided reference configuration.",
2869
+
"id": "ReferenceSentenceConfig",
2870
+
"properties": {
2871
+
"referenceSentencePairLists": {
2872
+
"description": "Reference sentences pair lists. Each list will be used as the references to translate the sentence under \"content\" field at the corresponding index. Length of the list is required to be equal to the length of \"content\" field.",
2873
+
"items": {
2874
+
"$ref": "ReferenceSentencePairList"
2875
+
},
2876
+
"type": "array"
2877
+
},
2878
+
"sourceLanguageCode": {
2879
+
"description": "Source language code.",
2880
+
"type": "string"
2881
+
},
2882
+
"targetLanguageCode": {
2883
+
"description": "Target language code.",
2884
+
"type": "string"
2885
+
}
2886
+
},
2887
+
"type": "object"
2888
+
},
2889
+
"ReferenceSentencePair": {
2890
+
"description": "A pair of sentences used as reference in source and target languages.",
2891
+
"id": "ReferenceSentencePair",
2892
+
"properties": {
2893
+
"sourceSentence": {
2894
+
"description": "Source sentence in the sentence pair.",
2895
+
"type": "string"
2896
+
},
2897
+
"targetSentence": {
2898
+
"description": "Target sentence in the sentence pair.",
2899
+
"type": "string"
2900
+
}
2901
+
},
2902
+
"type": "object"
2903
+
},
2904
+
"ReferenceSentencePairList": {
2905
+
"description": "A list of reference sentence pairs.",
2906
+
"id": "ReferenceSentencePairList",
2907
+
"properties": {
2908
+
"referenceSentencePairs": {
2909
+
"description": "Reference sentence pairs.",
2910
+
"items": {
2911
+
"$ref": "ReferenceSentencePair"
2912
+
},
2913
+
"type": "array"
2914
+
}
2915
+
},
2916
+
"type": "object"
2917
+
},
2851
2918
"Romanization": {
2852
2919
"description": "A single romanization response.",
2853
2920
"id": "Romanization",
@@ -3078,7 +3145,7 @@
3078
3145
"type": "string"
3079
3146
},
3080
3147
"model": {
3081
-
"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used",
3148
+
"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used",
0 commit comments