你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

@azure-rest/ai-translation-text package

接口

BackTranslationOutput

后退翻译

BreakSentenceItemOutput

包含断句结果的项。

DetectedLanguageOutput

描述检测到的语言的对象。

DictionaryExampleItemOutput

Dictionary Example 元素

DictionaryExampleOutput

字典示例

DictionaryExampleTextItem

包含带翻译的文本的元素。

DictionaryLookupItemOutput

Dictionary Lookup 元素

DictionaryTranslationOutput

翻译源术语。

ErrorDetailsOutput

翻译服务返回的错误详细信息。

ErrorResponseOutput

翻译器服务的错误响应的表示形式。

FindSentenceBoundaries
FindSentenceBoundaries200Headers
FindSentenceBoundaries200Response

中断 SEntence API 的响应。

FindSentenceBoundariesBodyParam
FindSentenceBoundariesDefaultHeaders
FindSentenceBoundariesDefaultResponse
FindSentenceBoundariesHeaderParam
FindSentenceBoundariesHeaders
FindSentenceBoundariesQueryParam
FindSentenceBoundariesQueryParamProperties
GetSupportedLanguages
GetSupportedLanguages200Headers
GetSupportedLanguages200Response

请求已成功。

GetSupportedLanguagesDefaultHeaders
GetSupportedLanguagesDefaultResponse
GetSupportedLanguagesHeaderParam
GetSupportedLanguagesHeaders
GetSupportedLanguagesQueryParam
GetSupportedLanguagesQueryParamProperties
GetSupportedLanguagesResultOutput

语言 API 的响应。

InputTextItem

包含要翻译的文本的元素。

LanguageScriptOutput

语言脚本的常见属性

LookupDictionaryEntries
LookupDictionaryEntries200Headers
LookupDictionaryEntries200Response

字典查找 API 的响应。

LookupDictionaryEntriesBodyParam
LookupDictionaryEntriesDefaultHeaders
LookupDictionaryEntriesDefaultResponse
LookupDictionaryEntriesHeaderParam
LookupDictionaryEntriesHeaders
LookupDictionaryEntriesQueryParam
LookupDictionaryEntriesQueryParamProperties
LookupDictionaryExamples
LookupDictionaryExamples200Headers
LookupDictionaryExamples200Response

字典示例 API 的响应。

LookupDictionaryExamplesBodyParam
LookupDictionaryExamplesDefaultHeaders
LookupDictionaryExamplesDefaultResponse
LookupDictionaryExamplesHeaderParam
LookupDictionaryExamplesHeaders
LookupDictionaryExamplesQueryParam
LookupDictionaryExamplesQueryParamProperties
Routes
SentenceBoundariesOutput

返回输入和输出文本中的句子边界的对象。

SourceDictionaryLanguageOutput

源字典语言的属性

SourceTextOutput

源语言的默认脚本中的输入文本。

TargetDictionaryLanguageOutput

目标字典语言的属性

Translate
Translate200Headers
Translate200Response

翻译 API 的响应。

TranslateBodyParam
TranslateDefaultHeaders
TranslateDefaultResponse
TranslateHeaderParam
TranslateHeaders
TranslateQueryParam
TranslateQueryParamProperties
TranslatedTextAlignmentOutput

对齐信息对象。

TranslatedTextItemOutput

包含已翻译文本的元素

TranslationLanguageOutput

转换属性的值是一个字典(键、值)对。 每个键都是 BCP 47 语言标记。 键标识文本可以翻译到或翻译的语言。

TranslationTextOutput

翻译结果

TranslatorCredential
TranslatorTokenCredential
TransliterableScriptOutput

脚本定义,其中可以转译给定脚本的脚本列表。

Transliterate
Transliterate200Headers
Transliterate200Response

音译 API 的响应。

TransliterateBodyParam
TransliterateDefaultHeaders
TransliterateDefaultResponse
TransliterateHeaderParam
TransliterateHeaders
TransliterateQueryParam
TransliterateQueryParamProperties
TransliteratedTextOutput

转译的文本元素。

TransliterationLanguageOutput

音译属性的值是一个字典(键、值)对。 每个键都是 BCP 47 语言标记。 键标识文本可从一个脚本转换为另一个脚本的语言。

类型别名

FindSentenceBoundariesParameters
GetSupportedLanguagesParameters
LanguageDirectionalityOutput

语言方向性

LookupDictionaryEntriesParameters
LookupDictionaryExamplesParameters
ProfanityAction

翻译不雅作

ProfanityMarker

翻译不雅标记

TextTranslationClient
TextType

TextType 的别名

TranslateParameters
TransliterateParameters

函数

buildMultiCollection(string[], string)
default(TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, ClientOptions)

初始化 TextTranslationClient 的新实例

default(string, ClientOptions)

初始化 TextTranslationClient 的新实例

default(string, TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, ClientOptions)

初始化 TextTranslationClient 的新实例

isUnexpected(GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse)
isUnexpected(Translate200Response | TranslateDefaultResponse)
isUnexpected(Transliterate200Response | TransliterateDefaultResponse)
isUnexpected(FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse)
isUnexpected(LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse)
isUnexpected(LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse)

函数详细信息

buildMultiCollection(string[], string)

function buildMultiCollection(items: string[], parameterName: string): string

参数

items

string[]

parameterName

string

返回

string

default(TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, ClientOptions)

初始化 TextTranslationClient 的新实例

function default(credential: TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, options?: ClientOptions): TextTranslationClient

参数

credential

TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential

类型:TranslatorCredential |TranslatorTokenCredential |KeyCredential |TokenCredential,用于对服务进行身份验证的凭据。

options
ClientOptions

类型:ClientOptions,所有可选参数的参数

返回

default(string, ClientOptions)

初始化 TextTranslationClient 的新实例

function default(endpoint: string, options?: ClientOptions): TextTranslationClient

参数

endpoint

string

type: string, Supported Text Translation endpoints (protocol and hostname, 例如: https://api.cognitive.microsofttranslator.com) 。

options
ClientOptions

类型:ClientOptions,所有可选参数的参数

返回

default(string, TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, ClientOptions)

初始化 TextTranslationClient 的新实例

function default(endpoint: string, credential: TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential, options?: ClientOptions): TextTranslationClient

参数

endpoint

string

type: string, Supported Text Translation endpoints (protocol and hostname, 例如: https://api.cognitive.microsofttranslator.com) 。

credential

TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential

类型:TranslatorCredential |TranslatorTokenCredential |KeyCredential |TokenCredential,用于对服务进行身份验证的凭据。

options
ClientOptions

类型:ClientOptions,所有可选参数的参数

返回

isUnexpected(GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse)

function isUnexpected(response: GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse): response

参数

返回

response

isUnexpected(Translate200Response | TranslateDefaultResponse)

function isUnexpected(response: Translate200Response | TranslateDefaultResponse): response

参数

返回

response

isUnexpected(Transliterate200Response | TransliterateDefaultResponse)

function isUnexpected(response: Transliterate200Response | TransliterateDefaultResponse): response

参数

返回

response

isUnexpected(FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse)

function isUnexpected(response: FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse): response

参数

返回

response

isUnexpected(LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse)

function isUnexpected(response: LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse): response

参数

返回

response

isUnexpected(LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse)

function isUnexpected(response: LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse): response

参数

返回

response