mark.nlp.features
Class SimpleOrderer

java.lang.Object
  |
  +--mark.nlp.features.ClassificationOrderer
        |
        +--mark.nlp.features.SimpleOrderer
All Implemented Interfaces:
Orderer
Direct Known Subclasses:
ChiSquared, MutualInformation, NegativeMutualInformation, PointwiseChiSquared, PointwiseMutualInformation, Random

public abstract class SimpleOrderer
extends ClassificationOrderer

A ClassificationOrderer that orders from the corpus counter alone. In other words, it only needs to know about the number of occurrences of each potential feature within the corpus and within each category.


Field Summary
 
Fields inherited from class mark.nlp.features.ClassificationOrderer
fCatCounters, fCounter, fPotentialFeatures
 
Constructor Summary
SimpleOrderer()
           
 
Method Summary
protected  double[] computeJustScores()
           
 double[] computeJustScores(BagCorpusCounter counter, BagCorpusCounter[] catCounters, ObjectMap potentialFeatures)
           
protected  java.util.ArrayList computeScores()
          Subclasses implement the following function which returns a Score for each potential feature in the set of potential features.
abstract  double updateScore(double oldScore, double numCW, double numC, double numW, double num)
           
 
Methods inherited from class mark.nlp.features.ClassificationOrderer
order, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleOrderer

public SimpleOrderer()
Method Detail

updateScore

public abstract double updateScore(double oldScore,
                                   double numCW,
                                   double numC,
                                   double numW,
                                   double num)

computeJustScores

protected double[] computeJustScores()
                              throws java.lang.Exception
java.lang.Exception

computeScores

protected java.util.ArrayList computeScores()
                                     throws java.lang.Exception
Description copied from class: ClassificationOrderer
Subclasses implement the following function which returns a Score for each potential feature in the set of potential features.

Specified by:
computeScores in class ClassificationOrderer
Returns:
an array list of Scores. The array list is parallel to fVocabulary.
java.lang.Exception

computeJustScores

public double[] computeJustScores(BagCorpusCounter counter,
                                  BagCorpusCounter[] catCounters,
                                  ObjectMap potentialFeatures)
                           throws java.lang.Exception
java.lang.Exception