|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Classifier
This interface represents the classification features of the search engine. Presumably, SearchEngine will implement this interface (in addition to Searcher which it already implements).
Method Summary | |
---|---|
void |
classify(java.lang.String[] docKeys,
java.lang.String[] classNames)
Creates a manual assignment of a set of documents to a set of classes. |
java.lang.String[] |
getClasses()
Returns the names of the classes for which classifiers are defined. |
ResultSet |
getTrainingDocuments(java.lang.String className)
Returns the set of documents that was used to train the classifier for the class with the provided class name. |
void |
reclassifyIndex(java.lang.String className)
Causes the engine to reclassify all documents against the classifier for the given class name. |
void |
trainClass(ResultSet results,
java.lang.String className,
java.lang.String fieldName)
Generates a classifier based on the documents in the provided result set. |
void |
trainClass(ResultSet results,
java.lang.String className,
java.lang.String fieldName,
Progress p)
Generates a classifier based on the documents in the provided result set. |
void |
trainClass(ResultSet results,
java.lang.String className,
java.lang.String fieldName,
java.lang.String fromField)
Generates a classifier based on the documents in the provided result set. |
void |
trainClass(ResultSet results,
java.lang.String className,
java.lang.String fieldName,
java.lang.String fromField,
Progress progress)
Generates a classifier based on the documents in the provided result set. |
Method Detail |
---|
void trainClass(ResultSet results, java.lang.String className, java.lang.String fieldName) throws SearchEngineException
results
- the set of documents to use for training the classifierclassName
- the name of the class to create or replacefieldName
- the name of the field where the results of the classifier
should be stored.
SearchEngineException
- If there is any error training the classifiervoid trainClass(ResultSet results, java.lang.String className, java.lang.String fieldName, java.lang.String fromField) throws SearchEngineException
results
- the set of documents to use for training the classifierclassName
- the name of the class to create or replacefieldName
- the name of the field where the results of the classifier
should be stored.fromField
- the vectored field from which we should build the classifiers.
If this parameter is null
then data from all indexed fields will be used. If this
parameter is the empty string, then data from the "body" field will be used.
SearchEngineException
- If there is any error training the classifiervoid trainClass(ResultSet results, java.lang.String className, java.lang.String fieldName, Progress p) throws SearchEngineException
results
- the set of documents to use for training the classifierclassName
- the name of the class to create or replacefieldName
- the name of the field where the results of the classifier
should be stored.p
- a progress monitor that will be notified as training proceeds
SearchEngineException
- If there is any error training the classifiervoid trainClass(ResultSet results, java.lang.String className, java.lang.String fieldName, java.lang.String fromField, Progress progress) throws SearchEngineException
results
- the set of documents to use for training the classifierclassName
- the name of the class to create or replaceprogress
- where to send progress eventsfieldName
- the name of the field where the results of the classifier
should be stored.fromField
- the vectored field from which we should build the classifiers.
If this parameter is null
then data from all indexed fields will be used. If this
parameter is the empty string, then data from the "body" field will be used.
SearchEngineException
- If there is any error training the classifiervoid reclassifyIndex(java.lang.String className) throws SearchEngineException
className
- the class to reclassify all documents against
SearchEngineException
- If there is any error training the classifiersvoid classify(java.lang.String[] docKeys, java.lang.String[] classNames) throws SearchEngineException
docKeys
- the keys of the documents to classifyclassNames
- the classes to assign the documents to
SearchEngineException
- if there is any error running the classifiersResultSet getTrainingDocuments(java.lang.String className) throws SearchEngineException
className
- the name of a class
SearchEngineException
- If there is any error retrieving the training documentsjava.lang.String[] getClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |