C
- the class of instances that represent the classification categoriespublic class ExtractorClassifier<C> extends java.lang.Object implements Classifier<ExtractorDataSource,C>
Constructor and Description |
---|
ExtractorClassifier(Classifier<? super LocalAbstractObject,C> classifier,
Extractor<? extends LocalAbstractObject> extractor,
java.lang.String extractedObjectParameter)
Creates a new extractor classifier.
|
Modifier and Type | Method and Description |
---|---|
Classification<C> |
classify(ExtractorDataSource dataSource,
Parametric parameters)
Classifies the given
object into zero, one, or several categories C . |
java.lang.Class<? extends C> |
getCategoriesClass()
Returns the class of instances that represent the classification categories (classes).
|
LocalAbstractObject |
getExtractedObject(Parametric parameters)
Returns the extracted object stored by this classifier in the given parameters.
|
public ExtractorClassifier(Classifier<? super LocalAbstractObject,C> classifier, Extractor<? extends LocalAbstractObject> extractor, java.lang.String extractedObjectParameter)
classifier
- the classifier used to compute the object classificationextractor
- the extractor that supplies the extracted objectsextractedObjectParameter
- the name of the parameter to put the extracted object into when classifyingpublic Classification<C> classify(ExtractorDataSource dataSource, Parametric parameters) throws ClassificationException
Classifier
object
into zero, one, or several categories C
.classify
in interface Classifier<ExtractorDataSource,C>
dataSource
- the object to classifyparameters
- additional parameters for the classification;
the values for the parameters are specific to a given classifier
implementation and can be updated during the process if they are ModifiableParametric
ClassificationException
- if there was an error classifying the objectpublic java.lang.Class<? extends C> getCategoriesClass()
Classifier
getCategoriesClass
in interface Classifier<ExtractorDataSource,C>
public LocalAbstractObject getExtractedObject(Parametric parameters)
parameters
- the parameters to get the stored object from