opennlp.maxent.io
Class GISModelWriter
java.lang.Object
opennlp.maxent.io.GISModelWriter
- Direct Known Subclasses:
- BinaryGISModelWriter, ObjectGISModelWriter, PlainTextGISModelWriter, SuffixSensitiveGISModelWriter
public abstract class GISModelWriter
- extends java.lang.Object
Abstract parent class for GISModel writers. It provides the persist method
which takes care of the structure of a stored document, and requires an
extending class to define precisely how the data should be stored.
- Version:
- $Revision: 1.7 $, $Date: 2006/11/09 20:58:19 $
- Author:
- Jason Baldridge
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAMS
protected Context[] PARAMS
OUTCOME_LABELS
protected java.lang.String[] OUTCOME_LABELS
CORRECTION_CONSTANT
protected int CORRECTION_CONSTANT
CORRECTION_PARAM
protected double CORRECTION_PARAM
PRED_LABELS
protected java.lang.String[] PRED_LABELS
GISModelWriter
public GISModelWriter(GISModel model)
writeUTF
protected abstract void writeUTF(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
writeInt
protected abstract void writeInt(int i)
throws java.io.IOException
- Throws:
java.io.IOException
writeDouble
protected abstract void writeDouble(double d)
throws java.io.IOException
- Throws:
java.io.IOException
close
protected abstract void close()
throws java.io.IOException
- Throws:
java.io.IOException
persist
public void persist()
throws java.io.IOException
- Writes the model to disk, using the
writeX()
methods
provided by extending classes.
If you wish to create a GISModelWriter which uses a different
structure, it will be necessary to override the persist method in
addition to implementing the writeX()
methods.
- Throws:
java.io.IOException
sortValues
protected ComparablePredicate[] sortValues()
compressOutcomes
protected java.util.List compressOutcomes(ComparablePredicate[] sorted)
Copyright © 2005 Jason Baldridge, Gann Bierner, and Thomas Morton. All Rights Reserved.