opennlp.tools.sentdetect
Class SentenceModel

java.lang.Object
  extended by opennlp.tools.util.model.BaseModel
      extended by opennlp.tools.sentdetect.SentenceModel

public class SentenceModel
extends BaseModel

The SentenceModel is the model used by a learnable SentenceDetector.

See Also:
SentenceDetectorME

Field Summary
 
Fields inherited from class opennlp.tools.util.model.BaseModel
artifactMap, MANIFEST_ENTRY, TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY
 
Constructor Summary
SentenceModel(InputStream in)
           
SentenceModel(String languageCode, opennlp.model.AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations)
           
SentenceModel(String languageCode, opennlp.model.AbstractModel sentModel, boolean useTokenEnd, Dictionary abbreviations, Map<String,String> manifestInfoEntries)
           
 
Method Summary
 Dictionary getAbbreviations()
           
 opennlp.model.AbstractModel getMaxentModel()
           
static void main(String[] args)
           
 boolean useTokenEnd()
           
protected  void validateArtifactMap()
          Validates the parsed artifacts.
 
Methods inherited from class opennlp.tools.util.model.BaseModel
createArtifactSerializers, getArtifactSerializer, getLanguage, getManifestProperty, getVersion, serialize, setManifestProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SentenceModel

public SentenceModel(String languageCode,
                     opennlp.model.AbstractModel sentModel,
                     boolean useTokenEnd,
                     Dictionary abbreviations,
                     Map<String,String> manifestInfoEntries)

SentenceModel

public SentenceModel(String languageCode,
                     opennlp.model.AbstractModel sentModel,
                     boolean useTokenEnd,
                     Dictionary abbreviations)

SentenceModel

public SentenceModel(InputStream in)
              throws IOException,
                     InvalidFormatException
Throws:
IOException
InvalidFormatException
Method Detail

validateArtifactMap

protected void validateArtifactMap()
                            throws InvalidFormatException
Description copied from class: BaseModel
Validates the parsed artifacts. If something is not valid subclasses should throw an InvalidFormatException. Note: Subclasses should generally invoke super.validateArtifactMap at the beginning of this method.

Overrides:
validateArtifactMap in class BaseModel
Throws:
InvalidFormatException

getMaxentModel

public opennlp.model.AbstractModel getMaxentModel()

getAbbreviations

public Dictionary getAbbreviations()

useTokenEnd

public boolean useTokenEnd()

main

public static void main(String[] args)
                 throws FileNotFoundException,
                        IOException,
                        InvalidFormatException
Throws:
FileNotFoundException
IOException
InvalidFormatException


Copyright © 2010. All Rights Reserved.