Package com.oracle.bmc.ailanguage.model
Class SentimentSentence.Builder
- java.lang.Object
-
- com.oracle.bmc.ailanguage.model.SentimentSentence.Builder
-
- Enclosing class:
- SentimentSentence
public static class SentimentSentence.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SentimentSentencebuild()SentimentSentence.Buildercopy(SentimentSentence model)SentimentSentence.Builderlength(Integer length)Length of sentence text.SentimentSentence.Builderoffset(Integer offset)The number of Unicode code points preceding this entity in the submitted text.SentimentSentence.Builderscores(Map<String,Double> scores)Scores or confidences for each sentiment.SentimentSentence.Buildersentiment(String sentiment)The highest-score sentiment for the sentence text.SentimentSentence.Buildertext(String text)Sentence text.
-
-
-
Method Detail
-
offset
public SentimentSentence.Builder offset(Integer offset)
The number of Unicode code points preceding this entity in the submitted text.- Parameters:
offset- the value to set- Returns:
- this builder
-
length
public SentimentSentence.Builder length(Integer length)
Length of sentence text.- Parameters:
length- the value to set- Returns:
- this builder
-
text
public SentimentSentence.Builder text(String text)
Sentence text.- Parameters:
text- the value to set- Returns:
- this builder
-
sentiment
public SentimentSentence.Builder sentiment(String sentiment)
The highest-score sentiment for the sentence text.- Parameters:
sentiment- the value to set- Returns:
- this builder
-
scores
public SentimentSentence.Builder scores(Map<String,Double> scores)
Scores or confidences for each sentiment.Example: {“positive”: 1.0, “negative”: 0.0}
- Parameters:
scores- the value to set- Returns:
- this builder
-
build
public SentimentSentence build()
-
copy
public SentimentSentence.Builder copy(SentimentSentence model)
-
-