public class OldFormatGISModelReader extends PlainTextGISModelReader
dataReader, NUM_PREDS
Constructor and Description |
---|
OldFormatGISModelReader(String modelname)
Constructor which takes the name of the model without any suffixes, such as
".mei.gz" or ".mep.gz".
|
Modifier and Type | Method and Description |
---|---|
protected Context[] |
getParameters(int[][] outcomePatterns)
Reads the parameters from a file and populates an array of context objects.
|
static void |
main(String[] args)
Convert a model created with Maxent 1.0 to a format used with Maxent 1.2.
|
checkModelType, constructModel, getCorrectionConstant, getCorrectionParameter
getModel, getOutcomePatterns, getOutcomes, getPredicates, readDouble, readInt, readUTF
public OldFormatGISModelReader(String modelname) throws IOException
IOException
protected Context[] getParameters(int[][] outcomePatterns) throws IOException
getParameters
in class AbstractModelReader
outcomePatterns
- The outcomes patterns for the model. The first index refers to
which outcome pattern (a set of outcomes that occurs with a
context) is being specified. The second index specifies the number
of contexts which use this pattern at index 0, and the index of
each outcomes which make up this pattern in indicies 1-n.IOException
- when the model file does not match the outcome patterns or can
not be read.public static void main(String[] args) throws IOException
Usage: java opennlp.maxent.io.OldFormatGISModelReader model_name_prefix (new_model_name)");
If the new_model_name is left unspecified, the new model will be saved in
gzipped, binary format as "
IOException
Copyright © 2016 The Apache Software Foundation. All rights reserved.