Class SentimentAnalysisResult.Builder
- java.lang.Object
-
- com.assemblyai.api.resources.transcripts.types.SentimentAnalysisResult.Builder
-
- All Implemented Interfaces:
SentimentAnalysisResult._FinalStage,SentimentAnalysisResult.ConfidenceStage,SentimentAnalysisResult.EndStage,SentimentAnalysisResult.SentimentStage,SentimentAnalysisResult.StartStage,SentimentAnalysisResult.TextStage
- Enclosing class:
- SentimentAnalysisResult
public static final class SentimentAnalysisResult.Builder extends java.lang.Object implements SentimentAnalysisResult.TextStage, SentimentAnalysisResult.StartStage, SentimentAnalysisResult.EndStage, SentimentAnalysisResult.SentimentStage, SentimentAnalysisResult.ConfidenceStage, SentimentAnalysisResult._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SentimentAnalysisResultbuild()SentimentAnalysisResult._FinalStageconfidence(double confidence)The confidence score for the detected sentiment of the sentence, from 0 to 1SentimentAnalysisResult.SentimentStageend(int end)The ending time, in milliseconds, of the sentenceSentimentAnalysisResult.Builderfrom(SentimentAnalysisResult other)SentimentAnalysisResult.ConfidenceStagesentiment(Sentiment sentiment)The detected sentiment for the sentence, one of POSITIVE, NEUTRAL, NEGATIVESentimentAnalysisResult._FinalStagespeaker(java.lang.String speaker)The speaker of the sentence if Speaker Diarization is enabled, else nullSentimentAnalysisResult._FinalStagespeaker(java.util.Optional<java.lang.String> speaker)SentimentAnalysisResult.EndStagestart(int start)The starting time, in milliseconds, of the sentenceSentimentAnalysisResult.StartStagetext(java.lang.String text)The transcript of the sentence
-
-
-
Method Detail
-
from
public SentimentAnalysisResult.Builder from(SentimentAnalysisResult other)
- Specified by:
fromin interfaceSentimentAnalysisResult.TextStage
-
text
public SentimentAnalysisResult.StartStage text(java.lang.String text)
The transcript of the sentence
- Specified by:
textin interfaceSentimentAnalysisResult.TextStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
start
public SentimentAnalysisResult.EndStage start(int start)
The starting time, in milliseconds, of the sentence
- Specified by:
startin interfaceSentimentAnalysisResult.StartStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
end
public SentimentAnalysisResult.SentimentStage end(int end)
The ending time, in milliseconds, of the sentence
- Specified by:
endin interfaceSentimentAnalysisResult.EndStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sentiment
public SentimentAnalysisResult.ConfidenceStage sentiment(Sentiment sentiment)
The detected sentiment for the sentence, one of POSITIVE, NEUTRAL, NEGATIVE
- Specified by:
sentimentin interfaceSentimentAnalysisResult.SentimentStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
confidence
public SentimentAnalysisResult._FinalStage confidence(double confidence)
The confidence score for the detected sentiment of the sentence, from 0 to 1
- Specified by:
confidencein interfaceSentimentAnalysisResult.ConfidenceStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
speaker
public SentimentAnalysisResult._FinalStage speaker(java.lang.String speaker)
The speaker of the sentence if Speaker Diarization is enabled, else null
- Specified by:
speakerin interfaceSentimentAnalysisResult._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
speaker
public SentimentAnalysisResult._FinalStage speaker(java.util.Optional<java.lang.String> speaker)
- Specified by:
speakerin interfaceSentimentAnalysisResult._FinalStage
-
build
public SentimentAnalysisResult build()
- Specified by:
buildin interfaceSentimentAnalysisResult._FinalStage
-
-