@azure-rest/ai-translation-text package

Interfaces

BackTranslationOutput

Back Translation

BreakSentenceItemOutput

Item containing break sentence result.

DetectedLanguageOutput

An object describing the detected language.

DictionaryExampleItemOutput

Dictionary Example element

DictionaryExampleOutput

Dictionary Example

DictionaryExampleTextItem

Element containing the text with translation.

DictionaryLookupItemOutput

Dictionary Lookup Element

DictionaryTranslationOutput

Translation source term.

ErrorDetailsOutput

Error details as returned by Translator Service.

ErrorResponseOutput

Representation of the Error Response from Translator Service.

FindSentenceBoundaries
FindSentenceBoundaries200Headers
FindSentenceBoundaries200Response

Response for the Break SEntence API.

FindSentenceBoundariesBodyParam
FindSentenceBoundariesDefaultHeaders
FindSentenceBoundariesDefaultResponse
FindSentenceBoundariesHeaderParam
FindSentenceBoundariesHeaders
FindSentenceBoundariesQueryParam
FindSentenceBoundariesQueryParamProperties
GetSupportedLanguages
GetSupportedLanguages200Headers
GetSupportedLanguages200Response

The request has succeeded.

GetSupportedLanguagesDefaultHeaders
GetSupportedLanguagesDefaultResponse
GetSupportedLanguagesHeaderParam
GetSupportedLanguagesHeaders
GetSupportedLanguagesQueryParam
GetSupportedLanguagesQueryParamProperties
GetSupportedLanguagesResultOutput

Response for the languages API.

InputTextItem

Element containing the text for translation.

LanguageScriptOutput

Common properties of language script

LookupDictionaryEntries
LookupDictionaryEntries200Headers
LookupDictionaryEntries200Response

Response for the dictionary lookup API.

LookupDictionaryEntriesBodyParam
LookupDictionaryEntriesDefaultHeaders
LookupDictionaryEntriesDefaultResponse
LookupDictionaryEntriesHeaderParam
LookupDictionaryEntriesHeaders
LookupDictionaryEntriesQueryParam
LookupDictionaryEntriesQueryParamProperties
LookupDictionaryExamples
LookupDictionaryExamples200Headers
LookupDictionaryExamples200Response

Response for the dictionary examples API.

LookupDictionaryExamplesBodyParam
LookupDictionaryExamplesDefaultHeaders
LookupDictionaryExamplesDefaultResponse
LookupDictionaryExamplesHeaderParam
LookupDictionaryExamplesHeaders
LookupDictionaryExamplesQueryParam
LookupDictionaryExamplesQueryParamProperties
Routes
SentenceBoundariesOutput

An object returning sentence boundaries in the input and output texts.

SourceDictionaryLanguageOutput

Properties ot the source dictionary language

SourceTextOutput

Input text in the default script of the source language.

TargetDictionaryLanguageOutput

Properties of the target dictionary language

Translate
Translate200Headers
Translate200Response

Response for the translation API.

TranslateBodyParam
TranslateDefaultHeaders
TranslateDefaultResponse
TranslateHeaderParam
TranslateHeaders
TranslateQueryParam
TranslateQueryParamProperties
TranslatedTextAlignmentOutput

Alignment information object.

TranslatedTextItemOutput

Element containing the translated text

TranslationLanguageOutput

The value of the translation property is a dictionary of (key, value) pairs. Each key is a BCP 47 language tag. A key identifies a language for which text can be translated to or translated from.

TranslationTextOutput

Translation result

TranslatorCredential
TranslatorTokenCredential
TransliterableScriptOutput

Script definition with list of script into which given script can be translitered.

Transliterate
Transliterate200Headers
Transliterate200Response

Response for the transliteration API.

TransliterateBodyParam
TransliterateDefaultHeaders
TransliterateDefaultResponse
TransliterateHeaderParam
TransliterateHeaders
TransliterateQueryParam
TransliterateQueryParamProperties
TransliteratedTextOutput

Transliterated text element.

TransliterationLanguageOutput

The value of the transliteration property is a dictionary of (key, value) pairs. Each key is a BCP 47 language tag. A key identifies a language for which text can be converted from one script to another script.

Type Aliases

FindSentenceBoundariesParameters
GetSupportedLanguagesParameters
LanguageDirectionalityOutput

Language Directionality

LookupDictionaryEntriesParameters
LookupDictionaryExamplesParameters
ProfanityAction

Translator profanity actions

ProfanityMarker

Translator profanity markers

TextTranslationClient
TextType

Alias for TextType

TranslateParameters
TransliterateParameters

Functions

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

Initialize a new instance of TextTranslationClient

default(string, ClientOptions)

Initialize a new instance of TextTranslationClient

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

Initialize a new instance of TextTranslationClient

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

Function Details

buildMultiCollection(string[], string)

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

Parameters

items

string[]

parameterName

string

Returns

string

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

Initialize a new instance of TextTranslationClient

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

Parameters

credential

TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential

type: TranslatorCredential | TranslatorTokenCredential | KeyCredential |TokenCredential, credentials used to authenticate the service with.

options
ClientOptions

type: ClientOptions, the parameter for all optional parameters

Returns

default(string, ClientOptions)

Initialize a new instance of TextTranslationClient

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

Parameters

endpoint

string

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

options
ClientOptions

type: ClientOptions, the parameter for all optional parameters

Returns

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

Initialize a new instance of TextTranslationClient

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

Parameters

endpoint

string

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

credential

TranslatorCredential | TranslatorTokenCredential | TokenCredential | KeyCredential

type: TranslatorCredential | TranslatorTokenCredential | KeyCredential |TokenCredential, credentials used to authenticate the service with.

options
ClientOptions

type: ClientOptions, the parameter for all optional parameters

Returns

isUnexpected(GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse)

function isUnexpected(response: GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse): response

Parameters

Returns

response

isUnexpected(Translate200Response | TranslateDefaultResponse)

function isUnexpected(response: Translate200Response | TranslateDefaultResponse): response

Parameters

Returns

response

isUnexpected(Transliterate200Response | TransliterateDefaultResponse)

function isUnexpected(response: Transliterate200Response | TransliterateDefaultResponse): response

Parameters

Returns

response

isUnexpected(FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse)

function isUnexpected(response: FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse): response

Parameters

Returns

response

isUnexpected(LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse)

function isUnexpected(response: LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse): response

Parameters

Returns

response

isUnexpected(LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse)

function isUnexpected(response: LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse): response

Parameters

Returns

response