Package com.basistech.rosette.dm
Class LanguageDetection
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.Attribute
com.basistech.rosette.dm.LanguageDetection
- All Implemented Interfaces:
Serializable
The results of running language detection on a region of text.
The results are composed as a list of
LanguageDetection.DetectionResult
,
to reflect the multiple alternatives produced by language detectors.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for language detection results.static class
A single result from language detection. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute
endOffset, startOffset
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties
-
Constructor Summary
ModifierConstructorDescriptionprotected
LanguageDetection
(int startOffset, int endOffset, List<LanguageDetection.DetectionResult> detectionResults, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionReturns the detection results, in order from best to worst confidence.protected com.google.common.base.MoreObjects.ToStringHelper
Methods inherited from class com.basistech.rosette.dm.Attribute
getEndOffset, getStartOffset
Methods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
-
Constructor Details
-
LanguageDetection
protected LanguageDetection(int startOffset, int endOffset, List<LanguageDetection.DetectionResult> detectionResults, Map<String, Object> extendedProperties)
-
-
Method Details
-
getDetectionResults
Returns the detection results, in order from best to worst confidence.- Returns:
- the detection results, in order from best to worst confidence
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelper
in classAttribute
-