Udostępnij za pośrednictwem


AITranslationTextModelFactory.BackTranslation Method

Definition

Initializes a new instance of BackTranslation.

public static Azure.AI.Translation.Text.BackTranslation BackTranslation (string normalizedText = default, string displayText = default, int examplesCount = 0, int frequencyCount = 0);
static member BackTranslation : string * string * int * int -> Azure.AI.Translation.Text.BackTranslation
Public Shared Function BackTranslation (Optional normalizedText As String = Nothing, Optional displayText As String = Nothing, Optional examplesCount As Integer = 0, Optional frequencyCount As Integer = 0) As BackTranslation

Parameters

normalizedText
String

A string giving the normalized form of the source term that is a back-translation of the target. This value should be used as input to lookup examples.

displayText
String

A string giving the source term that is a back-translation of the target in a form best suited for end-user display.

examplesCount
Int32

An integer representing the number of examples that are available for this translation pair. Actual examples must be retrieved with a separate call to lookup examples. The number is mostly intended to facilitate display in a UX. For example, a user interface may add a hyperlink to the back-translation if the number of examples is greater than zero and show the back-translation as plain text if there are no examples. Note that the actual number of examples returned by a call to lookup examples may be less than numExamples, because additional filtering may be applied on the fly to remove "bad" examples.

frequencyCount
Int32

An integer representing the frequency of this translation pair in the data. The main purpose of this field is to provide a user interface with a means to sort back-translations so the most frequent terms are first.

Returns

A new BackTranslation instance for mocking.

Applies to