opennlp.maxent.io
Class PooledGISModelReader

java.lang.Object
  extended by opennlp.model.AbstractModelReader
      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.


Constructor Summary
PooledGISModelReader(File f)
          A reader for GIS models which inspects the filename and invokes the appropriate GISModelReader depending on the filename's suffixes.
 
Method Summary
 String readUTF()
          Implement as needed for the format the model is stored in.
 
Methods inherited from class opennlp.maxent.io.SuffixSensitiveGISModelReader
main
 
Methods inherited from class opennlp.maxent.io.GISModelReader
checkModelType, constructModel
 
Methods inherited from class opennlp.model.AbstractModelReader
getModel, readDouble, readInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PooledGISModelReader

public PooledGISModelReader(File f)
                     throws 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:
    IOException
  • Method Detail

    readUTF

    public String readUTF()
                   throws IOException
    Description copied from class: AbstractModelReader
    Implement as needed for the format the model is stored in.

    Overrides:
    readUTF in class AbstractModelReader
    Throws:
    IOException


    Copyright © 2011 The Apache Software Foundation. All Rights Reserved.