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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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