Package opennlp.tools.ml.maxent.io
Class PooledGISModelReader
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelReader
-
- opennlp.tools.ml.maxent.io.GISModelReader
-
- opennlp.tools.ml.maxent.io.SuffixSensitiveGISModelReader
-
- opennlp.tools.ml.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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
readUTF()
Implement as needed for the format the model is stored in.-
Methods inherited from class opennlp.tools.ml.maxent.io.SuffixSensitiveGISModelReader
main
-
Methods inherited from class opennlp.tools.ml.maxent.io.GISModelReader
checkModelType, constructModel
-
Methods inherited from class opennlp.tools.ml.model.AbstractModelReader
getModel, readDouble, readInt
-
-
-
-
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
public java.lang.String readUTF() throws java.io.IOException
Description copied from class:AbstractModelReader
Implement as needed for the format the model is stored in.- Overrides:
readUTF
in classAbstractModelReader
- Throws:
java.io.IOException
-
-