edu.stanford.nlp.classify
Class FileSorter

java.lang.Object
  |
  +--edu.stanford.nlp.classify.FileSorter

public class FileSorter
extends Object

Takes a file that contains a set of lists of double/key pairs, one to a line, and sorts them.


Constructor Summary
FileSorter(String filename)
          Constructor accepts the name of the file where the lists are stored.
 
Method Summary
 double getDouble(String s)
           
 void printTopN(int n)
          This method prints the top n features for each class.
 Vector readInKeys(BufferedReader in)
           
 Vector readInProbs(BufferedReader in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSorter

public FileSorter(String filename)
           throws FileNotFoundException
Constructor accepts the name of the file where the lists are stored. Each list is in a separate file.

Method Detail

printTopN

public void printTopN(int n)
               throws IOException
This method prints the top n features for each class. That is, for each class, it says which features provided the strongest evidence that the document was in that class.

IOException

getDouble

public double getDouble(String s)

readInKeys

public Vector readInKeys(BufferedReader in)
                  throws IOException
IOException

readInProbs

public Vector readInProbs(BufferedReader in)
                   throws IOException
IOException


Stanford NLP Group