watson_developer_cloud.tone_analyzer_v3 module¶
The IBM Watson Tone Analyzer Service uses linguistic analysis to detect three types of tones from written text: emotions, social tendencies, and language style. Emotions identified include things like anger, cheerfulness and sadness. Identified social tendencies include things from the Big Five personality traits used by some psychologists. These include openness, conscientiousness, extraversion, agreeableness, and neuroticism. Identified language styles include things like confident, analytical, and tentative. Input email and other written media into the Tone Analyzer service, and use the results to determine if your writing comes across with the tone, personality traits, and writing style that you want for your intended audience.
-
class
ToneAnalyzerV3
(version, url='https://gateway.watsonplatform.net/tone-analyzer/api', **kwargs)[source]¶ Bases:
watson_developer_cloud.watson_developer_cloud_service.WatsonDeveloperCloudService
Client for the ToneAnalyzer service.
-
default_url
= 'https://gateway.watsonplatform.net/tone-analyzer/api'¶
-
latest_version
= '2016-05-19'¶
-
tone
(text, tones=None, sentences=None, content_type='text/plain')[source]¶ The general purpose tone API analyzes the “tone” of input text. The message is analyzed for several tones (social, emotional, and writing), with various characteristics derived for each tone. :param text: The input content to analyze. :param sentences: If false, sentence-level analysis is omitted; by default (or if true), each sentence is analyzed. :param tones: A comma-separated list of one or more of the following tones for which to analyze the input text, ‘social’, ‘language’, and ‘emotion’; the default is all tones. :param content_type: The type of the input content: “text/plain” (the default), “text/html”, or “application/json”.
-