Package com.basistech.rosette.dm
Class LanguageDetection.DetectionResult
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.LanguageDetection.DetectionResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
- LanguageDetection
A single result from language detection.
Typically, the language identifier produces multiple results with
different confidence values.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for detection results. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the confidence of this detection.Returns the detected encoding.com.basistech.util.LanguageCodeReturns the detected language.com.basistech.util.ISO15924Returns the script.protected com.google.common.base.MoreObjects.ToStringHelperMethods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
-
Constructor Details
-
DetectionResult
-
-
Method Details
-
getLanguage
public com.basistech.util.LanguageCode getLanguage()Returns the detected language.- Returns:
- the detected language
-
getEncoding
Returns the detected encoding.- Returns:
- the detected encoding, or null if none was detected
-
getScript
public com.basistech.util.ISO15924 getScript()Returns the script.- Returns:
- the script, or null of none was detected
-
getConfidence
Returns the confidence of this detection.- Returns:
- the confidence of this detection alternative, or null if not available.
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelperin classBaseAttribute
-