Package opennlp.tools.sentiment
Class EmojiSentimentFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.sentiment.SentimentFactory
opennlp.tools.sentiment.EmojiSentimentFactory
A
SentimentFactory whose context generator adds emoji annotation features (see
EmojiSentimentContextGenerator). Pass it to
SentimentME.train to opt in; the
factory class is recorded in the trained model's manifest, so prediction re-creates the same
context. The default SentimentFactory is unchanged.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a factory whose context generator adds emoji annotation features. -
Method Summary
Methods inherited from class opennlp.tools.sentiment.SentimentFactory
getTokenizer, validateArtifactMapMethods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
Constructor Details
-
EmojiSentimentFactory
public EmojiSentimentFactory()Instantiates a factory whose context generator adds emoji annotation features.
-
-
Method Details
-
createContextGenerator
Creates a newcontext generator.Returns an
EmojiSentimentContextGenerator.- Overrides:
createContextGeneratorin classSentimentFactory- Returns:
- a context generator for Sentiment Analysis
-