public interface Classifier<T>
http://en.wikipedia.org/wiki/Classifier_(mathematics), which assign classes of type
T| Modifier and Type | Method and Description |
|---|---|
ClassificationResult<T> |
assignClass(String text)
Assign a class (with score) to the given text String
|
void |
train(AtomicReader atomicReader,
String[] textFieldNames,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
train(AtomicReader atomicReader,
String textFieldName,
String classFieldName,
Analyzer analyzer)
Train the classifier using the underlying Lucene index
|
void |
train(AtomicReader atomicReader,
String textFieldName,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
ClassificationResult<T> assignClass(String text) throws IOException
text - a String containing text to be classifiedClassificationResult holding assigned class of type T and scoreIOException - If there is a low-level I/O error.void train(AtomicReader atomicReader, String textFieldName, String classFieldName, Analyzer analyzer) throws IOException
atomicReader - the reader to use to access the Lucene indextextFieldName - the name of the field used to compare documentsclassFieldName - the name of the field containing the class assigned to documentsanalyzer - the analyzer used to tokenize / filter the unseen textIOException - If there is a low-level I/O error.void train(AtomicReader atomicReader, String textFieldName, String classFieldName, Analyzer analyzer, Query query) throws IOException
atomicReader - the reader to use to access the Lucene indextextFieldName - the name of the field used to compare documentsclassFieldName - the name of the field containing the class assigned to documentsanalyzer - the analyzer used to tokenize / filter the unseen textquery - the query to filter which documents use for trainingIOException - If there is a low-level I/O error.void train(AtomicReader atomicReader, String[] textFieldNames, String classFieldName, Analyzer analyzer, Query query) throws IOException
atomicReader - the reader to use to access the Lucene indextextFieldNames - the names of the fields to be used to compare documentsclassFieldName - the name of the field containing the class assigned to documentsanalyzer - the analyzer used to tokenize / filter the unseen textquery - the query to filter which documents use for trainingIOException - If there is a low-level I/O error.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.