Package edu.msu.cme.rdp.classifier.io
Class ProbIndexFileParser
- java.lang.Object
-
- edu.msu.cme.rdp.classifier.io.ProbIndexFileParser
-
public class ProbIndexFileParser extends java.lang.Object
A parser to parser a reader contains a list of indices of words, and start indices of the conditional probabilities.
-
-
Constructor Summary
Constructors Constructor Description ProbIndexFileParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HierarchyVersion
createProbIndexArr(java.io.Reader r, int[] arr, HierarchyVersion version)
Reads a file and saves the start index of conditional probability of the genera containing the word to an array.
-
-
-
Method Detail
-
createProbIndexArr
public static HierarchyVersion createProbIndexArr(java.io.Reader r, int[] arr, HierarchyVersion version) throws java.io.IOException, TrainingDataException
Reads a file and saves the start index of conditional probability of the genera containing the word to an array. Returns the version information for validation purpose. The input file format: integer follows by a tab and integer each line The first number indicates the index of a word, the second number indicates the start index of conditional probability of the genera containing that word in the list genus_wordConditionalProbList.- Throws:
java.io.IOException
TrainingDataException
-
-