Skip to content

Updated ToneAnalyzer data models #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/ServiceExamples/Scripts/ExampleToneAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private IEnumerator Examples()
Log.Debug("ExampleToneAnalyzer.Examples()", "Tone analyzer examples complete.");
}

private void OnGetToneAnalyze(ToneAnalyzerResponse resp, Dictionary<string, object> customData)
private void OnGetToneAnalyze(ToneAnalysis resp, Dictionary<string, object> customData)
{
Log.Debug("ExampleToneAnalyzer.OnGetToneAnalyze()", "{0}", customData["json"].ToString());
_analyzeToneTested = true;
Expand Down
260 changes: 0 additions & 260 deletions Scripts/Services/ToneAnalyzer/v3/DataModels.cs

This file was deleted.

8 changes: 8 additions & 0 deletions Scripts/Services/ToneAnalyzer/v3/Model.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions Scripts/Services/ToneAnalyzer/v3/Model/DocumentAnalysis.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Copyright 2018 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

using FullSerializer;
using System.Collections.Generic;

namespace IBM.Watson.DeveloperCloud.Services.ToneAnalyzer.v3
{
/// <summary>
/// DocumentAnalysis.
/// </summary>
public class DocumentAnalysis
{
/// <summary>
/// **`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.
/// </summary>
/// <value>
/// **`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.
/// </value>
[fsProperty("tones")]
public List<ToneScore> Tones { get; set; }
/// <summary>
/// **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` objects that provides the
/// results of the tone analysis for the full document of the input content. The service returns results only
/// for the tones specified with the `tones` parameter of the request.
/// </summary>
/// <value>
/// **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` objects that provides the
/// results of the tone analysis for the full document of the input content. The service returns results only
/// for the tones specified with the `tones` parameter of the request.
/// </value>
[fsProperty("tone_categories")]
public List<ToneCategory> ToneCategories { get; set; }
/// <summary>
/// **`2017-09-21`:** A warning message if the overall content exceeds 128 KB or contains more than 1000
/// sentences. The service analyzes only the first 1000 sentences for document-level analysis and the first 100
/// sentences for sentence-level analysis. **`2016-05-19`:** Not returned.
/// </summary>
/// <value>
/// **`2017-09-21`:** A warning message if the overall content exceeds 128 KB or contains more than 1000
/// sentences. The service analyzes only the first 1000 sentences for document-level analysis and the first 100
/// sentences for sentence-level analysis. **`2016-05-19`:** Not returned.
/// </value>
[fsProperty("warning")]
public string Warning { get; set; }
}

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading