public class SuffixSensitiveGISModelReader extends GISModelReader
The following assumption are made about suffixes:
Constructor and Description |
---|
SuffixSensitiveGISModelReader(File f)
Constructor which takes a File and invokes the GISModelReader appropriate
for the suffix.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
To convert between different formats of the new style.
|
checkModelType, constructModel
getModel, readDouble, readInt, readUTF
public SuffixSensitiveGISModelReader(File f) throws IOException
f
- The File in which the model is stored.IOException
public static void main(String[] args) throws IOException
java opennlp.tools.ml.maxent.io.SuffixSensitiveGISModelReader old_model_name new_model_name
For example, to convert a model called "model.bin.gz" (which is thus saved in gzipped binary format) to one in (unzipped) text format:
java opennlp.tools.ml.maxent.io.SuffixSensitiveGISModelReader model.bin.gz model.txt
This particular example would of course be useful when you generally want to create models which take up less space (.bin.gz), but want to be able to inspect a few of them as plain text files.
IOException
Copyright © 2015 The Apache Software Foundation. All rights reserved.