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> TgetArtifact(String key) final Stringfinal Stringfinal VersionbooleanIndicates if this provider was loaded from a serialized form.final voidSerializes the model to the specifiedFile.final voidserialize(OutputStream out) Serializes the model to the givenOutputStream.final voidSerializes 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:
getManifestPropertyin SchnittstelleArtifactProvider- Parameter:
key- A string identifying an element.- Gibt zurück:
- Retrieves the value for the given
keyfrom themanifest.properties.
-
getLanguage
- Angegeben von:
getLanguagein 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
Versionwhich was used to create the model.
-
serialize
Serializes the model to the givenOutputStream.- Parameter:
out- TheOutputStreamto 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-accessibleFileto 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-accessiblePathto 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:
getArtifactin SchnittstelleArtifactProvider- Gibt zurück:
- Gets an artifact by an identifying key or name.
-
isLoadedFromSerialized
public boolean isLoadedFromSerialized()Beschreibung aus Schnittstelle kopiert:ArtifactProviderIndicates 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:
isLoadedFromSerializedin SchnittstelleArtifactProvider- Gibt zurück:
trueif this model was loaded from a serialized form,falseotherwise.
-