public class TranslationResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Field and Description |
---|---|
protected java.lang.Long |
characterCount |
protected java.lang.String |
detectedLanguage |
protected java.lang.Double |
detectedLanguageConfidence |
protected java.util.List<Translation> |
translations |
protected java.lang.Long |
wordCount |
Constructor and Description |
---|
TranslationResult() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getCharacterCount()
Gets the characterCount.
|
java.lang.String |
getDetectedLanguage()
Gets the detectedLanguage.
|
java.lang.Double |
getDetectedLanguageConfidence()
Gets the detectedLanguageConfidence.
|
java.util.List<Translation> |
getTranslations()
Gets the translations.
|
java.lang.Long |
getWordCount()
Gets the wordCount.
|
@SerializedName(value="word_count") protected java.lang.Long wordCount
@SerializedName(value="character_count") protected java.lang.Long characterCount
@SerializedName(value="detected_language") protected java.lang.String detectedLanguage
@SerializedName(value="detected_language_confidence") protected java.lang.Double detectedLanguageConfidence
protected java.util.List<Translation> translations
public java.lang.Long getWordCount()
An estimate of the number of words in the input text.
public java.lang.Long getCharacterCount()
Number of characters in the input text.
public java.lang.String getDetectedLanguage()
The language code of the source text if the source language was automatically detected.
public java.lang.Double getDetectedLanguageConfidence()
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.
public java.util.List<Translation> getTranslations()
List of translation output in UTF-8, corresponding to the input text entries.