C
- the class of the classification categoriespublic class BestKeywordsReducer<C> extends java.lang.Object implements KeywordClassifier<C,C>
Modifier and Type | Class and Description |
---|---|
static class |
BestKeywordsReducer.BestKeywordValueSelector
Specifies the method that provides the values
|
Constructor and Description |
---|
BestKeywordsReducer(java.lang.Class<? extends C> categoriesClass,
BestKeywordsReducer.BestKeywordValueSelector selector,
int bestCount)
Creates a new reducer for selecting best keywords.
|
Modifier and Type | Method and Description |
---|---|
KeywordClassification<C> |
classify(KeywordClassification<C> inputClassification,
Parametric parameters)
Transforms the given
inputClassification into the output keyword classification. |
java.lang.Class<? extends C> |
getCategoriesClass()
Returns the class of the output classification categories.
|
java.lang.Class<? extends C> |
getInputCategoriesClass()
Returns the class of the input classification categories.
|
public BestKeywordsReducer(java.lang.Class<? extends C> categoriesClass, BestKeywordsReducer.BestKeywordValueSelector selector, int bestCount)
categoriesClass
- the class of the classification categoriesselector
- the method for deciding the keyword qualitybestCount
- the number of keywords to selectpublic java.lang.Class<? extends C> getInputCategoriesClass()
KeywordClassifier
getInputCategoriesClass
in interface KeywordClassifier<C,C>
public java.lang.Class<? extends C> getCategoriesClass()
KeywordClassifier
getCategoriesClass
in interface Classifier<KeywordClassification<C>,C>
getCategoriesClass
in interface KeywordClassifier<C,C>
public KeywordClassification<C> classify(KeywordClassification<C> inputClassification, Parametric parameters) throws ClassificationException
KeywordClassifier
inputClassification
into the output keyword classification.classify
in interface Classifier<KeywordClassification<C>,C>
classify
in interface KeywordClassifier<C,C>
inputClassification
- the keyword classification to transformparameters
- 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 object