public class ToneAnalyzer extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT
The Constant CONTEXT.
|
static String |
HOPS
The Constant HOPS.
|
static String |
LIMIT
The Constant LIMIT.
|
static String |
SCORECARD
The Constant SCORECARD.
|
static String |
TEXT
The Constant TEXT.
|
static String |
TRAITS
The Constant TRAITS.
|
static String |
WORDS
The Constant WORDS.
|
FORWARD_SLASH| Constructor and Description |
|---|
ToneAnalyzer()
Instantiates a new Tone Analyzer service with the default url.
|
| Modifier and Type | Method and Description |
|---|---|
List<SynonymResult> |
getSynonyms(Map<String,Object> params)
Starts or continue conversations.
|
Tone |
getTone(String text)
Analyzes the "tone" of a piece of text using the default scorecard.
|
Tone |
getTone(String text,
Scorecard scorecard)
Analyzes the "tone" of a piece of text.
|
execute, executeRequest, executeWithoutResponse, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getHttpClient, getThreadSafeClient, setApiKey, setAuthentication, setEndPoint, setUsernameAndPassword, toStringpublic static final String HOPS
public static final String LIMIT
public static final String CONTEXT
public static final String TRAITS
public static final String WORDS
public static final String TEXT
public static final String SCORECARD
public ToneAnalyzer()
public Tone getTone(String text)
text - The text to analyzeTone with the responsepublic Tone getTone(String text, Scorecard scorecard)
text - The text to analyzescorecard - Name of the scorecard used to compute the tone. (business messages by
default)Tone with the responsepublic List<SynonymResult> getSynonyms(Map<String,Object> params)
params - The map with the parameters described aboveSynonymResultCopyright © 2015. All rights reserved.