-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(discovery-v2): update models and add new methods
NEW methods: listDocuments, getDocument, listDocumentClassifiers, createDocumentClassifier, getDocumentClassifier, updateDocumentClassifier, deleteDocumentClassifier, listDocumentClassifierModels, createDocumentClassifierModels, getDocumentClassifierModels, updateDocumentClassifierModels, deleteDocumentClassifierModels, getStopwordList, createStopwordList, deleteStopwordList, listExpansions, createExpansions, deleteExpansions
- Loading branch information
Showing
43 changed files
with
3,834 additions
and
851 deletions.
There are no files selected for viewing
3,108 changes: 2,316 additions & 792 deletions
3,108
src/IBM.Watson.Discovery.v2/DiscoveryService.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/IBM.Watson.Discovery.v2/Model/ClassifierFederatedModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* (C) Copyright IBM Corp. 2022. | ||
* | ||
* 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 Newtonsoft.Json; | ||
|
||
namespace IBM.Watson.Discovery.v2.Model | ||
{ | ||
/// <summary> | ||
/// An object with details for creating federated document classifier models. | ||
/// </summary> | ||
public class ClassifierFederatedModel | ||
{ | ||
/// <summary> | ||
/// Name of the field that contains the values from which multiple classifier models are defined. For example, | ||
/// you can specify a field that lists product lines to create a separate model per product line. | ||
/// </summary> | ||
[JsonProperty("field", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Field { get; set; } | ||
} | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
src/IBM.Watson.Discovery.v2/Model/ClassifierModelEvaluation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* (C) Copyright IBM Corp. 2022. | ||
* | ||
* 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 System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace IBM.Watson.Discovery.v2.Model | ||
{ | ||
/// <summary> | ||
/// An object that contains information about a trained document classifier model. | ||
/// </summary> | ||
public class ClassifierModelEvaluation | ||
{ | ||
/// <summary> | ||
/// A micro-average aggregates the contributions of all classes to compute the average metric. Classes refers to | ||
/// the classification labels that are specified in the **answer_field**. | ||
/// </summary> | ||
[JsonProperty("micro_average", NullValueHandling = NullValueHandling.Ignore)] | ||
public ModelEvaluationMicroAverage MicroAverage { get; set; } | ||
/// <summary> | ||
/// A macro-average computes metric independently for each class and then takes the average. Class refers to the | ||
/// classification label that is specified in the **answer_field**. | ||
/// </summary> | ||
[JsonProperty("macro_average", NullValueHandling = NullValueHandling.Ignore)] | ||
public ModelEvaluationMacroAverage MacroAverage { get; set; } | ||
/// <summary> | ||
/// An array of evaluation metrics, one set of metrics for each class, where class refers to the classification | ||
/// label that is specified in the **answer_field**. | ||
/// </summary> | ||
[JsonProperty("per_class", NullValueHandling = NullValueHandling.Ignore)] | ||
public List<PerClassModelEvaluation> PerClass { get; set; } | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.