SentimentFactory (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.sentiment, class: SentimentFactory

Package opennlp.tools.sentiment

# Class SentimentFactory

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

public class SentimentFactory extends BaseToolFactory
Class for creating sentiment factories for training.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SentimentFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SentimentContextGenerator`
  `createContextGenerator()`
  Creates a new `context generator`.
  `opennlp.tools.tokenize.Tokenizer`
  `getTokenizer()`
  `void`
  `validateArtifactMap()`
  Validates the artifact map --> nothing to validate.

  ### 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

  - ### SentimentFactory

    public SentimentFactory()

- ## Method Details

  - ### validateArtifactMap

    public void validateArtifactMap() throws opennlp.tools.util.InvalidFormatException
    Validates the artifact map --> nothing to validate.
    Specified by:
      `validateArtifactMap` in class `BaseToolFactory`
    Throws:
      `opennlp.tools.util.InvalidFormatException` - Thrown if validation found invalid states.

  - ### createContextGenerator

    public SentimentContextGenerator createContextGenerator()
    Creates a new `context generator`.
    Returns:
      a context generator for Sentiment Analysis

  - ### getTokenizer

    public opennlp.tools.tokenize.Tokenizer getTokenizer()
    Returns:
      Retrieves the `Tokenizer`.