diff --git a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java index d43270cc3354..79a213bb2a7c 100644 --- a/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java +++ b/sdk/translation/azure-ai-translation-text/src/main/java/com/azure/ai/translation/text/TextTranslationAsyncClient.java @@ -55,136 +55,6 @@ public final class TextTranslationAsyncClient { this.serviceClient = serviceClient; } - /** - * Translate Text. - *
Query Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| from | String | No | Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. |
| textType | String | No | Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html". |
| category | String | No | A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. |
| profanityAction | String | No | Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted". |
| profanityMarker | String | No | Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag". |
| includeAlignment | Boolean | No | Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default). |
| includeSentenceLength | Boolean | No | Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default). |
| suggestedFrom | String | No | Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. |
| fromScript | String | No | Specifies the script of the input text. |
| toScript | String | No | Specifies the script of the translated text. |
| allowFallback | Boolean | No | Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * translations (Required): [
- * (Required){
- * to: String (Required)
- * text: String (Required)
- * transliteration (Optional): {
- * text: String (Required)
- * script: String (Required)
- * }
- * alignment (Optional): {
- * proj: String (Required)
- * }
- * sentLen (Optional): {
- * srcSentLen (Required): [
- * int (Required)
- * ]
- * transSentLen (Required): [
- * int (Required)
- * ]
- * }
- * }
- * ]
- * sourceText (Optional): {
- * text: String (Required)
- * }
- * }
- * ]
- * }
- *
- *
- * @param targetLanguages Specifies the language of the output text. The target language must be one of the
- * supported languages included
- * in the translation scope. For example, use to=de to translate to German.
- * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string.
- * For example, use to=de&to=it to translate to German and Italian.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
@@ -245,209 +115,6 @@ public MonoQuery Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| language | String | No | Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. |
| script | String | No | Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * sentLen (Required): [
- * int (Required)
- * ]
- * }
- * ]
- * }
- *
- *
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * displaySource: String (Required)
- * translations (Required): [
- * (Required){
- * normalizedTarget: String (Required)
- * displayTarget: String (Required)
- * posTag: String (Required)
- * confidence: double (Required)
- * prefixWord: String (Required)
- * backTranslations (Required): [
- * (Required){
- * normalizedText: String (Required)
- * displayText: String (Required)
- * numExamples: int (Required)
- * frequencyCount: int (Required)
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * translation: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * normalizedTarget: String (Required)
- * examples (Required): [
- * (Required){
- * sourcePrefix: String (Required)
- * sourceTerm: String (Required)
- * sourceSuffix: String (Required)
- * targetPrefix: String (Required)
- * targetTerm: String (Required)
- * targetSuffix: String (Required)
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
+ *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the + * request. |
Request Body Schema
+ * + *
+ * {@code
+ * [
+ * (Required){
+ * text: String (Required)
+ * script: String (Optional)
+ * language: String (Optional)
+ * textType: String(Plain/Html) (Optional)
+ * targets (Required): [
+ * (Required){
+ * language (Required): [
+ * String (Required)
+ * ]
+ * script: String (Optional)
+ * profanityAction: String(NoAction/Marked/Deleted) (Optional)
+ * profanityMarker: String(Asterisk/Tag) (Optional)
+ * deploymentNameModel: String (Optional)
+ * allowFallback: Boolean (Optional)
+ * grade: String (Optional)
+ * tone: String (Optional)
+ * gender: String (Optional)
+ * adaptiveDatasetId: String (Optional)
+ * referenceTextPairs (Optional): [
+ * (Optional){
+ * referenceTextPairsSource: String (Required)
+ * referenceTextPairsTarget: String (Required)
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ *
+ *
+ * Response Body Schema
+ * + *
+ * {@code
+ * [
+ * (Required){
+ * detectedLanguage (Optional): {
+ * language: String (Required)
+ * score: double (Required)
+ * }
+ * translations (Required): [
+ * (Required){
+ * to: String (Required)
+ * text: String (Required)
+ * transliteration (Optional): {
+ * text: String (Required)
+ * script: String (Required)
+ * }
+ * }
+ * ]
+ * sourceText (Optional): {
+ * text: String (Required)
+ * }
+ * }
+ * ]
+ * }
+ *
+ *
+ * @param body Defines the content of the request.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MonoQuery Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| from | String | No | Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. |
| textType | String | No | Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html". |
| category | String | No | A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. |
| profanityAction | String | No | Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted". |
| profanityMarker | String | No | Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag". |
| includeAlignment | Boolean | No | Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default). |
| includeSentenceLength | Boolean | No | Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default). |
| suggestedFrom | String | No | Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. |
| fromScript | String | No | Specifies the script of the input text. |
| toScript | String | No | Specifies the script of the translated text. |
| allowFallback | Boolean | No | Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * translations (Required): [
- * (Required){
- * to: String (Required)
- * text: String (Required)
- * transliteration (Optional): {
- * text: String (Required)
- * script: String (Required)
- * }
- * alignment (Optional): {
- * proj: String (Required)
- * }
- * sentLen (Optional): {
- * srcSentLen (Required): [
- * int (Required)
- * ]
- * transSentLen (Required): [
- * int (Required)
- * ]
- * }
- * }
- * ]
- * sourceText (Optional): {
- * text: String (Required)
- * }
- * }
- * ]
- * }
- *
- *
- * @param targetLanguages Specifies the language of the output text. The target language must be one of the
- * supported languages included
- * in the translation scope. For example, use to=de to translate to German.
- * It's possible to translate to multiple languages simultaneously by repeating the parameter in the query string.
- * For example, use to=de&to=it to translate to German and Italian.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
@@ -243,208 +113,6 @@ public ResponseQuery Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| language | String | No | Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. |
| script | String | No | Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * sentLen (Required): [
- * int (Required)
- * ]
- * }
- * ]
- * }
- *
- *
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * displaySource: String (Required)
- * translations (Required): [
- * (Required){
- * normalizedTarget: String (Required)
- * displayTarget: String (Required)
- * posTag: String (Required)
- * confidence: double (Required)
- * prefixWord: String (Required)
- * backTranslations (Required): [
- * (Required){
- * normalizedText: String (Required)
- * displayText: String (Required)
- * numExamples: int (Required)
- * frequencyCount: int (Required)
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * translation: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * normalizedTarget: String (Required)
- * examples (Required): [
- * (Required){
- * sourcePrefix: String (Required)
- * sourceTerm: String (Required)
- * sourceSuffix: String (Required)
- * targetPrefix: String (Required)
- * targetTerm: String (Required)
- * targetSuffix: String (Required)
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
+ *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the + * request. |
Request Body Schema
+ * + *
+ * {@code
+ * [
+ * (Required){
+ * text: String (Required)
+ * script: String (Optional)
+ * language: String (Optional)
+ * textType: String(Plain/Html) (Optional)
+ * targets (Required): [
+ * (Required){
+ * language (Required): [
+ * String (Required)
+ * ]
+ * script: String (Optional)
+ * profanityAction: String(NoAction/Marked/Deleted) (Optional)
+ * profanityMarker: String(Asterisk/Tag) (Optional)
+ * deploymentNameModel: String (Optional)
+ * allowFallback: Boolean (Optional)
+ * grade: String (Optional)
+ * tone: String (Optional)
+ * gender: String (Optional)
+ * adaptiveDatasetId: String (Optional)
+ * referenceTextPairs (Optional): [
+ * (Optional){
+ * referenceTextPairsSource: String (Required)
+ * referenceTextPairsTarget: String (Required)
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ *
+ *
+ * Response Body Schema
+ * + *
+ * {@code
+ * [
+ * (Required){
+ * detectedLanguage (Optional): {
+ * language: String (Required)
+ * score: double (Required)
+ * }
+ * translations (Required): [
+ * (Required){
+ * to: String (Required)
+ * text: String (Required)
+ * transliteration (Optional): {
+ * text: String (Required)
+ * script: String (Required)
+ * }
+ * }
+ * ]
+ * sourceText (Optional): {
+ * text: String (Required)
+ * }
+ * }
+ * ]
+ * }
+ *
+ *
+ * @param body Defines the content of the request.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the response body along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ResponseQuery Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| from | String | No | Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. |
| textType | String | No | Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html". |
| category | String | No | A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. |
| profanityAction | String | No | Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted". |
| profanityMarker | String | No | Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag". |
| includeAlignment | Boolean | No | Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default). |
| includeSentenceLength | Boolean | No | Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default). |
| suggestedFrom | String | No | Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. |
| fromScript | String | No | Specifies the script of the input text. |
| toScript | String | No | Specifies the script of the translated text. |
| allowFallback | Boolean | No | Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist. |
Header Parameters
*| Name | Type | Required | Description |
|---|---|---|---|
| from | String | No | Specifies the language of the input text. Find which languages are - * available to translate from by - * looking up supported languages using the translation scope. If the from parameter isn't specified, - * automatic language detection is applied to determine the source language. - * - * You must use the from parameter rather than autodetection when using the dynamic dictionary feature. - * Note: the dynamic dictionary feature is case-sensitive. |
| textType | String | No | Defines whether the text being translated is plain text or - * HTML text. Any HTML needs to be a well-formed, - * complete element. Possible values are: plain (default) or html. Allowed values: "Plain", "Html". |
| category | String | No | A string specifying the category (domain) of the translation. - * This parameter is used to get translations - * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator - * project details to this parameter to use your deployed customized system. Default value is: general. |
| profanityAction | String | No | Specifies how profanities should be treated in - * translations. - * Possible values are: NoAction (default), Marked or Deleted. Allowed values: "NoAction", "Marked", - * "Deleted". |
| profanityMarker | String | No | Specifies how profanities should be marked in - * translations. - * Possible values are: Asterisk (default) or Tag. . Allowed values: "Asterisk", "Tag". |
| includeAlignment | Boolean | No | Specifies whether to include alignment projection - * from source text to translated text. - * Possible values are: true or false (default). |
| includeSentenceLength | Boolean | No | Specifies whether to include sentence boundaries - * for the input text and the translated text. - * Possible values are: true or false (default). |
| suggestedFrom | String | No | Specifies a fallback language if the language of the - * input text can't be identified. - * Language autodetection is applied when the from parameter is omitted. If detection fails, - * the suggestedFrom language will be assumed. |
| fromScript | String | No | Specifies the script of the input text. |
| toScript | String | No | Specifies the script of the translated text. |
| allowFallback | Boolean | No | Specifies that the service is allowed to fall back to a - * general system when a custom system doesn't exist. - * Possible values are: true (default) or false. - * - * allowFallback=false specifies that the translation should only use systems trained for the category specified - * by the request. If a translation for language X to language Y requires chaining through a pivot language E, - * then all the systems in the chain (X → E and E → Y) will need to be custom and have the same category. - * If no system is found with the specific category, the request will return a 400 status code. allowFallback=true - * specifies that the service is allowed to fall back to a general system when a custom system doesn't - * exist. |
Header Parameters
*| Name | Type | Required | Description |
|---|---|---|---|
| language | String | No | Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. |
| script | String | No | Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * sentLen (Required): [
- * int (Required)
- * ]
- * }
- * ]
- * }
- *
- *
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoQuery Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| language | String | No | Language tag identifying the language of the input text. - * If a code isn't specified, automatic language detection will be applied. |
| script | String | No | Script tag identifying the script used by the input text. - * If a script isn't specified, the default script of the language will be assumed. |
Header Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * detectedLanguage (Optional): {
- * language: String (Required)
- * score: double (Required)
- * }
- * sentLen (Required): [
- * int (Required)
- * ]
- * }
- * ]
- * }
- *
- *
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * displaySource: String (Required)
- * translations (Required): [
- * (Required){
- * normalizedTarget: String (Required)
- * displayTarget: String (Required)
- * posTag: String (Required)
- * confidence: double (Required)
- * prefixWord: String (Required)
- * backTranslations (Required): [
- * (Required){
- * normalizedText: String (Required)
- * displayText: String (Required)
- * numExamples: int (Required)
- * frequencyCount: int (Required)
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * displaySource: String (Required)
- * translations (Required): [
- * (Required){
- * normalizedTarget: String (Required)
- * displayTarget: String (Required)
- * posTag: String (Required)
- * confidence: double (Required)
- * prefixWord: String (Required)
- * backTranslations (Required): [
- * (Required){
- * normalizedText: String (Required)
- * displayText: String (Required)
- * numExamples: int (Required)
- * frequencyCount: int (Required)
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ResponseHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * translation: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * normalizedTarget: String (Required)
- * examples (Required): [
- * (Required){
- * sourcePrefix: String (Required)
- * sourceTerm: String (Required)
- * sourceSuffix: String (Required)
- * targetPrefix: String (Required)
- * targetTerm: String (Required)
- * targetSuffix: String (Required)
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public MonoHeader Parameters
- *| Name | Type | Required | Description |
|---|---|---|---|
| X-ClientTraceId | String | No | A client-generated GUID to uniquely identify the - * request. |
Request Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * text: String (Required)
- * translation: String (Required)
- * }
- * ]
- * }
- *
- *
- * Response Body Schema
- * - *
- * {@code
- * [
- * (Required){
- * normalizedSource: String (Required)
- * normalizedTarget: String (Required)
- * examples (Required): [
- * (Required){
- * sourcePrefix: String (Required)
- * sourceTerm: String (Required)
- * sourceSuffix: String (Required)
- * targetPrefix: String (Required)
- * targetTerm: String (Required)
- * targetSuffix: String (Required)
- * }
- * ]
- * }
- * ]
- * }
- *
- *
- * @param sourceLanguage Specifies the language of the input text.
- * The source language must be one of the supported languages included in the dictionary scope.
- * @param targetLanguage Specifies the language of the output text.
- * The target language must be one of the supported languages included in the dictionary scope.
- * @param body Defines the content of the request.
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
- * @throws HttpResponseException thrown if the request is rejected by server.
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response