Package edu.msu.cme.rdp.classifier.io

# Class GenusWordProbFileParser

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

public class GenusWordProbFileParser extends Object
A parser to parse a reader containing a list of the indices of genus nodes and the conditional probabilities that genus nodes contains the words.

## Constructor Summary

Constructors
Constructor
Description
`GenusWordProbFileParser()`

## Method Summary

Modifier and Type
Method
Description
`static HierarchyVersion`
`createGenusWordProbList(Reader r, List<GenusWordConditionalProb> aList, HierarchyVersion version)`
Reads a file and saves GenusWordConditionalProb objects in a list.

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

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

## Constructor Details

### GenusWordProbFileParser

public GenusWordProbFileParser()

## Method Details

### createGenusWordProbList

public static HierarchyVersion createGenusWordProbList(Reader r, List<GenusWordConditionalProb> aList, HierarchyVersion version) throws IOException, TrainingDataException
Reads a file and saves GenusWordConditionalProb objects in a list. Returns the version information for validation purpose. The input file format: integer follows by a tab and float each line. The first value indicates the index of a genus node, the second value indicates the conditional probability that genus node contains the word.

Throws:
  `IOException`
  `TrainingDataException`