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
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for language detection results.static classA single result from language detection. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute
endOffset, startOffsetFields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLanguageDetection(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.ToStringHelperMethods inherited from class com.basistech.rosette.dm.Attribute
getEndOffset, getStartOffsetMethods 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:
toStringHelperin classAttribute
-