| class info |
| com.huawei.hms.mlsdk.langdetect.MLDetectedLang |
| Represents the language detection result. |
| Constructor name |
| MLDetectedLang(float probability, String langCode)Creates a language detection result instance. |
| Return type | Method name |
| boolean | equals(Object obj) |
| String | getLangCode() |
| float | getProbability() |
| int | hashCode() |
| String | toString() |
| Method |
| public MLDetectedLang(float probability, String langCode) |
| Creates a language detection result instance. |
Parameters
| Parameter name | Parameter desc |
| probability | Confidence. |
| langCode | Language code (ISO 639-1 standard code). |
| Method |
| public boolean equals(Object obj) |
| Checks whether two language detection result instances are equal. |
Parameters
| Parameter name | Parameter desc |
| obj | Language detection result instance to be compared. |
Return
| Type | desc |
| boolean | true: The two language detection result instances are equal.false: The two language detection result instances are not equal. |
| Method |
| public String getLangCode() |
| Obtains the language code in the language detection result. |
Return
| Type | desc |
| String | Returns the language code (ISO 639-1 standard code) in the language detection result. |
| Method |
| public float getProbability() |
| Obtains the confidence of the language detection result. |
Return
| Type | desc |
| float | Returns the confidence of the language detection result. |
| Method |
| public int hashCode() |
| Calculates the hash value of the language detection result instance. |
Return
| Type | desc |
| int | Returns the hash value of the language detection result instance. |
| Method |
| public String toString() |
| Converts a language detection result instance into a character string. |
Return
| Type | desc |
| String | Returns a character string converted from a language detection result instance. |