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
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ <h3>Method Details</h3>
127
127
"languages": [ # The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.
128
128
{ # The response message for language detection.
129
129
"confidence": 3.14, # The confidence of the detection result for this language.
130
-
"languageCode": "A String", # The BCP-47 language code of source content in the request, detected automatically.
130
+
"languageCode": "A String", # The BCP-47 language code of the source content in the request, detected automatically.
131
131
},
132
132
],
133
133
}</pre>
@@ -152,10 +152,10 @@ <h3>Method Details</h3>
152
152
{ # The response message for discovering supported languages.
153
153
"languages": [ # A list of supported language responses. This list contains an entry for each language the Translation API supports.
154
154
{ # A single supported language response corresponds to information related to one supported language.
155
-
"displayName": "A String", # Humanreadable name of the language localized in the display language specified in the request.
156
-
"languageCode": "A String", # Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes including language and region identifiers are returned (for example, 'zh-TW' and 'zh-CN')
157
-
"supportSource": True or False, # Can be used as source language.
158
-
"supportTarget": True or False, # Can be used as target language.
155
+
"displayName": "A String", # Human-readable name of the language localized in the display language specified in the request.
156
+
"languageCode": "A String", # Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes including language and region identifiers are returned (for example, 'zh-TW' and 'zh-CN').
157
+
"supportSource": True or False, # Can be used as a source language.
158
+
"supportTarget": True or False, # Can be used as a target language.
159
159
},
160
160
],
161
161
}</pre>
@@ -171,12 +171,12 @@ <h3>Method Details</h3>
171
171
The object takes the form of:
172
172
173
173
{ # The request message for synchronous translation.
174
-
"contents": [ # Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
174
+
"contents": [ # Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.
175
175
"A String",
176
176
],
177
-
"glossaryConfig": { # Configures which glossary should be 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.
178
-
"glossary": "A String", # Required. The `glossary` to be applied for this translation. The format depends on glossary: - Userprovided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
179
-
"ignoreCase": True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
177
+
"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.
178
+
"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}`
179
+
"ignoreCase": True or False, # Optional. Indicates match is caseinsensitive. The default value is `false` if missing.
180
180
},
181
181
"labels": { # Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.
182
182
"a_key": "A String",
@@ -199,9 +199,9 @@ <h3>Method Details</h3>
199
199
"glossaryTranslations": [ # Text translation responses if a glossary is provided in the request. This can be the same as `translations` if no terms apply. This field has the same length as `contents`.
200
200
{ # A single translation response.
201
201
"detectedLanguageCode": "A String", # The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
202
-
"glossaryConfig": { # Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
203
-
"glossary": "A String", # Required. The `glossary` to be applied for this translation. The format depends on glossary: - Userprovided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
204
-
"ignoreCase": True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
202
+
"glossaryConfig": { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
203
+
"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}`
204
+
"ignoreCase": True or False, # Optional. Indicates match is caseinsensitive. The default value is `false` if missing.
205
205
},
206
206
"model": "A String", # Only present when `model` is present in the request. `model` here is normalized to have project number. For example: If the `model` requested in TranslationTextRequest is `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.
207
207
"translatedText": "A String", # Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.
@@ -210,9 +210,9 @@ <h3>Method Details</h3>
210
210
"translations": [ # Text translation responses with no glossary applied. This field has the same length as `contents`.
211
211
{ # A single translation response.
212
212
"detectedLanguageCode": "A String", # The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.
213
-
"glossaryConfig": { # Configures which glossary should be used for a specific target language, and defines options for applying that glossary. # The `glossary_config` used for this translation.
214
-
"glossary": "A String", # Required. The `glossary` to be applied for this translation. The format depends on glossary: - Userprovided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
215
-
"ignoreCase": True or False, # Optional. Indicates match is case-insensitive. Default value is false if missing.
213
+
"glossaryConfig": { # Configures which glossary is used for a specific target language and defines options for applying that glossary. # The `glossary_config` used for this translation.
214
+
"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}`
215
+
"ignoreCase": True or False, # Optional. Indicates match is caseinsensitive. The default value is `false` if missing.
216
216
},
217
217
"model": "A String", # Only present when `model` is present in the request. `model` here is normalized to have project number. For example: If the `model` requested in TranslationTextRequest is `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.
218
218
"translatedText": "A String", # Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.
parent: string, Required. Name of the parent dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` (required)
98
+
filter: string, Optional. An expression for filtering the examples that will be returned. Example filter: * `usage=TRAIN`
99
+
pageSize: integer, Optional. Requested page size. The server can return fewer results than requested.
100
+
pageToken: string, Optional. A token identifying a page of results for the server to return. Typically obtained from next_page_token field in the response of a ListExamples call.
101
+
x__xgafv: string, V1 error format.
102
+
Allowed values
103
+
1 - v1 error format
104
+
2 - v2 error format
105
+
106
+
Returns:
107
+
An object of the form:
108
+
109
+
{ # Response message for ListExamples.
110
+
"examples": [ # The sentence pairs.
111
+
{ # A sentence pair.
112
+
"name": "A String", # Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'
113
+
"sourceText": "A String", # Sentence in source language.
114
+
"targetText": "A String", # Sentence in target language.
115
+
"usage": "A String", # Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.
116
+
},
117
+
],
118
+
"nextPageToken": "A String", # A token to retrieve next page of results. Pass this token to the page_token field in the ListExamplesRequest to obtain the corresponding page.
0 commit comments