Package com.oracle.bmc.ailanguage.model
Class SentimentAspect.Builder
- java.lang.Object
-
- com.oracle.bmc.ailanguage.model.SentimentAspect.Builder
-
- Enclosing class:
- SentimentAspect
public static class SentimentAspect.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SentimentAspectbuild()SentimentAspect.Buildercopy(SentimentAspect model)SentimentAspect.Builderlength(Integer length)Length of aspect text.SentimentAspect.Builderoffset(Integer offset)The number of Unicode code points preceding this entity in the submitted text.SentimentAspect.Builderscores(Map<String,Double> scores)Scores or confidences for each sentiment.SentimentAspect.Buildersentiment(String sentiment)The highest-score sentiment for the aspect text.SentimentAspect.Buildertext(String text)Aspect text.
-
-
-
Method Detail
-
offset
public SentimentAspect.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 SentimentAspect.Builder length(Integer length)
Length of aspect text.- Parameters:
length- the value to set- Returns:
- this builder
-
text
public SentimentAspect.Builder text(String text)
Aspect text.- Parameters:
text- the value to set- Returns:
- this builder
-
sentiment
public SentimentAspect.Builder sentiment(String sentiment)
The highest-score sentiment for the aspect text.- Parameters:
sentiment- the value to set- Returns:
- this builder
-
scores
public SentimentAspect.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 SentimentAspect build()
-
copy
public SentimentAspect.Builder copy(SentimentAspect model)
-
-