Package opennlp.tools.util.model
Klasse BaseModel
java.lang.Object
opennlp.tools.util.model.BaseModel
- Alle implementierten Schnittstellen:
Serializable
,ArtifactProvider
- Bekannte direkte Unterklassen:
ChunkerModel
,DoccatModel
,LanguageDetectorModel
,LemmatizerModel
,ParserModel
,POSModel
,SentenceModel
,TokenizerModel
,TokenNameFinderModel
This is a common base model which can be used by the components' specific
model classes.
- Siehe auch:
-
Feldübersicht
Felder -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<T> T
getArtifact
(String key) final String
final String
final Version
boolean
Indicates if this provider was loaded from a serialized form.final void
Serializes the model to the specifiedFile
.final void
serialize
(OutputStream out) Serializes the model to the givenOutputStream
.final void
Serializes the model to the specifiedPath
.
-
Felddetails
-
TRAINING_CUTOFF_PROPERTY
- Siehe auch:
-
TRAINING_ITERATIONS_PROPERTY
- Siehe auch:
-
TRAINING_EVENTHASH_PROPERTY
- Siehe auch:
-
-
Methodendetails
-
getManifestProperty
- Angegeben von:
getManifestProperty
in SchnittstelleArtifactProvider
- Parameter:
key
- A string identifying an element.- Gibt zurück:
- Retrieves the value for the given
key
from themanifest.properties
.
-
getLanguage
- Angegeben von:
getLanguage
in SchnittstelleArtifactProvider
- Gibt zurück:
- Retrieves the language code of the material which was used to train a model
or
'x-unspecified'
if non was set.
-
getVersion
- Gibt zurück:
- Retrieves the OpenNLP
Version
which was used to create the model.
-
serialize
Serializes the model to the givenOutputStream
.- Parameter:
out
- TheOutputStream
to write the model to.- Löst aus:
IOException
- Thrown if IO errors occurred.IllegalStateException
- Thrown ifloadArtifactSerializers()
was not called in a subclass constructor.
-
serialize
Serializes the model to the specifiedFile
.- Parameter:
f
- The write-accessibleFile
to write the model to.- Löst aus:
IOException
- Thrown if IO errors occurred.IllegalStateException
- Thrown ifloadArtifactSerializers()
was not called in a subclass constructor.
-
serialize
Serializes the model to the specifiedPath
.- Parameter:
p
- The write-accessiblePath
to write the model to.- Löst aus:
IOException
- Thrown if IO errors occurred.IllegalStateException
- Thrown ifloadArtifactSerializers()
was not called in a subclass constructor.
-
getArtifact
- Angegeben von:
getArtifact
in SchnittstelleArtifactProvider
- Gibt zurück:
- Gets an artifact by an identifying key or name.
-
isLoadedFromSerialized
public boolean isLoadedFromSerialized()Beschreibung aus Schnittstelle kopiert:ArtifactProvider
Indicates if this provider was loaded from a serialized form.It is useful, for example, during the validation of artifacts: Skip the time-consuming ones if those were already validated during the serialization process.
- Angegeben von:
isLoadedFromSerialized
in SchnittstelleArtifactProvider
- Gibt zurück:
true
if this model was loaded from a serialized form,false
otherwise.
-