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

Package opennlp.tools.sentiment

# Class SentimentSample

java.lang.Object
opennlp.tools.sentiment.SentimentSample

All Implemented Interfaces:
  `Serializable`, `Sample`

public class SentimentSample extends Object implements Sample
Class for holding text used for sentiment analysis.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SentimentSample(String sentiment, String[] sentence)`
  Instantiates a `SentimentSample` object.
  `SentimentSample(String sentiment, String[] sentence, boolean clearAdaptiveData)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String[]`
  `getSentence()`
  `String`
  `getSentiment()`
  `int`
  `hashCode()`
  `boolean`
  `isClearAdaptiveDataSet()`
  `String`
  `toString()`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SentimentSample

    public SentimentSample(String sentiment, String[] sentence)
    Instantiates a `SentimentSample` object.
    Parameters:
      `sentiment` - training sentiment
      `sentence` - training sentence

  - ### SentimentSample

    public SentimentSample(String sentiment, String[] sentence, boolean clearAdaptiveData)

- ## Method Details

  - ### getSentiment

    public String getSentiment()
    Returns:
      Returns the sentiment.

  - ### getSentence

    public String[] getSentence()
    Returns:
      Returns the sentence.

  - ### isClearAdaptiveDataSet

    public boolean isClearAdaptiveDataSet()
    Returns:
      Returns the value of isClearAdaptiveData, `true` or `false`.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`