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 and Description
`ProbIndexFileParser()`

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ProbIndexFileParser

    public ProbIndexFileParser()

### 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`