Interface IClassifier<T>
A classifier, see http://en.wikipedia.org/wiki/Classifier_(mathematics),
which assign classes of type
Note
This API is experimental and might change in incompatible ways in the next release.
Namespace: Lucene.Net.Classification
Assembly: Lucene.Net.Classification.dll
Syntax
public interface IClassifier<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
AssignClass(string)
Assign a class (with score) to the given text string
Declaration
ClassificationResult<T> AssignClass(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | a string containing text to be classified |
Returns
Type | Description |
---|---|
ClassificationResult<T> | a ClassificationResult<T> holding assigned class of type |
Train(AtomicReader, string, string, Analyzer)
Train the classifier using the underlying Lucene index
Declaration
void Train(AtomicReader atomicReader, string textFieldName, string classFieldName, Analyzer analyzer)
Parameters
Type | Name | Description |
---|---|---|
AtomicReader | atomicReader | the reader to use to access the Lucene index |
string | textFieldName | the name of the field used to compare documents |
string | classFieldName | the name of the field containing the class assigned to documents |
Analyzer | analyzer | the analyzer used to tokenize / filter the unseen text |
Train(AtomicReader, string, string, Analyzer, Query)
Train the classifier using the underlying Lucene index
Declaration
void Train(AtomicReader atomicReader, string textFieldName, string classFieldName, Analyzer analyzer, Query query)
Parameters
Type | Name | Description |
---|---|---|
AtomicReader | atomicReader | the reader to use to access the Lucene index |
string | textFieldName | the name of the field used to compare documents |
string | classFieldName | the name of the field containing the class assigned to documents |
Analyzer | analyzer | the analyzer used to tokenize / filter the unseen text |
Query | query | the query to filter which documents use for training |
Train(AtomicReader, string[], string, Analyzer, Query)
Train the classifier using the underlying Lucene index
Declaration
void Train(AtomicReader atomicReader, string[] textFieldNames, string classFieldName, Analyzer analyzer, Query query)
Parameters
Type | Name | Description |
---|---|---|
AtomicReader | atomicReader | the reader to use to access the Lucene index |
string[] | textFieldNames | the names of the fields to be used to compare documents |
string | classFieldName | the name of the field containing the class assigned to documents |
Analyzer | analyzer | the analyzer used to tokenize / filter the unseen text |
Query | query | the query to filter which documents use for training |