TranslationTextModelFactory.TranslationText Method

Definition

Translation result.

public static Azure.AI.Translation.Text.TranslationText TranslationText(string language = default, int? sourceCharacters = default, int? instructionTokens = default, int? sourceTokens = default, int? responseTokens = default, int? targetTokens = default, string text = default);
static member TranslationText : string * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * string -> Azure.AI.Translation.Text.TranslationText
Public Shared Function TranslationText (Optional language As String = Nothing, Optional sourceCharacters As Nullable(Of Integer) = Nothing, Optional instructionTokens As Nullable(Of Integer) = Nothing, Optional sourceTokens As Nullable(Of Integer) = Nothing, Optional responseTokens As Nullable(Of Integer) = Nothing, Optional targetTokens As Nullable(Of Integer) = Nothing, Optional text As String = Nothing) As TranslationText

Parameters

language
String

A string representing the language code of the target language.

sourceCharacters
Nullable<Int32>

An integer indicating the number of characters in the source text string.

instructionTokens
Nullable<Int32>

An integer indicating the number of tokens used in generating the translated text.

sourceTokens
Nullable<Int32>

An integer indicating the number of tokens used in the source sentence.

responseTokens
Nullable<Int32>

An integer indicating the number of tokens used in the translation response.

targetTokens
Nullable<Int32>

An integer indicating the number of tokens used in the target sentence.

text
String

A string giving the translated text.

Returns

A new TranslationText instance for mocking.

Applies to