opennlp.maxent.io
Class PooledGISModelReader
java.lang.Object
opennlp.model.AbstractModelReader
opennlp.maxent.io.GISModelReader
opennlp.maxent.io.SuffixSensitiveGISModelReader
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. |
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
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.