opennlp.tools.util.model
Class BaseModel

java.lang.Object
  extended by opennlp.tools.util.model.BaseModel
Direct Known Subclasses:
ChunkerModel, CorefModel, DoccatModel, ParserModel, POSModel, SentenceModel, TokenizerModel, TokenNameFinderModel

public abstract class BaseModel
extends Object

This model is a common based which can be used by the components model classes. TODO: Provide sub classes access to serializers already in constructor


Field Summary
static String TRAINING_CUTOFF_PROPERTY
           
static String TRAINING_EVENTHASH_PROPERTY
           
static String TRAINING_ITERATIONS_PROPERTY
           
 
Method Summary
 String getLanguage()
          Retrieves the language code of the material which was used to train the model or x-unspecified if non was set.
 String getManifestProperty(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.
 void serialize(OutputStream out)
          Serializes the model to the given OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRAINING_CUTOFF_PROPERTY

public static final String TRAINING_CUTOFF_PROPERTY
See Also:
Constant Field Values

TRAINING_ITERATIONS_PROPERTY

public static final String TRAINING_ITERATIONS_PROPERTY
See Also:
Constant Field Values

TRAINING_EVENTHASH_PROPERTY

public static final String TRAINING_EVENTHASH_PROPERTY
See Also:
Constant Field Values
Method Detail

getManifestProperty

public final String getManifestProperty(String key)
Retrieves the value to the given key from the manifest.properties entry.

Parameters:
key -
Returns:
the value

getLanguage

public final String getLanguage()
Retrieves the language code of the material which was used to train the model or x-unspecified if non was set.

Returns:
the language code of this model

getVersion

public final Version getVersion()
Retrieves the OpenNLP version which was used to create the model.

Returns:
the version

serialize

public final void serialize(OutputStream out)
                     throws IOException
Serializes the model to the given OutputStream.

Parameters:
out - stream to write the model to
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.