1
1
# -*- coding: utf-8 -*-
2
- # (C) Copyright IBM Corp. 2019, 2021.
2
+ # (C) Copyright IBM Corp. 2021.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -74,12 +74,6 @@ def test_analyze_all_params(self):
74
74
content_type = 'application/json' ,
75
75
status = 200 )
76
76
77
- # Construct a dict representation of a CategoriesOptions model
78
- categories_options_model = {}
79
- categories_options_model ['explanation' ] = True
80
- categories_options_model ['limit' ] = 10
81
- categories_options_model ['model' ] = 'testString'
82
-
83
77
# Construct a dict representation of a ClassificationsOptions model
84
78
classifications_options_model = {}
85
79
classifications_options_model ['model' ] = 'testString'
@@ -130,6 +124,12 @@ def test_analyze_all_params(self):
130
124
summarization_options_model = {}
131
125
summarization_options_model ['limit' ] = 10
132
126
127
+ # Construct a dict representation of a CategoriesOptions model
128
+ categories_options_model = {}
129
+ categories_options_model ['explanation' ] = True
130
+ categories_options_model ['limit' ] = 10
131
+ categories_options_model ['model' ] = 'testString'
132
+
133
133
# Construct a dict representation of a SyntaxOptionsTokens model
134
134
syntax_options_tokens_model = {}
135
135
syntax_options_tokens_model ['lemma' ] = True
@@ -142,7 +142,6 @@ def test_analyze_all_params(self):
142
142
143
143
# Construct a dict representation of a Features model
144
144
features_model = {}
145
- features_model ['categories' ] = categories_options_model
146
145
features_model ['classifications' ] = classifications_options_model
147
146
features_model ['concepts' ] = concepts_options_model
148
147
features_model ['emotion' ] = emotion_options_model
@@ -153,6 +152,7 @@ def test_analyze_all_params(self):
153
152
features_model ['semantic_roles' ] = semantic_roles_options_model
154
153
features_model ['sentiment' ] = sentiment_options_model
155
154
features_model ['summarization' ] = summarization_options_model
155
+ features_model ['categories' ] = categories_options_model
156
156
features_model ['syntax' ] = syntax_options_model
157
157
158
158
# Set up parameter values
@@ -213,12 +213,6 @@ def test_analyze_value_error(self):
213
213
content_type = 'application/json' ,
214
214
status = 200 )
215
215
216
- # Construct a dict representation of a CategoriesOptions model
217
- categories_options_model = {}
218
- categories_options_model ['explanation' ] = True
219
- categories_options_model ['limit' ] = 10
220
- categories_options_model ['model' ] = 'testString'
221
-
222
216
# Construct a dict representation of a ClassificationsOptions model
223
217
classifications_options_model = {}
224
218
classifications_options_model ['model' ] = 'testString'
@@ -269,6 +263,12 @@ def test_analyze_value_error(self):
269
263
summarization_options_model = {}
270
264
summarization_options_model ['limit' ] = 10
271
265
266
+ # Construct a dict representation of a CategoriesOptions model
267
+ categories_options_model = {}
268
+ categories_options_model ['explanation' ] = True
269
+ categories_options_model ['limit' ] = 10
270
+ categories_options_model ['model' ] = 'testString'
271
+
272
272
# Construct a dict representation of a SyntaxOptionsTokens model
273
273
syntax_options_tokens_model = {}
274
274
syntax_options_tokens_model ['lemma' ] = True
@@ -281,7 +281,6 @@ def test_analyze_value_error(self):
281
281
282
282
# Construct a dict representation of a Features model
283
283
features_model = {}
284
- features_model ['categories' ] = categories_options_model
285
284
features_model ['classifications' ] = classifications_options_model
286
285
features_model ['concepts' ] = concepts_options_model
287
286
features_model ['emotion' ] = emotion_options_model
@@ -292,6 +291,7 @@ def test_analyze_value_error(self):
292
291
features_model ['semantic_roles' ] = semantic_roles_options_model
293
292
features_model ['sentiment' ] = sentiment_options_model
294
293
features_model ['summarization' ] = summarization_options_model
294
+ features_model ['categories' ] = categories_options_model
295
295
features_model ['syntax' ] = syntax_options_model
296
296
297
297
# Set up parameter values
@@ -2922,11 +2922,6 @@ def test_features_serialization(self):
2922
2922
2923
2923
# Construct dict forms of any model objects needed in order to build this model.
2924
2924
2925
- categories_options_model = {} # CategoriesOptions
2926
- categories_options_model ['explanation' ] = True
2927
- categories_options_model ['limit' ] = 10
2928
- categories_options_model ['model' ] = 'testString'
2929
-
2930
2925
classifications_options_model = {} # ClassificationsOptions
2931
2926
classifications_options_model ['model' ] = 'testString'
2932
2927
@@ -2967,6 +2962,11 @@ def test_features_serialization(self):
2967
2962
summarization_options_model = {} # SummarizationOptions
2968
2963
summarization_options_model ['limit' ] = 10
2969
2964
2965
+ categories_options_model = {} # CategoriesOptions
2966
+ categories_options_model ['explanation' ] = True
2967
+ categories_options_model ['limit' ] = 10
2968
+ categories_options_model ['model' ] = 'testString'
2969
+
2970
2970
syntax_options_tokens_model = {} # SyntaxOptionsTokens
2971
2971
syntax_options_tokens_model ['lemma' ] = True
2972
2972
syntax_options_tokens_model ['part_of_speech' ] = True
@@ -2977,7 +2977,6 @@ def test_features_serialization(self):
2977
2977
2978
2978
# Construct a json representation of a Features model
2979
2979
features_model_json = {}
2980
- features_model_json ['categories' ] = categories_options_model
2981
2980
features_model_json ['classifications' ] = classifications_options_model
2982
2981
features_model_json ['concepts' ] = concepts_options_model
2983
2982
features_model_json ['emotion' ] = emotion_options_model
@@ -2988,6 +2987,7 @@ def test_features_serialization(self):
2988
2987
features_model_json ['semantic_roles' ] = semantic_roles_options_model
2989
2988
features_model_json ['sentiment' ] = sentiment_options_model
2990
2989
features_model_json ['summarization' ] = summarization_options_model
2990
+ features_model_json ['categories' ] = categories_options_model
2991
2991
features_model_json ['syntax' ] = syntax_options_model
2992
2992
2993
2993
# Construct a model instance of Features by calling from_dict on the json representation
0 commit comments