Skip to content

Commit 69efd84

Browse files
committed
regenerate tone analyzer
1 parent e32ebff commit 69efd84

File tree

15 files changed

+119
-90
lines changed

15 files changed

+119
-90
lines changed

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
<ItemGroup>
2323
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
2424
</ItemGroup>
25+
2526
</Project>

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/IToneAnalyzerService.cs

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,28 @@
2020

2121
namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3
2222
{
23-
public interface IToneAnalyzerService
23+
public partial interface IToneAnalyzerService
2424
{
25-
ToneAnalysis Tone(ToneInput toneInput, string contentType, bool? sentences = null, List<string> tones = null, string contentLanguage = null, string acceptLanguage = null);
26-
27-
UtteranceAnalyses ToneChat(ToneChatInput utterances, string contentLanguage = null, string acceptLanguage = null);
25+
/// <summary>
26+
/// Analyze general tone. Use the general purpose endpoint to analyze the tone of your input content. The service analyzes the content for emotional and language tones. The method always analyzes the tone of the full document; by default, it also analyzes the tone of each individual sentence of the content. You can submit no more than 128 KB of total input content and no more than 1000 individual sentences in JSON, plain text, or HTML format. The service analyzes the first 1000 sentences for document-level analysis and only the first 100 sentences for sentence-level analysis. Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8; per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII character set). When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character encoding of the input text; for example: `Content-Type: text/plain;charset=utf-8`. For `text/html`, the service removes HTML tags and analyzes only the textual content.
27+
/// </summary>
28+
/// <param name="toneInput">JSON, plain text, or HTML input that contains the content to be analyzed. For JSON input, provide an object of type `ToneInput`.</param>
29+
/// <param name="contentType">The type of the input: application/json, text/plain, or text/html. A character encoding can be specified by including a `charset` parameter. For example, 'text/plain;charset=utf-8'.</param>
30+
/// <param name="sentences">Indicates whether the service is to return an analysis of each individual sentence in addition to its analysis of the full document. If `true` (the default), the service returns results for each sentence. (optional, default to true)</param>
31+
/// <param name="tones">**`2017-09-21`:** Deprecated. The service continues to accept the parameter for backward-compatibility, but the parameter no longer affects the response. **`2016-05-19`:** A comma-separated list of tones for which the service is to return its analysis of the input; the indicated tones apply both to the full document and to individual sentences of the document. You can specify one or more of the valid values. Omit the parameter to request results for all three tones. (optional)</param>
32+
/// <param name="contentLanguage">The language of the input text for the request: English or French. Regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input content must match the specified language. Do not submit content that contains both languages. You can use different languages for **Content-Language** and **Accept-Language**. * **`2017-09-21`:** Accepts `en` or `fr`. * **`2016-05-19`:** Accepts only `en`. (optional, default to en)</param>
33+
/// <param name="acceptLanguage">The desired language of the response. For two-character arguments, regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use different languages for **Content-Language** and **Accept-Language**. (optional, default to en)</param>
34+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
35+
/// <returns><see cref="ToneAnalysis" />ToneAnalysis</returns>
36+
ToneAnalysis Tone(ToneInput toneInput, string contentType, bool? sentences = null, List<string> tones = null, string contentLanguage = null, string acceptLanguage = null, Dictionary<string, object> customData = null);
37+
/// <summary>
38+
/// Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer support conversations. For each utterance of a conversation, the method reports the most prevalent subset of the following seven tones: sad, frustrated, satisfied, excited, polite, impolite, and sympathetic. If you submit more than 50 utterances, the service returns a warning for the overall content and analyzes only the first 50 utterances. If you submit a single utterance that contains more than 500 characters, the service returns an error for that utterance and does not analyze the utterance. The request fails if all utterances have more than 500 characters. Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8.
39+
/// </summary>
40+
/// <param name="utterances">An object that contains the content to be analyzed.</param>
41+
/// <param name="contentLanguage">The language of the input text for the request: English or French. Regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input content must match the specified language. Do not submit content that contains both languages. You can use different languages for **Content-Language** and **Accept-Language**. * **`2017-09-21`:** Accepts `en` or `fr`. * **`2016-05-19`:** Accepts only `en`. (optional, default to en)</param>
42+
/// <param name="acceptLanguage">The desired language of the response. For two-character arguments, regional variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use different languages for **Content-Language** and **Accept-Language**. (optional, default to en)</param>
43+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
44+
/// <returns><see cref="UtteranceAnalyses" />UtteranceAnalyses</returns>
45+
UtteranceAnalyses ToneChat(ToneChatInput utterances, string contentLanguage = null, string acceptLanguage = null, Dictionary<string, object> customData = null);
2846
}
2947
}

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/DocumentAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2323
/// <summary>
2424
/// DocumentAnalysis.
2525
/// </summary>
26-
public class DocumentAnalysis
26+
public class DocumentAnalysis : BaseModel
2727
{
2828
/// <summary>
2929
/// **`2017-09-21`:** An array of `ToneScore` objects that provides the results of the analysis for each qualifying tone of the document. The array includes results for any tone whose score is at least 0.5. The array is empty if no tone has a score that meets this threshold. **`2016-05-19`:** Not returned.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/SentenceAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2323
/// <summary>
2424
/// SentenceAnalysis.
2525
/// </summary>
26-
public class SentenceAnalysis
26+
public class SentenceAnalysis : BaseModel
2727
{
2828
/// <summary>
2929
/// The unique identifier of a sentence of the input content. The first sentence has ID 0, and the ID of each subsequent sentence is incremented by one.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2323
/// <summary>
2424
/// ToneAnalysis.
2525
/// </summary>
26-
public class ToneAnalysis
26+
public class ToneAnalysis : BaseModel
2727
{
2828
/// <summary>
2929
/// An object of type `DocumentAnalysis` that provides the results of the analysis for the full input document.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneCategory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2323
/// <summary>
2424
/// ToneCategory.
2525
/// </summary>
26-
public class ToneCategory
26+
public class ToneCategory : BaseModel
2727
{
2828
/// <summary>
2929
/// An array of `ToneScore` objects that provides the results for the tones of the category.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneChatInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2323
/// <summary>
2424
/// ToneChatInput.
2525
/// </summary>
26-
public class ToneChatInput
26+
public class ToneChatInput : BaseModel
2727
{
2828
/// <summary>
2929
/// An array of `Utterance` objects that provides the input content that the service is to analyze.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneChatScore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2222
/// <summary>
2323
/// ToneChatScore.
2424
/// </summary>
25-
public class ToneChatScore
25+
public class ToneChatScore : BaseModel
2626
{
2727
/// <summary>
2828
/// The score for the tone in the range of 0.5 to 1. A score greater than 0.75 indicates a high likelihood that the tone is perceived in the utterance.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2222
/// <summary>
2323
/// ToneInput.
2424
/// </summary>
25-
public class ToneInput
25+
public class ToneInput : BaseModel
2626
{
2727
/// <summary>
2828
/// The input content that the service is to analyze.

src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3/Model/ToneScore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.WatsonDeveloperCloud.ToneAnalyzer.v3.Model
2222
/// <summary>
2323
/// ToneScore.
2424
/// </summary>
25-
public class ToneScore
25+
public class ToneScore : BaseModel
2626
{
2727
/// <summary>
2828
/// The score for the tone. * **`2017-09-21`:** The score that is returned lies in the range of 0.5 to 1. A score greater than 0.75 indicates a high likelihood that the tone is perceived in the content. * **`2016-05-19`:** The score that is returned lies in the range of 0 to 1. A score less than 0.5 indicates that the tone is unlikely to be perceived in the content; a score greater than 0.75 indicates a high likelihood that the tone is perceived.

0 commit comments

Comments
 (0)