edu.msu.cme.rdp.classifier.rrnaclassifier
Class ProbIndexFileParser

java.lang.Object
  extended by edu.msu.cme.rdp.classifier.rrnaclassifier.ProbIndexFileParser

 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
ProbIndexFileParser()
          Creates a new instance of ProbFileParser.
 
Method Summary
(package private)  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

ProbIndexFileParser()
Creates a new instance of ProbFileParser.

Method Detail

createProbIndexArr

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