20
20
perceived and then to improve the tone of your communications. Businesses can use the
21
21
service to learn the tone of their customers' communications and to respond to each
22
22
customer appropriately, or to understand and improve their customer conversations.
23
- **Note:** Request logging is disabled for the Tone Analyzer service. The service neither
24
- logs nor retains data from requests and responses, regardless of whether the
25
- `X-Watson-Learning-Opt-Out` request header is set .
23
+ **Note:** Request logging is disabled for the Tone Analyzer service. Regardless of whether
24
+ you set the `X-Watson-Learning-Opt-Out` request header, the service does not log or retain
25
+ data from requests and responses .
26
26
"""
27
27
28
28
from __future__ import absolute_import
@@ -111,7 +111,7 @@ def __init__(
111
111
112
112
def tone (self ,
113
113
tone_input ,
114
- content_type ,
114
+ content_type = None ,
115
115
sentences = None ,
116
116
tones = None ,
117
117
content_language = None ,
@@ -136,7 +136,7 @@ def tone(self,
136
136
text/plain;charset=utf-8`. For `text/html`, the service removes HTML tags and
137
137
analyzes only the textual content.
138
138
**See also:** [Using the general-purpose
139
- endpoint](https://console.bluemix.net /docs/services/tone-analyzer/using-tone.html#using-the-general-purpose-endpoint).
139
+ endpoint](/docs/services/tone-analyzer/using-tone.html#using-the-general-purpose-endpoint).
140
140
141
141
:param ToneInput tone_input: JSON, plain text, or HTML input that contains the
142
142
content to be analyzed. For JSON input, provide an object of type `ToneInput`.
@@ -171,8 +171,6 @@ def tone(self,
171
171
172
172
if tone_input is None :
173
173
raise ValueError ('tone_input must be provided' )
174
- if content_type is None :
175
- raise ValueError ('content_type must be provided' )
176
174
if isinstance (tone_input , ToneInput ):
177
175
tone_input = self ._convert_model (tone_input , ToneInput )
178
176
@@ -224,7 +222,7 @@ def tone_chat(self,
224
222
utterances have more than 500 characters. Per the JSON specification, the default
225
223
character encoding for JSON content is effectively always UTF-8.
226
224
**See also:** [Using the customer-engagement
227
- endpoint](https://console.bluemix.net /docs/services/tone-analyzer/using-tone-chat.html#using-the-customer-engagement-endpoint).
225
+ endpoint](/docs/services/tone-analyzer/using-tone-chat.html#using-the-customer-engagement-endpoint).
228
226
229
227
:param list[Utterance] utterances: An array of `Utterance` objects that provides
230
228
the input content that the service is to analyze.
@@ -277,7 +275,8 @@ def tone_chat(self,
277
275
278
276
class DocumentAnalysis (object ):
279
277
"""
280
- DocumentAnalysis.
278
+ An object of type `DocumentAnalysis` that provides the results of the analysis for the
279
+ full input document.
281
280
282
281
:attr list[ToneScore] tones: (optional) **`2017-09-21`:** An array of `ToneScore`
283
282
objects that provides the results of the analysis for each qualifying tone of the
0 commit comments