Class: ToneAnalyzerV3

ToneAnalyzerV3

new ToneAnalyzerV3(options)

Tone Analyzer

Parameters:
Name Type Description
options Object
Source:

Methods

tone(params:)

Main API call. Returns the different tone dimensions of a text.

Parameters:
Name Type Description
params:

An object with a string 'text' element.

Additional arguments on params object are optional, they include:

  • tones: A Comma-separated list of tones. Only these will be computed in this API call. Allowed values are 'social', 'emotion', 'language'. It defaults to 'all of them'.
  • sentences: A boolean, telling if sentence-level analysis (which is slower than just document-level) needs to be computed. It defaults to true.
  • isHTML: A boolean value telling that the params.text argument is to be trated as HTML contents. On HTML input, the services does cleanup of tags and performs the analysis on the text contents only.
Source:
See:
  • the API docs for a the full documentation.
Returns:

upon success, the callback function is called with an object containing the different tones (emotion, writing and social) analyzed.

tone_chat(params, callback)

Parameters:
Name Type Description
params Object

The parameters to call the service

Properties
Name Type Attributes Description
utterances Object <optional>

The utterances to analyze. Utterances must be a JSON object.

callback

The callback.

Source: