Class SentimentModelScores

java.lang.Object
com.lexalytics.salience.SentimentModelScores

public final class SentimentModelScores
extends java.lang.Object

The SentimentModelScores object is a member of the DocumentSentiment object and encapsulates model-based sentiment results.

  • Method Summary

    Modifier and Type Method Description
    double getMixedScore()
    Retrieve a likelihood score that the document content is mixed sentiment.
    java.lang.String getModelName()
    Retrieve the name of the model used to analyze the document for sentiment.
    int getMostLikelySentiment()
    Retrieve an integer value that provides an easy indication of the sentiment classification that achieved the highest score.
    double getNegativeScore()
    Retrieve a likelihood score that the document sentiment is negative.
    double getNeutralScore()
    Retrieve a likelihood score that the document content is neutral.
    double getPositiveScore()
    Retrieve a likelihood score that the document sentiment is positive.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getModelName

      public final java.lang.String getModelName()
      Retrieve the name of the model used to analyze the document for sentiment.
      Returns:
      A String containing the model name.
    • getMostLikelySentiment

      public final int getMostLikelySentiment()
      Retrieve an integer value that provides an easy indication of the sentiment classification that achieved the highest score. Can be used with the SentimentCategory enumeration.
      Returns:
      An integer indicating the most likely sentiment classification for the document.
    • getPositiveScore

      public final double getPositiveScore()
      Retrieve a likelihood score that the document sentiment is positive. The score will be between 0.0 and 1.0, with the sum of all scores being equal to 1.
      Returns:
      The degree of belief that the content is positive.
    • getNegativeScore

      public final double getNegativeScore()
      Retrieve a likelihood score that the document sentiment is negative. The score will be between 0.0 and 1.0, with the sum of all scores being equal to 1.
      Returns:
      The degree of belief that the content is negative.
    • getMixedScore

      public final double getMixedScore()
      Retrieve a likelihood score that the document content is mixed sentiment. The score will be between 0.0 and 1.0, with the sum of all scores being equal to 1.
      Returns:
      The degree of belief that the content is mixed sentiment.
    • getNeutralScore

      public final double getNeutralScore()
      Retrieve a likelihood score that the document content is neutral. The score will be between 0.0 and 1.0, with the sum of all scores being equal to 1.
      Returns:
      The degree of belief that the content is neutral.