Class DictionaryExampleTextItem

java.lang.Object
com.azure.ai.translation.text.models.InputTextItem
com.azure.ai.translation.text.models.DictionaryExampleTextItem

public final class DictionaryExampleTextItem extends InputTextItem
Element containing the text with translation.
  • Constructor Details

    • DictionaryExampleTextItem

      public DictionaryExampleTextItem(String text, String translation)
      Creates an instance of DictionaryExampleTextItem class.
      Parameters:
      text - the text value to set.
      translation - the translation value to set.
  • Method Details

    • getTranslation

      public String getTranslation()
      Get the translation property: A string specifying the translated text previously returned by the Dictionary lookup operation. This should be the value from the normalizedTarget field in the translations list of the Dictionary lookup response. The service will return examples for the specific source-target word-pair.
      Returns:
      the translation value.