Package org.apache.lucene.classification
Class ClassificationResult<T>
java.lang.Object
org.apache.lucene.classification.ClassificationResult<T>
- All Implemented Interfaces:
Comparable<ClassificationResult<T>>
The result of a call to
Classifier.assignClass(String)
holding an assigned class of type
T
and a score.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
retrieve the result classdouble
getScore()
retrieve the result score
-
Constructor Details
-
ClassificationResult
Constructor- Parameters:
assignedClass
- the classT
assigned by aClassifier
score
- the score for the assignedClass as adouble
-
-
Method Details
-
getAssignedClass
retrieve the result class- Returns:
- a
T
representing an assigned class
-
getScore
public double getScore()retrieve the result score- Returns:
- a
double
representing a result score
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-