Class BasicSentimentRule

java.lang.Object
com.lexalytics.salience.BasicSentimentRule

public class BasicSentimentRule
extends java.lang.Object

A BasicSentimentRule represents a basic language sentiment rule.

A basic sentiment rule represents a user supplied change in sentiment to a given piece of text.

  • Constructor Summary

    Constructors 
    Constructor Description
    BasicSentimentRule​(java.lang.String sRuleID, java.lang.String sText, java.lang.String sSentiment)
    Creates a new basic sentiment rule.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getRuleID()
    The rule ID.
    java.lang.String getSentiment()
    The new sentiment.
    java.lang.String getText()
    The user supplied text in need of a sentiment change.

    Methods inherited from class java.lang.Object

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

    • BasicSentimentRule

      public BasicSentimentRule​(java.lang.String sRuleID, java.lang.String sText, java.lang.String sSentiment)
      Creates a new basic sentiment rule.
      Parameters:
      sRuleID - The rule ID.
      sText - The user supplied text in need of a sentiment change.
      sSentiment - The new sentiment.
  • Method Details

    • getText

      public java.lang.String getText()
      The user supplied text in need of a sentiment change.
      Returns:
      A String object with the user supplied text.
    • getSentiment

      public java.lang.String getSentiment()
      The new sentiment.
      Returns:
      A String ojbect with the new sentiment.
    • getRuleID

      public java.lang.String getRuleID()
      The rule ID.
      Returns:
      A String ojbect with the rule ID.