public static class SentimentDocumentResult.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SentimentDocumentResult.Builder |
aspects(List<SentimentAspect> aspects)
List of detected aspects sentiment.
|
SentimentDocumentResult |
build() |
SentimentDocumentResult.Builder |
copy(SentimentDocumentResult model) |
SentimentDocumentResult.Builder |
documentScores(Map<String,Double> documentScores)
Scores for each sentiment.
|
SentimentDocumentResult.Builder |
documentSentiment(String documentSentiment)
Document level sentiment.
|
SentimentDocumentResult.Builder |
key(String key)
Document unique identifier defined by the user.
|
SentimentDocumentResult.Builder |
languageCode(String languageCode)
Language code supported Automatically detect language - auto Arabic - ar Brazilian
Portuguese - pt-BR Czech - cs Danish - da Dutch - nl English - en Finnish - fi French -
fr Canadian French - fr-CA German - de Italian - it Japanese - ja Korean - ko Norwegian -
no Polish - pl Romanian - ro Simplified Chinese - zh-CN Spanish - es Swedish - sv
Traditional Chinese - zh-TW Turkish - tr Greek - el Hebrew - he
|
SentimentDocumentResult.Builder |
sentences(List<SentimentSentence> sentences)
List of detected sentences sentiment.
|
public SentimentDocumentResult.Builder key(String key)
Document unique identifier defined by the user.
key
- the value to setpublic SentimentDocumentResult.Builder documentSentiment(String documentSentiment)
Document level sentiment.
documentSentiment
- the value to setpublic SentimentDocumentResult.Builder documentScores(Map<String,Double> documentScores)
Scores for each sentiment. Example: {“positive”: 1.0, “negative”: 0.0}
documentScores
- the value to setpublic SentimentDocumentResult.Builder aspects(List<SentimentAspect> aspects)
List of detected aspects sentiment.
aspects
- the value to setpublic SentimentDocumentResult.Builder sentences(List<SentimentSentence> sentences)
List of detected sentences sentiment.
sentences
- the value to setpublic SentimentDocumentResult.Builder languageCode(String languageCode)
Language code supported Automatically detect language - auto Arabic - ar Brazilian Portuguese - pt-BR Czech - cs Danish - da Dutch - nl English - en Finnish - fi French - fr Canadian French - fr-CA German - de Italian - it Japanese - ja Korean - ko Norwegian - no Polish - pl Romanian - ro Simplified Chinese - zh-CN Spanish - es Swedish - sv Traditional Chinese - zh-TW Turkish - tr Greek - el Hebrew - he
languageCode
- the value to setpublic SentimentDocumentResult build()
public SentimentDocumentResult.Builder copy(SentimentDocumentResult model)
Copyright © 2016–2023. All rights reserved.