Class MotorSentiment

java.lang.Object
com.chatmotorapi.api.functional.MotorSentiment

public class MotorSentiment
extends Object
This class models the sentiment analysis results. It includes the overall sentiment, confidence scores across different sentiment categories, and the key phrases that significantly contributed to the sentiment determination.
Since:
1.2
  • Constructor Details

    • MotorSentiment

      public MotorSentiment()
  • Method Details

    • sentiment

      public SentimentType sentiment()
      Retrieves the overall sentiment result of the analysis.
      Returns:
      an enum representing the sentiment type (POSITIVE, NEGATIVE, NEUTRAL).
    • getConfidenceScores

      public MotorSentiment.ConfidenceScores getConfidenceScores()
      Retrieves the confidence scores for each sentiment category.
      Returns:
      An instance of MotorSentiment.ConfidenceScores containing the scores.
    • getKeyPhrases

      public List<String> getKeyPhrases()
      Retrieves the list of key phrases that contributed to the sentiment analysis.
      Returns:
      A list of strings, each representing a key phrase.
    • toString

      public String toString()
      Provides a string representation of the sentiment analysis result.
      Overrides:
      toString in class Object
      Returns:
      A string that summarizes the sentiment, confidence scores, and key phrases.