opennlp.maxent.io
Class PlainTextGISModelWriter

java.lang.Object
  extended by opennlp.maxent.io.GISModelWriter
      extended by opennlp.maxent.io.PlainTextGISModelWriter

public class PlainTextGISModelWriter
extends GISModelWriter

Model writer that saves models 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.GISModelWriter
CORRECTION_CONSTANT, CORRECTION_PARAM, OUTCOME_LABELS, PARAMS, PRED_LABELS
 
Constructor Summary
PlainTextGISModelWriter(GISModel model, java.io.BufferedWriter bw)
          Constructor which takes a GISModel and a BufferedWriter and prepares itself to write the model to that writer.
PlainTextGISModelWriter(GISModel model, java.io.File f)
          Constructor which takes a GISModel and a File and prepares itself to write the model to that file.
 
Method Summary
protected  void close()
           
protected  void writeDouble(double d)
           
protected  void writeInt(int i)
           
protected  void writeUTF(java.lang.String s)
           
 
Methods inherited from class opennlp.maxent.io.GISModelWriter
compressOutcomes, persist, sortValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextGISModelWriter

public PlainTextGISModelWriter(GISModel model,
                               java.io.File f)
                        throws java.io.IOException,
                               java.io.FileNotFoundException
Constructor which takes a GISModel and a File and prepares itself to write the model to that file. Detects whether the file is gzipped or not based on whether the suffix contains ".gz".

Parameters:
model - The GISModel which is to be persisted.
f - The File in which the model is to be persisted.
Throws:
java.io.IOException
java.io.FileNotFoundException

PlainTextGISModelWriter

public PlainTextGISModelWriter(GISModel model,
                               java.io.BufferedWriter bw)
Constructor which takes a GISModel and a BufferedWriter and prepares itself to write the model to that writer.

Parameters:
model - The GISModel which is to be persisted.
bw - The BufferedWriter which will be used to persist the model.
Method Detail

writeUTF

protected void writeUTF(java.lang.String s)
                 throws java.io.IOException
Specified by:
writeUTF in class GISModelWriter
Throws:
java.io.IOException

writeInt

protected void writeInt(int i)
                 throws java.io.IOException
Specified by:
writeInt in class GISModelWriter
Throws:
java.io.IOException

writeDouble

protected void writeDouble(double d)
                    throws java.io.IOException
Specified by:
writeDouble in class GISModelWriter
Throws:
java.io.IOException

close

protected void close()
              throws java.io.IOException
Specified by:
close in class GISModelWriter
Throws:
java.io.IOException


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