mark.nlp.classifiers
Class SimpleInstanceFactory

java.lang.Object
  |
  +--mark.nlp.classifiers.InstanceFactory
        |
        +--mark.nlp.classifiers.SimpleInstanceFactory

public class SimpleInstanceFactory
extends InstanceFactory

An instance factory that just passes on information rather than converting it into a different format. The data set information includes the file category set, the data set, and the features. An instance list consists of an array of SparseInstanceBags. An instance is a SparseInstanceBag.


Nested Class Summary
static class SimpleInstanceFactory.DataSetInformation
          The data set information contains multiple components packaged in the following data structure.
 
Constructor Summary
SimpleInstanceFactory()
           
 
Method Summary
 java.lang.Object dataSetInformation(DataSet dataSet, FileCategorySet catSet, ObjectMap features)
          Returns information applicable to all instances in the data set.
 java.lang.Object instanceInformation(java.lang.Object dataSetInformation, SparseBagInstance instanceData)
          Returns information specific to a single instance.
 java.lang.Object instanceListInformation(java.lang.Object dataSetInformation, java.lang.String name, SparseBagInstance[] instances)
          Returns information specific to a list of instances.
 java.lang.String instanceListString(java.lang.Object dataSetInformation, java.lang.Object instanceListInformation)
          Given instance list information, generates a string that describes the instance list.
 
Methods inherited from class mark.nlp.classifiers.InstanceFactory
genFactory, genName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleInstanceFactory

public SimpleInstanceFactory()
Method Detail

dataSetInformation

public java.lang.Object dataSetInformation(DataSet dataSet,
                                           FileCategorySet catSet,
                                           ObjectMap features)
                                    throws java.lang.Exception
Description copied from class: InstanceFactory
Returns information applicable to all instances in the data set.

Specified by:
dataSetInformation in class InstanceFactory
Parameters:
catSet - the file category set that describes the categories.
features - the features to use.
Returns:
the information.
java.lang.Exception
See Also:
InstanceFactory

instanceListInformation

public java.lang.Object instanceListInformation(java.lang.Object dataSetInformation,
                                                java.lang.String name,
                                                SparseBagInstance[] instances)
                                         throws java.lang.Exception
Description copied from class: InstanceFactory
Returns information specific to a list of instances.

Specified by:
instanceListInformation in class InstanceFactory
Parameters:
dataSetInformation - the information generated by dataSetInformation ().
instances - the list data.
java.lang.Exception
See Also:
InstanceFactory

instanceInformation

public java.lang.Object instanceInformation(java.lang.Object dataSetInformation,
                                            SparseBagInstance instanceData)
                                     throws java.lang.Exception
Description copied from class: InstanceFactory
Returns information specific to a single instance.

Specified by:
instanceInformation in class InstanceFactory
Parameters:
dataSetInformation - the information generated by dataSetInformation ().
instanceData - the instance data.
java.lang.Exception
See Also:
InstanceFactory

instanceListString

public java.lang.String instanceListString(java.lang.Object dataSetInformation,
                                           java.lang.Object instanceListInformation)
Description copied from class: InstanceFactory
Given instance list information, generates a string that describes the instance list.

Specified by:
instanceListString in class InstanceFactory
Parameters:
dataSetInformation - the information generated by dataSetInformation ().
instanceListInformation - the information generated by instanceListInformation ().
See Also:
InstanceFactory