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 Summary
Constructors Constructor Description TranslationResult()
-
Method Summary
Modifier and Type Method Description Long
getCharacterCount()
Gets the characterCount.String
getDetectedLanguage()
Gets the detectedLanguage.Double
getDetectedLanguageConfidence()
Gets the detectedLanguageConfidence.List<Translation>
getTranslations()
Gets the translations.Long
getWordCount()
Gets the wordCount.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Constructor Details
-
TranslationResult
public TranslationResult()
-
-
Method Details
-
getWordCount
Gets the wordCount.An estimate of the number of words in the input text.
- Returns:
- the wordCount
-
getCharacterCount
Gets the characterCount.Number of characters in the input text.
- Returns:
- the characterCount
-
getDetectedLanguage
Gets the detectedLanguage.The language code of the source text if the source language was automatically detected.
- Returns:
- the detectedLanguage
-
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
Gets the translations.List of translation output in UTF-8, corresponding to the input text entries.
- Returns:
- the translations
-