Class TranslateOptions
java.lang.Object
com.azure.ai.translation.text.models.TranslateOptions
Options that may be passed when translating a text.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTargetLanguage
(String targetLanguage) setAllowFallback
(Boolean allowFallback) setCategory
(String category) setClientTraceId
(String clientTraceId) setIncludeAlignment
(Boolean includeAlignment) setIncludeSentenceLength
(Boolean includeSentenceLength) setProfanityAction
(ProfanityAction profanityAction) setProfanityMarker
(ProfanityMarker profanityMarker) setSourceLanguage
(String sourceLanguage) setSourceLanguageScript
(String sourceLanguageScript) setSuggestedSourceLanguage
(String suggestedSourceLanguage) setTargetLanguages
(List<String> targetLanguages) setTargetLanguageScript
(String targetLanguageScript) setTextType
(TextType textType)
-
Constructor Details
-
TranslateOptions
public TranslateOptions()
-
-
Method Details
-
getTargetLanguages
- Returns:
- Specifies the language of the output text.
-
setTargetLanguages
- Parameters:
targetLanguages
- Specifies the language of the output text.- Returns:
- The updated options.
-
addTargetLanguage
- Parameters:
targetLanguage
- Specifies the language of the output text.- Returns:
- The updated options.
-
getSourceLanguage
- Returns:
- Specifies the language of the input text.
-
setSourceLanguage
- Parameters:
sourceLanguage
- Specifies the language of the input text.- Returns:
- The updated options.
-
getClientTraceId
- Returns:
- client-generated GUID to uniquely identify the request.
-
setClientTraceId
- Parameters:
clientTraceId
- client-generated GUID to uniquely identify the request.- Returns:
- The updated options.
-
getTextType
- Returns:
- specifies whether the text being translated is plain text or HTML text.
-
setTextType
- Parameters:
textType
- specifies whether the text being translated is plain text or HTML text.- Returns:
- The updated options.
-
getCategory
- Returns:
- specifying the category (domain) of the translation.
-
setCategory
- Parameters:
category
- specifying the category (domain) of the translation.- Returns:
- The updated options.
-
getProfanityAction
- Returns:
- specifies how profanities should be treated in translations.
-
setProfanityAction
- Parameters:
profanityAction
- specifies how profanities should be treated in translations.- Returns:
- The updated options.
-
getProfanityMarker
- Returns:
- specifies how profanities should be marked in translations.
-
setProfanityMarker
- Parameters:
profanityMarker
- specifies how profanities should be marked in translations.- Returns:
- The updated options.
-
isIncludeAlignment
- Returns:
- Whether or not to include alignment projection from source text to translated text.
-
setIncludeAlignment
- Parameters:
includeAlignment
- Whether or not to include alignment projection from source text to translated text.- Returns:
- The updated options.
-
isIncludeSentenceLength
- Returns:
- Whether or not to include sentence boundaries for the input text and the translated text.
-
setIncludeSentenceLength
- Parameters:
includeSentenceLength
- Whether or not to include sentence boundaries for the input text and the translated text.- Returns:
- The updated options.
-
getSuggestedSourceLanguage
- Returns:
- fallback language if the language of the input text can't be identified.
-
setSuggestedSourceLanguage
- Parameters:
suggestedSourceLanguage
- fallback language if the language of the input text can't be identified.- Returns:
- The updated options.
-
getSourceLanguageScript
- Returns:
- the script of the input text.
-
setSourceLanguageScript
- Parameters:
sourceLanguageScript
- the script of the input text.- Returns:
- The updated options.
-
getTargetLanguageScript
- Returns:
- the script of the translated text.
-
setTargetLanguageScript
- Parameters:
targetLanguageScript
- the script of the translated text.- Returns:
- The updated options.
-
isAllowFallback
- Returns:
- Whether or not the service allows fallbeck for Custom Translator requests.
-
setAllowFallback
- Parameters:
allowFallback
- Whether or not the service allows fallbeck for Custom Translator requests.- Returns:
- The updated options.
-