diff --git a/Source/DiscoveryV1/Models/NluEnrichmentConcepts.swift b/Source/DiscoveryV1/Models/NluEnrichmentConcepts.swift new file mode 100644 index 000000000..07740473a --- /dev/null +++ b/Source/DiscoveryV1/Models/NluEnrichmentConcepts.swift @@ -0,0 +1,49 @@ +/** + * Copyright IBM Corporation 2018 + * + * 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. + **/ + +import Foundation + +/** + An object specifiying the concepts enrichment and related parameters. + */ +public struct NluEnrichmentConcepts: Codable, Equatable { + + /** + The maximum number of concepts enrichments to extact from each instance of the specified field. + */ + public var limit: Int? + + // Map each property name to the key that shall be used for encoding/decoding. + private enum CodingKeys: String, CodingKey { + case limit = "limit" + } + + /** + Initialize a `NluEnrichmentConcepts` with member variables. + + - parameter limit: The maximum number of concepts enrichments to extact from each instance of the specified + field. + + - returns: An initialized `NluEnrichmentConcepts`. + */ + public init( + limit: Int? = nil + ) + { + self.limit = limit + } + +} diff --git a/Source/DiscoveryV1/Models/NluEnrichmentFeatures.swift b/Source/DiscoveryV1/Models/NluEnrichmentFeatures.swift index de549e2da..76991d9c2 100644 --- a/Source/DiscoveryV1/Models/NluEnrichmentFeatures.swift +++ b/Source/DiscoveryV1/Models/NluEnrichmentFeatures.swift @@ -54,6 +54,11 @@ public struct NluEnrichmentFeatures: Codable, Equatable { */ public var relations: NluEnrichmentRelations? + /** + An object specifiying the concepts enrichment and related parameters. + */ + public var concepts: NluEnrichmentConcepts? + // Map each property name to the key that shall be used for encoding/decoding. private enum CodingKeys: String, CodingKey { case keywords = "keywords" @@ -63,6 +68,7 @@ public struct NluEnrichmentFeatures: Codable, Equatable { case categories = "categories" case semanticRoles = "semantic_roles" case relations = "relations" + case concepts = "concepts" } /** @@ -76,6 +82,7 @@ public struct NluEnrichmentFeatures: Codable, Equatable { field. - parameter semanticRoles: An object specifiying the semantic roles enrichment and related parameters. - parameter relations: An object specifying the relations enrichment and related parameters. + - parameter concepts: An object specifiying the concepts enrichment and related parameters. - returns: An initialized `NluEnrichmentFeatures`. */ @@ -86,7 +93,8 @@ public struct NluEnrichmentFeatures: Codable, Equatable { emotion: NluEnrichmentEmotion? = nil, categories: NluEnrichmentCategories? = nil, semanticRoles: NluEnrichmentSemanticRoles? = nil, - relations: NluEnrichmentRelations? = nil + relations: NluEnrichmentRelations? = nil, + concepts: NluEnrichmentConcepts? = nil ) { self.keywords = keywords @@ -96,6 +104,7 @@ public struct NluEnrichmentFeatures: Codable, Equatable { self.categories = categories self.semanticRoles = semanticRoles self.relations = relations + self.concepts = concepts } } diff --git a/WatsonDeveloperCloud.xcodeproj/project.pbxproj b/WatsonDeveloperCloud.xcodeproj/project.pbxproj index 100a2e184..05cfceb13 100644 --- a/WatsonDeveloperCloud.xcodeproj/project.pbxproj +++ b/WatsonDeveloperCloud.xcodeproj/project.pbxproj @@ -1725,6 +1725,7 @@ 928204C62124BC200013315B /* LogQueryResponseResult.swift */, 928204C02124BC1E0013315B /* LogQueryResponseResultDocuments.swift */, 928204C12124BC1E0013315B /* LogQueryResponseResultDocumentsResult.swift */, + 926FAD6321BB3B2D00033989 /* MemoryUsage.swift */, 928204C42124BC1F0013315B /* MetricAggregation.swift */, 928204BB2124BC1C0013315B /* MetricAggregationResult.swift */, 928204C22124BC1F0013315B /* MetricResponse.swift */, @@ -1734,6 +1735,7 @@ 683955002077E612009E1C8A /* Nested.swift */, 68AF8EC1206968CC00D552E3 /* NewTrainingQuery.swift */, 68AF8EFA206968CC00D552E3 /* NluEnrichmentCategories.swift */, + 926FAD6121BB3B2C00033989 /* NluEnrichmentConcepts.swift */, 68AF8EB7206968CC00D552E3 /* NluEnrichmentEmotion.swift */, 68AF8EDE206968CC00D552E3 /* NluEnrichmentEntities.swift */, 68AF8EB8206968CC00D552E3 /* NluEnrichmentFeatures.swift */,