public class LanguageResult extends Object
Modifier and Type | Field and Description |
---|---|
static LanguageResult |
NULL |
Constructor and Description |
---|
LanguageResult(String language,
LanguageConfidence confidence,
float rawScore) |
Modifier and Type | Method and Description |
---|---|
LanguageConfidence |
getConfidence() |
String |
getLanguage()
The ISO 639-1 language code (plus optional country code)
|
float |
getRawScore() |
boolean |
isLanguage(String language)
Return true if the target language matches the detected language.
|
boolean |
isReasonablyCertain() |
boolean |
isUnknown() |
String |
toString() |
public static final LanguageResult NULL
public LanguageResult(String language, LanguageConfidence confidence, float rawScore)
language
- ISO 639-1 language code (plus optional country code)rawScore
- confidence of detector in the result.public String getLanguage()
public float getRawScore()
public LanguageConfidence getConfidence()
public boolean isReasonablyCertain()
public boolean isUnknown()
public boolean isLanguage(String language)
language
- Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.