Package com.chatmotorapi.api.functional
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMotorSentiment.ConfidenceScoresInner class to encapsulate confidence scores for various sentiment categories. -
Constructor Summary
Constructors Constructor Description MotorSentiment() -
Method Summary
Modifier and Type Method Description MotorSentiment.ConfidenceScoresgetConfidenceScores()Retrieves the confidence scores for each sentiment category.List<String>getKeyPhrases()Retrieves the list of key phrases that contributed to the sentiment analysis.SentimentTypesentiment()Retrieves the overall sentiment result of the analysis.StringtoString()Provides a string representation of the sentiment analysis result.
-
Constructor Details
-
MotorSentiment
public MotorSentiment()
-
-
Method Details
-
sentiment
Retrieves the overall sentiment result of the analysis.- Returns:
- an enum representing the sentiment type (POSITIVE, NEGATIVE, NEUTRAL).
-
getConfidenceScores
Retrieves the confidence scores for each sentiment category.- Returns:
- An instance of
MotorSentiment.ConfidenceScorescontaining the scores.
-
getKeyPhrases
Retrieves the list of key phrases that contributed to the sentiment analysis.- Returns:
- A list of strings, each representing a key phrase.
-
toString
Provides a string representation of the sentiment analysis result.
-