Package opennlp.tools.sentiment

# Class EmojiSentimentFactory

java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.sentiment.SentimentFactory
opennlp.tools.sentiment.EmojiSentimentFactory

public class EmojiSentimentFactory extends SentimentFactory
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

  Constructors
  Constructor
  Description
  `EmojiSentimentFactory()`
  Instantiates a factory whose context generator adds emoji annotation features.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SentimentContextGenerator`
  `createContextGenerator()`
  Creates a new `context generator`.

  ### Methods inherited from class opennlp.tools.sentiment.SentimentFactory

  `getTokenizer, validateArtifactMap`

  ### Methods inherited from class opennlp.tools.util.BaseToolFactory

  `create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EmojiSentimentFactory

    public EmojiSentimentFactory()
    Instantiates a factory whose context generator adds emoji annotation features.

- ## Method Details

  - ### createContextGenerator

    public SentimentContextGenerator createContextGenerator()
    Creates a new `context generator`.

    Returns an `EmojiSentimentContextGenerator`.

    Overrides:
      `createContextGenerator` in class `SentimentFactory`
    Returns:
      a context generator for Sentiment Analysis