public abstract class BaseModel extends java.lang.Object implements ArtifactProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRAINING_CUTOFF_PROPERTY |
static java.lang.String |
TRAINING_EVENTHASH_PROPERTY |
static java.lang.String |
TRAINING_ITERATIONS_PROPERTY |
Modifier and Type | Method and Description |
---|---|
<T> T |
getArtifact(java.lang.String key)
Gets an artifact by name
|
java.lang.String |
getLanguage()
Retrieves the language code of the material which
was used to train the model or x-unspecified if
non was set.
|
java.lang.String |
getManifestProperty(java.lang.String key)
Retrieves the value to the given key from the manifest.properties
entry.
|
Version |
getVersion()
Retrieves the OpenNLP version which was used
to create the model.
|
boolean |
isLoadedFromSerialized()
Indicates if this provider was loaded from serialized.
|
void |
serialize(java.io.OutputStream out)
Serializes the model to the given
OutputStream . |
public static final java.lang.String TRAINING_CUTOFF_PROPERTY
public static final java.lang.String TRAINING_ITERATIONS_PROPERTY
public static final java.lang.String TRAINING_EVENTHASH_PROPERTY
public final java.lang.String getManifestProperty(java.lang.String key)
getManifestProperty
in interface ArtifactProvider
key
- public final java.lang.String getLanguage()
getLanguage
in interface ArtifactProvider
public final Version getVersion()
public final void serialize(java.io.OutputStream out) throws java.io.IOException
OutputStream
.out
- stream to write the model tojava.io.IOException
public <T> T getArtifact(java.lang.String key)
ArtifactProvider
getArtifact
in interface ArtifactProvider
public boolean isLoadedFromSerialized()
ArtifactProvider
isLoadedFromSerialized
in interface ArtifactProvider
Copyright © 2010 - 2020 Adobe. All Rights Reserved