Class ProbIndexFileParser

java.lang.Object
edu.msu.cme.rdp.classifier.io.ProbIndexFileParser

public class ProbIndexFileParser extends Object
A parser to parser a reader contains a list of indices of words, and start indices of the conditional probabilities.
  • Constructor Details

    • ProbIndexFileParser

      public ProbIndexFileParser()
  • Method Details

    • createProbIndexArr

      public static HierarchyVersion createProbIndexArr(Reader r, int[] arr, HierarchyVersion version) throws 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:
      IOException
      TrainingDataException