Class TranslationResult

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.language_translator.v3.model.TranslationResult
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class TranslationResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
TranslationResult.
  • Constructor Details

    • TranslationResult

      public TranslationResult()
  • Method Details

    • getWordCount

      public Long getWordCount()
      Gets the wordCount.

      An estimate of the number of words in the input text.

      Returns:
      the wordCount
    • getCharacterCount

      public Long getCharacterCount()
      Gets the characterCount.

      Number of characters in the input text.

      Returns:
      the characterCount
    • getDetectedLanguage

      public String getDetectedLanguage()
      Gets the detectedLanguage.

      The language code of the source text if the source language was automatically detected.

      Returns:
      the detectedLanguage
    • getDetectedLanguageConfidence

      public Double getDetectedLanguageConfidence()
      Gets the detectedLanguageConfidence.

      A score between 0 and 1 indicating the confidence of source language detection. A higher value indicates greater confidence. This is returned only when the service automatically detects the source language.

      Returns:
      the detectedLanguageConfidence
    • getTranslations

      public List<Translation> getTranslations()
      Gets the translations.

      List of translation output in UTF-8, corresponding to the input text entries.

      Returns:
      the translations