Package edu.msu.cme.rdp.classifier.io
Class LogWordPriorFileParser
java.lang.Object
edu.msu.cme.rdp.classifier.io.LogWordPriorFileParser
A parser to parse a read containing a list of the indices of words
and the log value of word prior probabilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HierarchyVersion
createLogWordPriorArr
(Reader r, float[] arr, HierarchyVersion version) Reads a file and saves the log word priors in an array.
-
Constructor Details
-
LogWordPriorFileParser
public LogWordPriorFileParser()
-
-
Method Details
-
createLogWordPriorArr
public static HierarchyVersion createLogWordPriorArr(Reader r, float[] arr, HierarchyVersion version) throws IOException, TrainingDataException Reads a file and saves the log word priors in an array. Returns the version information for validation purpose. Input file format: integer follows by a tab and float each line. The first value indicates the index of a word, the second value indicates the log value of word prior probability.- Throws:
IOException
TrainingDataException
-