public abstract class AbstractModelReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MAX_ENTRIES_PROPERTY
System property for overriding the maximum number of entries (outcomes, predicates,
outcome patterns, chunk counts) that may be read from a model file or training data.
|
| Constructor and Description |
|---|
AbstractModelReader(DataReader dataReader) |
AbstractModelReader(File f) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
checkModelType() |
abstract AbstractModel |
constructModel() |
AbstractModel |
getModel() |
double |
readDouble()
Implement as needed for the format the model is stored in.
|
int |
readInt()
Implement as needed for the format the model is stored in.
|
String |
readUTF()
Implement as needed for the format the model is stored in.
|
public static final String MAX_ENTRIES_PROPERTY
-DOPENNLP_MAX_ENTRIES=5000000.
Falls back to 10_000_000 if absent or invalid.public AbstractModelReader(File f) throws IOException
IOExceptionpublic AbstractModelReader(DataReader dataReader)
public int readInt()
throws IOException
IOExceptionpublic double readDouble()
throws IOException
IOExceptionpublic String readUTF() throws IOException
IOExceptionpublic AbstractModel getModel() throws IOException
IOExceptionpublic abstract void checkModelType()
throws IOException
IOExceptionpublic abstract AbstractModel constructModel() throws IOException
IOExceptionCopyright © 2026 The Apache Software Foundation. All rights reserved.