|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopennlp.tools.util.model.ModelUtil
public final class ModelUtil
Utility class for handling of MaxentModels.
| Method Summary | |
|---|---|
static void |
addCutoffAndIterations(Map<String,String> manifestInfoEntries,
int cutoff,
int iterations)
|
static TrainingParameters |
createTrainingParameters(int iterations,
int cutoff)
Note: Do not use this legacy support method, internal use only! |
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 |
|---|
equals, 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 null
public 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)
public static TrainingParameters createTrainingParameters(int iterations,
int cutoff)
iterations - number of iterationscutoff - cutoff threshold
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||