|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.util.model.ModelUtil
public final class ModelUtil
Utility class for handling of MaxentModel
s.
Method Summary | |
---|---|
static void |
addCutoffAndIterations(Map<String,String> manifestInfoEntries,
int cutoff,
int iterations)
|
static byte[] |
read(InputStream in)
Writes the provided InputStream into a byte array
which is returned |
static boolean |
validateOutcomes(opennlp.model.MaxentModel model,
String... expectedOutcomes)
Checks if the expected outcomes are all contained as outcomes in the given model. |
static void |
writeModel(opennlp.model.AbstractModel model,
OutputStream out)
Writes the given model to the given OutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void writeModel(opennlp.model.AbstractModel model, OutputStream out) throws IOException
OutputStream
.
This methods does not closes the provided stream.
model
- the model to be writtenout
- the stream the model should be written to
IOException
{@link
- IllegalArgumentException} in case one of the parameters is nullpublic static boolean validateOutcomes(opennlp.model.MaxentModel model, String... expectedOutcomes)
model
- expectedOutcomes
-
public static byte[] read(InputStream in) throws IOException
InputStream
into a byte array
which is returned
in
- stream to read data for the byte array from
IOException
- if an exception is thrown while reading
from the provided InputStream
public static void addCutoffAndIterations(Map<String,String> manifestInfoEntries, int cutoff, int iterations)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |