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