Package com.google.cloud.translate
Class Detection
- java.lang.Object
-
- com.google.cloud.translate.Detection
-
- All Implemented Interfaces:
Serializable
public class Detection extends Object implements Serializable
Information about a language detection. Objects of this class contain the detected language and possibly a confidence level.- See Also:
- Detecting Language , Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
float
getConfidence()
Returns an optional confidence value in the interval [0,1].String
getLanguage()
Returns the code of the detected language.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getLanguage
public String getLanguage()
Returns the code of the detected language.- See Also:
- Supported Languages
-
getConfidence
public float getConfidence()
Returns an optional confidence value in the interval [0,1]. The closer this value is to 1, the higher the confidence level for the language detection. Note that this value is not always available.
-
-