public static class SentimentAspect.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SentimentAspect |
build() |
SentimentAspect.Builder |
copy(SentimentAspect model) |
SentimentAspect.Builder |
length(Integer length)
Length of aspect text.
|
SentimentAspect.Builder |
offset(Integer offset)
The number of Unicode code points preceding this entity in the submitted text.
|
SentimentAspect.Builder |
scores(Map<String,Double> scores)
Scores or confidences for each sentiment.
|
SentimentAspect.Builder |
sentiment(String sentiment)
The highest-score sentiment for the aspect text.
|
SentimentAspect.Builder |
text(String text)
Aspect text.
|
public SentimentAspect.Builder offset(Integer offset)
The number of Unicode code points preceding this entity in the submitted text.
offset
- the value to setpublic SentimentAspect.Builder length(Integer length)
Length of aspect text.
length
- the value to setpublic SentimentAspect.Builder text(String text)
Aspect text.
text
- the value to setpublic SentimentAspect.Builder sentiment(String sentiment)
The highest-score sentiment for the aspect text.
sentiment
- the value to setpublic SentimentAspect.Builder scores(Map<String,Double> scores)
Scores or confidences for each sentiment. Example: {"positive": 1.0, "negative":
0.0}
scores
- the value to setpublic SentimentAspect build()
public SentimentAspect.Builder copy(SentimentAspect model)
Copyright © 2016–2024. All rights reserved.