opennlp.maxent.io
Class PlainTextGISModelReader

java.lang.Object
  extended by opennlp.maxent.io.GISModelReader
      extended by opennlp.maxent.io.PlainTextGISModelReader
Direct Known Subclasses:
OldFormatGISModelReader

public class PlainTextGISModelReader
extends GISModelReader

A reader for GIS models stored in plain text format.

Version:
$Revision: 1.1.1.1 $, $Date: 2001/10/23 14:06:53 $
Author:
Jason Baldridge

Field Summary
 
Fields inherited from class opennlp.maxent.io.GISModelReader
NUM_PREDS
 
Constructor Summary
PlainTextGISModelReader(java.io.BufferedReader br)
          Constructor which directly instantiates the BufferedReader containing the model contents.
PlainTextGISModelReader(java.io.File f)
          Constructor which takes a File and creates a reader for it.
 
Method Summary
protected  double readDouble()
          Implement as needed for the format the model is stored in.
protected  int readInt()
          Implement as needed for the format the model is stored in.
protected  java.lang.String readUTF()
          Implement as needed for the format the model is stored in.
 
Methods inherited from class opennlp.maxent.io.GISModelReader
checkModelType, getCorrectionConstant, getCorrectionParameter, getModel, getOutcomePatterns, getOutcomes, getParameters, getPredicates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextGISModelReader

public PlainTextGISModelReader(java.io.BufferedReader br)
Constructor which directly instantiates the BufferedReader containing the model contents.

Parameters:
br - The BufferedReader containing the model information.

PlainTextGISModelReader

public PlainTextGISModelReader(java.io.File f)
                        throws java.io.IOException
Constructor which takes a File and creates a reader for it. Detects whether the file is gzipped or not based on whether the suffix contains ".gz".

Parameters:
f - The File in which the model is stored.
Throws:
java.io.IOException
Method Detail

readInt

protected int readInt()
               throws java.io.IOException
Description copied from class: GISModelReader
Implement as needed for the format the model is stored in.

Specified by:
readInt in class GISModelReader
Throws:
java.io.IOException

readDouble

protected double readDouble()
                     throws java.io.IOException
Description copied from class: GISModelReader
Implement as needed for the format the model is stored in.

Specified by:
readDouble in class GISModelReader
Throws:
java.io.IOException

readUTF

protected java.lang.String readUTF()
                            throws java.io.IOException
Description copied from class: GISModelReader
Implement as needed for the format the model is stored in.

Specified by:
readUTF in class GISModelReader
Throws:
java.io.IOException


Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.