mark.nlp.classifiers
Interface Classifier

All Known Implementing Classes:
HierarchicalClassifier, WekaClassifier

public interface Classifier

Interface for classifiers.


Method Summary
 int classify(java.lang.Object instanceInformation)
          Classifies a single instance as returned from mark.nlp.classifiers.InstanceFactory.
 java.lang.String instanceFactoryName()
          Returns the name of the instance factory that can generate instance information suitable for this classifier.
 Results test(java.lang.Object instanceListInformation)
          Tests the classifier on the given set of instances and returns results.
 Results test(java.lang.Object instanceListInformation, java.lang.String testIdentifier)
          Tests the classifier on the given set of instances and returns results.
 void train(java.lang.Object dataSetInformation, java.lang.Object instanceListInformation, java.lang.Object parameter)
          Trains the classifier.
 

Method Detail

train

public void train(java.lang.Object dataSetInformation,
                  java.lang.Object instanceListInformation,
                  java.lang.Object parameter)
           throws java.lang.Exception
Trains the classifier.

Parameters:
dataSetInformation - the information returned from mark.nlp.classifiers.InstanceFactory common to all instances in the data set.
parameter - the classifier parameter which different classifiers interpret differently. A classifier may ignore this parameter.
java.lang.Exception

test

public Results test(java.lang.Object instanceListInformation)
             throws java.lang.Exception
Tests the classifier on the given set of instances and returns results. The classifier must have been trained.

Parameters:
instanceListInformation - the information returned from mark.nlp.classifiers.InstanceFactory specific to the list of instances on which we wish to test.
Returns:
claissification results.
java.lang.Exception

test

public Results test(java.lang.Object instanceListInformation,
                    java.lang.String testIdentifier)
             throws java.lang.Exception
Tests the classifier on the given set of instances and returns results. The classifier must have been trained.

Parameters:
instanceListInformation - the information returned from mark.nlp.classifiers.InstanceFactory specific to the list of instances on which we wish to test.
testIdentifier - A label included in the printed Results of the classifier.
Returns:
classification results.
java.lang.Exception

classify

public int classify(java.lang.Object instanceInformation)
             throws java.lang.Exception
Classifies a single instance as returned from mark.nlp.classifiers.InstanceFactory. The classifier must have been trained.

Parameters:
instanceInformation - the information specific to the instance we wish to classify.
Returns:
the predicted category.
java.lang.Exception

instanceFactoryName

public java.lang.String instanceFactoryName()
Returns the name of the instance factory that can generate instance information suitable for this classifier.

Returns:
the name.