Skip to content

Commit 3172384

Browse files
fix(discov2,nlu): fix previously breaking changes
1 parent 087faf6 commit 3172384

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Sources/DiscoveryV2/Discovery.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,7 @@ public class Discovery {
18801880
projectID: String,
18811881
enrichment: CreateEnrichment,
18821882
file: Data? = nil,
1883+
fileContentType: String,
18831884
headers: [String: String]? = nil,
18841885
completionHandler: @escaping (WatsonResponse<Enrichment>?, WatsonError?) -> Void)
18851886
{

Sources/NaturalLanguageUnderstandingV1/Models/Features.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ import IBMSwiftSDKCore
2222
*/
2323
public struct Features: Codable, Equatable {
2424

25-
/**
26-
Returns a five-level taxonomy of the content. The top three categories are returned.
27-
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
28-
*/
29-
public var categories: CategoriesOptions?
30-
3125
/**
3226
Returns text classifications for the content.
3327
Supported languages: English only.
@@ -98,14 +92,19 @@ public struct Features: Codable, Equatable {
9892
*/
9993
public var summarization: SummarizationOptions?
10094

95+
/**
96+
Returns a five-level taxonomy of the content. The top three categories are returned.
97+
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
98+
*/
99+
public var categories: CategoriesOptions?
100+
101101
/**
102102
Returns tokens and sentences from the input text.
103103
*/
104104
public var syntax: SyntaxOptions?
105105

106106
// Map each property name to the key that shall be used for encoding/decoding.
107107
private enum CodingKeys: String, CodingKey {
108-
case categories = "categories"
109108
case classifications = "classifications"
110109
case concepts = "concepts"
111110
case emotion = "emotion"
@@ -116,14 +115,13 @@ public struct Features: Codable, Equatable {
116115
case semanticRoles = "semantic_roles"
117116
case sentiment = "sentiment"
118117
case summarization = "summarization"
118+
case categories = "categories"
119119
case syntax = "syntax"
120120
}
121121

122122
/**
123123
Initialize a `Features` with member variables.
124124

125-
- parameter categories: Returns a five-level taxonomy of the content. The top three categories are returned.
126-
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
127125
- parameter classifications: Returns text classifications for the content.
128126
Supported languages: English only.
129127
- parameter concepts: Returns high-level concepts in the content. For example, a research paper about deep
@@ -156,12 +154,13 @@ public struct Features: Codable, Equatable {
156154
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish.
157155
- parameter summarization: (Experimental) Returns a summary of content.
158156
Supported languages: English only.
157+
- parameter categories: Returns a five-level taxonomy of the content. The top three categories are returned.
158+
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
159159
- parameter syntax: Returns tokens and sentences from the input text.
160160

161161
- returns: An initialized `Features`.
162162
*/
163163
public init(
164-
categories: CategoriesOptions? = nil,
165164
classifications: ClassificationsOptions? = nil,
166165
concepts: ConceptsOptions? = nil,
167166
emotion: EmotionOptions? = nil,
@@ -172,10 +171,10 @@ public struct Features: Codable, Equatable {
172171
semanticRoles: SemanticRolesOptions? = nil,
173172
sentiment: SentimentOptions? = nil,
174173
summarization: SummarizationOptions? = nil,
174+
categories: CategoriesOptions? = nil,
175175
syntax: SyntaxOptions? = nil
176176
)
177177
{
178-
self.categories = categories
179178
self.classifications = classifications
180179
self.concepts = concepts
181180
self.emotion = emotion
@@ -186,6 +185,7 @@ public struct Features: Codable, Equatable {
186185
self.semanticRoles = semanticRoles
187186
self.sentiment = sentiment
188187
self.summarization = summarization
188+
self.categories = categories
189189
self.syntax = syntax
190190
}
191191

0 commit comments

Comments
 (0)