DetectedLanguage Class
- java.
lang. Object - com.
azure. ai. translation. text. models. DetectedLanguage
- com.
Implements
public final class DetectedLanguage
implements JsonSerializable<DetectedLanguage>
An object describing the detected language.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Detected |
fromJson(JsonReader jsonReader)
Reads an instance of Detected |
| String |
getLanguage()
Get the language property: A string representing the code of the detected language. |
| double |
getScore()
Get the score property: A float value indicating the confidence in the result. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static DetectedLanguage fromJson(JsonReader jsonReader)
Reads an instance of DetectedLanguage from the JsonReader.
Parameters:
Returns:
Throws:
getLanguage
public String getLanguage()
Get the language property: A string representing the code of the detected language.
Returns:
getScore
public double getScore()
Get the score property: A float value indicating the confidence in the result. The score is between zero and one and a low score indicates a low confidence.
Returns: