azure-docs-sdk-java/docs-ref-autogen/com.azure.ai.translation.te...

308 строки
22 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.ai.translation.text.models.TranslateOptions"
fullName: "com.azure.ai.translation.text.models.TranslateOptions"
name: "TranslateOptions"
nameWithType: "TranslateOptions"
summary: "Options that may be passed when translating a text."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **TranslateOptions**"
constructors:
- uid: "com.azure.ai.translation.text.models.TranslateOptions.TranslateOptions()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.TranslateOptions()"
name: "TranslateOptions()"
nameWithType: "TranslateOptions.TranslateOptions()"
syntax: "public TranslateOptions()"
methods:
- uid: "com.azure.ai.translation.text.models.TranslateOptions.addTargetLanguage(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.addTargetLanguage(String targetLanguage)"
name: "addTargetLanguage(String targetLanguage)"
nameWithType: "TranslateOptions.addTargetLanguage(String targetLanguage)"
parameters:
- description: "Specifies the language of the output text."
name: "targetLanguage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions addTargetLanguage(String targetLanguage)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getCategory()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getCategory()"
name: "getCategory()"
nameWithType: "TranslateOptions.getCategory()"
syntax: "public String getCategory()"
returns:
description: "specifying the category (domain) of the translation."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getClientTraceId()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getClientTraceId()"
name: "getClientTraceId()"
nameWithType: "TranslateOptions.getClientTraceId()"
syntax: "public String getClientTraceId()"
returns:
description: "client-generated GUID to uniquely identify the request."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getProfanityAction()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getProfanityAction()"
name: "getProfanityAction()"
nameWithType: "TranslateOptions.getProfanityAction()"
syntax: "public ProfanityAction getProfanityAction()"
returns:
description: "specifies how profanities should be treated in translations."
type: "<xref href=\"com.azure.ai.translation.text.models.ProfanityAction?alt=com.azure.ai.translation.text.models.ProfanityAction&text=ProfanityAction\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getProfanityMarker()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getProfanityMarker()"
name: "getProfanityMarker()"
nameWithType: "TranslateOptions.getProfanityMarker()"
syntax: "public ProfanityMarker getProfanityMarker()"
returns:
description: "specifies how profanities should be marked in translations."
type: "<xref href=\"com.azure.ai.translation.text.models.ProfanityMarker?alt=com.azure.ai.translation.text.models.ProfanityMarker&text=ProfanityMarker\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getSourceLanguage()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getSourceLanguage()"
name: "getSourceLanguage()"
nameWithType: "TranslateOptions.getSourceLanguage()"
syntax: "public String getSourceLanguage()"
returns:
description: "Specifies the language of the input text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getSourceLanguageScript()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getSourceLanguageScript()"
name: "getSourceLanguageScript()"
nameWithType: "TranslateOptions.getSourceLanguageScript()"
syntax: "public String getSourceLanguageScript()"
returns:
description: "the script of the input text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getSuggestedSourceLanguage()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getSuggestedSourceLanguage()"
name: "getSuggestedSourceLanguage()"
nameWithType: "TranslateOptions.getSuggestedSourceLanguage()"
syntax: "public String getSuggestedSourceLanguage()"
returns:
description: "fallback language if the language of the input text can't be identified."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getTargetLanguageScript()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getTargetLanguageScript()"
name: "getTargetLanguageScript()"
nameWithType: "TranslateOptions.getTargetLanguageScript()"
syntax: "public String getTargetLanguageScript()"
returns:
description: "the script of the translated text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getTargetLanguages()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getTargetLanguages()"
name: "getTargetLanguages()"
nameWithType: "TranslateOptions.getTargetLanguages()"
syntax: "public List<String> getTargetLanguages()"
returns:
description: "Specifies the language of the output text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.getTextType()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.getTextType()"
name: "getTextType()"
nameWithType: "TranslateOptions.getTextType()"
syntax: "public TextType getTextType()"
returns:
description: "specifies whether the text being translated is plain text or HTML text."
type: "<xref href=\"com.azure.ai.translation.text.models.TextType?alt=com.azure.ai.translation.text.models.TextType&text=TextType\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.isAllowFallback()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.isAllowFallback()"
name: "isAllowFallback()"
nameWithType: "TranslateOptions.isAllowFallback()"
syntax: "public Boolean isAllowFallback()"
returns:
description: "Whether or not the service allows fallbeck for Custom Translator requests."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.isIncludeAlignment()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.isIncludeAlignment()"
name: "isIncludeAlignment()"
nameWithType: "TranslateOptions.isIncludeAlignment()"
syntax: "public Boolean isIncludeAlignment()"
returns:
description: "Whether or not to include alignment projection from source text to translated text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.isIncludeSentenceLength()"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.isIncludeSentenceLength()"
name: "isIncludeSentenceLength()"
nameWithType: "TranslateOptions.isIncludeSentenceLength()"
syntax: "public Boolean isIncludeSentenceLength()"
returns:
description: "Whether or not to include sentence boundaries for the input text and the translated text."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setAllowFallback(java.lang.Boolean)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setAllowFallback(Boolean allowFallback)"
name: "setAllowFallback(Boolean allowFallback)"
nameWithType: "TranslateOptions.setAllowFallback(Boolean allowFallback)"
parameters:
- description: "Whether or not the service allows fallbeck for Custom Translator requests."
name: "allowFallback"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
syntax: "public TranslateOptions setAllowFallback(Boolean allowFallback)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setCategory(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setCategory(String category)"
name: "setCategory(String category)"
nameWithType: "TranslateOptions.setCategory(String category)"
parameters:
- description: "specifying the category (domain) of the translation."
name: "category"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setCategory(String category)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setClientTraceId(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setClientTraceId(String clientTraceId)"
name: "setClientTraceId(String clientTraceId)"
nameWithType: "TranslateOptions.setClientTraceId(String clientTraceId)"
parameters:
- description: "client-generated GUID to uniquely identify the request."
name: "clientTraceId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setClientTraceId(String clientTraceId)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setIncludeAlignment(java.lang.Boolean)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setIncludeAlignment(Boolean includeAlignment)"
name: "setIncludeAlignment(Boolean includeAlignment)"
nameWithType: "TranslateOptions.setIncludeAlignment(Boolean includeAlignment)"
parameters:
- description: "Whether or not to include alignment projection from source text to translated text."
name: "includeAlignment"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
syntax: "public TranslateOptions setIncludeAlignment(Boolean includeAlignment)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setIncludeSentenceLength(java.lang.Boolean)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setIncludeSentenceLength(Boolean includeSentenceLength)"
name: "setIncludeSentenceLength(Boolean includeSentenceLength)"
nameWithType: "TranslateOptions.setIncludeSentenceLength(Boolean includeSentenceLength)"
parameters:
- description: "Whether or not to include sentence boundaries for the input text and the translated text."
name: "includeSentenceLength"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
syntax: "public TranslateOptions setIncludeSentenceLength(Boolean includeSentenceLength)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setProfanityAction(com.azure.ai.translation.text.models.ProfanityAction)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setProfanityAction(ProfanityAction profanityAction)"
name: "setProfanityAction(ProfanityAction profanityAction)"
nameWithType: "TranslateOptions.setProfanityAction(ProfanityAction profanityAction)"
parameters:
- description: "specifies how profanities should be treated in translations."
name: "profanityAction"
type: "<xref href=\"com.azure.ai.translation.text.models.ProfanityAction?alt=com.azure.ai.translation.text.models.ProfanityAction&text=ProfanityAction\" data-throw-if-not-resolved=\"False\" />"
syntax: "public TranslateOptions setProfanityAction(ProfanityAction profanityAction)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setProfanityMarker(com.azure.ai.translation.text.models.ProfanityMarker)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setProfanityMarker(ProfanityMarker profanityMarker)"
name: "setProfanityMarker(ProfanityMarker profanityMarker)"
nameWithType: "TranslateOptions.setProfanityMarker(ProfanityMarker profanityMarker)"
parameters:
- description: "specifies how profanities should be marked in translations."
name: "profanityMarker"
type: "<xref href=\"com.azure.ai.translation.text.models.ProfanityMarker?alt=com.azure.ai.translation.text.models.ProfanityMarker&text=ProfanityMarker\" data-throw-if-not-resolved=\"False\" />"
syntax: "public TranslateOptions setProfanityMarker(ProfanityMarker profanityMarker)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setSourceLanguage(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setSourceLanguage(String sourceLanguage)"
name: "setSourceLanguage(String sourceLanguage)"
nameWithType: "TranslateOptions.setSourceLanguage(String sourceLanguage)"
parameters:
- description: "Specifies the language of the input text."
name: "sourceLanguage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setSourceLanguage(String sourceLanguage)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setSourceLanguageScript(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setSourceLanguageScript(String sourceLanguageScript)"
name: "setSourceLanguageScript(String sourceLanguageScript)"
nameWithType: "TranslateOptions.setSourceLanguageScript(String sourceLanguageScript)"
parameters:
- description: "the script of the input text."
name: "sourceLanguageScript"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setSourceLanguageScript(String sourceLanguageScript)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setSuggestedSourceLanguage(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setSuggestedSourceLanguage(String suggestedSourceLanguage)"
name: "setSuggestedSourceLanguage(String suggestedSourceLanguage)"
nameWithType: "TranslateOptions.setSuggestedSourceLanguage(String suggestedSourceLanguage)"
parameters:
- description: "fallback language if the language of the input text can't be identified."
name: "suggestedSourceLanguage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setSuggestedSourceLanguage(String suggestedSourceLanguage)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setTargetLanguageScript(java.lang.String)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setTargetLanguageScript(String targetLanguageScript)"
name: "setTargetLanguageScript(String targetLanguageScript)"
nameWithType: "TranslateOptions.setTargetLanguageScript(String targetLanguageScript)"
parameters:
- description: "the script of the translated text."
name: "targetLanguageScript"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public TranslateOptions setTargetLanguageScript(String targetLanguageScript)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setTargetLanguages(java.util.List<java.lang.String>)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setTargetLanguages(List<String> targetLanguages)"
name: "setTargetLanguages(List<String> targetLanguages)"
nameWithType: "TranslateOptions.setTargetLanguages(List<String> targetLanguages)"
parameters:
- description: "Specifies the language of the output text."
name: "targetLanguages"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
syntax: "public TranslateOptions setTargetLanguages(List<String> targetLanguages)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.translation.text.models.TranslateOptions.setTextType(com.azure.ai.translation.text.models.TextType)"
fullName: "com.azure.ai.translation.text.models.TranslateOptions.setTextType(TextType textType)"
name: "setTextType(TextType textType)"
nameWithType: "TranslateOptions.setTextType(TextType textType)"
parameters:
- description: "specifies whether the text being translated is plain text or HTML text."
name: "textType"
type: "<xref href=\"com.azure.ai.translation.text.models.TextType?alt=com.azure.ai.translation.text.models.TextType&text=TextType\" data-throw-if-not-resolved=\"False\" />"
syntax: "public TranslateOptions setTextType(TextType textType)"
returns:
description: "The updated options."
type: "<xref href=\"com.azure.ai.translation.text.models.TranslateOptions?alt=com.azure.ai.translation.text.models.TranslateOptions&text=TranslateOptions\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Options that may be passed when translating a text."
metadata: {}
package: "com.azure.ai.translation.text.models"
artifact: com.azure:azure-ai-translation-text:1.0.0