public class SentimentModel
extends opennlp.tools.util.model.BaseModel
| Constructor and Description |
|---|
SentimentModel(File file)
Initializes the Sentiment Analysis model.
|
SentimentModel(String languageCode,
opennlp.tools.ml.model.MaxentModel sentimentModel,
Map<String,String> manifestInfoEntries,
SentimentFactory factory)
Initializes the Sentiment Analysis model.
|
SentimentModel(URL modelURL)
Initializes the Sentiment Analysis model.
|
| Modifier and Type | Method and Description |
|---|---|
SentimentFactory |
getFactory()
Returns the sentiment factory
|
opennlp.tools.ml.model.MaxentModel |
getMaxentModel()
Returns the MaxEntropy model
|
opennlp.tools.ml.model.SequenceClassificationModel<String> |
getSentimentModel()
Deprecated.
|
checkArtifactMap, createArtifactSerializers, createArtifactSerializers, getArtifact, getArtifactSerializer, getDefaultFactory, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, setManifestProperty, validateArtifactMappublic SentimentModel(String languageCode, opennlp.tools.ml.model.MaxentModel sentimentModel, Map<String,String> manifestInfoEntries, SentimentFactory factory)
languageCode - the code for the language of the text, e.g. "en"sentimentModel - a MaxEnt sentiment modelmanifestInfoEntries - additional information in the manifestfactory - a Sentiment Analysis factorypublic SentimentModel(URL modelURL) throws IOException, opennlp.tools.util.InvalidFormatException
modelURL - the URL to a file required for the modelIOExceptionopennlp.tools.util.InvalidFormatExceptionpublic SentimentModel(File file) throws opennlp.tools.util.InvalidFormatException, IOException
file - the file required for the modelopennlp.tools.util.InvalidFormatExceptionIOException@Deprecated public opennlp.tools.ml.model.SequenceClassificationModel<String> getSentimentModel()
public SentimentFactory getFactory()
public opennlp.tools.ml.model.MaxentModel getMaxentModel()
Copyright © 2016. All rights reserved.