opennlp.maxent.io
Class PooledGISModelReader

java.lang.Object
  extended by opennlp.maxent.io.GISModelReader
      extended by opennlp.maxent.io.SuffixSensitiveGISModelReader
          extended by opennlp.maxent.io.PooledGISModelReader

public class PooledGISModelReader
extends SuffixSensitiveGISModelReader

This class works exactly like the SuffisSensitiveGISModelReader except that it attempts to pool all context strings. This is useful when loading models which share many context strings.


Field Summary
 
Fields inherited from class opennlp.maxent.io.GISModelReader
NUM_PREDS
 
Constructor Summary
PooledGISModelReader(java.io.File f)
          A reader for GIS models which inspects the filename and invokes the appropriate GISModelReader depending on the filename's suffixes.
 
Method Summary
protected  java.lang.String readUTF()
          Implement as needed for the format the model is stored in.
 
Methods inherited from class opennlp.maxent.io.SuffixSensitiveGISModelReader
main, readDouble, readInt
 
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

PooledGISModelReader

public PooledGISModelReader(java.io.File f)
                     throws java.io.IOException
A reader for GIS models which inspects the filename and invokes the appropriate GISModelReader depending on the filename's suffixes.

The following assumption are made about suffixes:

  • .gz --> the file is gzipped (must be the last suffix)
  • .txt --> the file is plain text
  • .bin --> the file is binary

    Parameters:
    f -
    Throws:
    java.io.IOException
  • Method Detail

    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.

    Overrides:
    readUTF in class SuffixSensitiveGISModelReader
    Throws:
    java.io.IOException


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