cloudmersive-nlp-api-client 2.0.7 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +16 -8
- data/cloudmersive-nlp-api-client.gemspec +3 -3
- data/docs/AnalyticsApi.md +113 -3
- data/docs/ExtractEntitiesApi.md +1 -1
- data/docs/HateSpeechAnalysisRequest.md +8 -0
- data/docs/HateSpeechAnalysisResponse.md +10 -0
- data/docs/LanguageDetectionApi.md +1 -1
- data/docs/LanguageTranslationApi.md +114 -4
- data/docs/ParseApi.md +1 -1
- data/docs/PosTaggerApi.md +6 -6
- data/docs/RephraseApi.md +1 -1
- data/docs/SegmentationApi.md +2 -2
- data/docs/SimilarityAnalysisRequest.md +9 -0
- data/docs/SimilarityAnalysisResponse.md +10 -0
- data/docs/SpellcheckApi.md +2 -2
- data/lib/cloudmersive-nlp-api-client.rb +5 -1
- data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +120 -15
- data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +6 -7
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +6 -7
- data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +124 -20
- data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +6 -7
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +26 -32
- data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +6 -7
- data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +10 -12
- data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +10 -12
- data/lib/cloudmersive-nlp-api-client/api_client.rb +11 -9
- data/lib/cloudmersive-nlp-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-nlp-api-client/configuration.rb +2 -2
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/check_word_request.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/models/check_word_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/entity.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/models/get_words_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +186 -0
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +206 -0
- data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +196 -0
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +206 -0
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +7 -10
- data/lib/cloudmersive-nlp-api-client/models/word_position.rb +7 -11
- data/lib/cloudmersive-nlp-api-client/version.rb +2 -2
- data/spec/api/analytics_api_spec.rb +28 -4
- data/spec/api/extract_entities_api_spec.rb +2 -2
- data/spec/api/language_detection_api_spec.rb +2 -2
- data/spec/api/language_translation_api_spec.rb +29 -5
- data/spec/api/parse_api_spec.rb +2 -2
- data/spec/api/pos_tagger_api_spec.rb +7 -7
- data/spec/api/rephrase_api_spec.rb +2 -2
- data/spec/api/segmentation_api_spec.rb +3 -3
- data/spec/api/spellcheck_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +52 -35
- data/spec/configuration_spec.rb +9 -9
- data/spec/models/check_sentence_request_spec.rb +2 -3
- data/spec/models/check_sentence_response_spec.rb +3 -4
- data/spec/models/check_word_request_spec.rb +2 -3
- data/spec/models/check_word_response_spec.rb +3 -4
- data/spec/models/correct_word_in_sentence_spec.rb +4 -5
- data/spec/models/entity_spec.rb +3 -4
- data/spec/models/extract_entities_request_spec.rb +2 -3
- data/spec/models/extract_entities_response_spec.rb +3 -4
- data/spec/models/get_words_request_spec.rb +2 -3
- data/spec/models/get_words_response_spec.rb +2 -3
- data/spec/models/hate_speech_analysis_request_spec.rb +41 -0
- data/spec/models/hate_speech_analysis_response_spec.rb +53 -0
- data/spec/models/language_detection_request_spec.rb +2 -3
- data/spec/models/language_detection_response_spec.rb +4 -5
- data/spec/models/language_translation_request_spec.rb +2 -3
- data/spec/models/language_translation_response_spec.rb +4 -5
- data/spec/models/parse_request_spec.rb +2 -3
- data/spec/models/parse_response_spec.rb +2 -3
- data/spec/models/pos_request_spec.rb +2 -3
- data/spec/models/pos_response_spec.rb +2 -3
- data/spec/models/pos_sentence_spec.rb +2 -3
- data/spec/models/pos_tagged_word_spec.rb +3 -4
- data/spec/models/profanity_analysis_request_spec.rb +2 -3
- data/spec/models/profanity_analysis_response_spec.rb +4 -5
- data/spec/models/rephrase_request_spec.rb +3 -4
- data/spec/models/rephrase_response_spec.rb +4 -5
- data/spec/models/rephrased_sentence_option_spec.rb +3 -4
- data/spec/models/rephrased_sentence_spec.rb +4 -5
- data/spec/models/sentence_segmentation_request_spec.rb +2 -3
- data/spec/models/sentence_segmentation_response_spec.rb +4 -5
- data/spec/models/sentiment_analysis_request_spec.rb +2 -3
- data/spec/models/sentiment_analysis_response_spec.rb +5 -6
- data/spec/models/similarity_analysis_request_spec.rb +47 -0
- data/spec/models/similarity_analysis_response_spec.rb +53 -0
- data/spec/models/subjectivity_analysis_request_spec.rb +2 -3
- data/spec/models/subjectivity_analysis_response_spec.rb +4 -5
- data/spec/models/word_position_spec.rb +5 -6
- data/spec/spec_helper.rb +1 -1
- metadata +14 -2
|
@@ -6,18 +6,16 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module CloudmersiveNlpApiClient
|
|
16
|
-
|
|
17
16
|
class CheckWordRequest
|
|
18
17
|
attr_accessor :word
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
20
|
def self.attribute_map
|
|
23
21
|
{
|
|
@@ -38,25 +36,24 @@ module CloudmersiveNlpApiClient
|
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
|
39
37
|
|
|
40
38
|
# convert string to symbol for hash key
|
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
42
40
|
|
|
43
41
|
if attributes.has_key?(:'Word')
|
|
44
42
|
self.word = attributes[:'Word']
|
|
45
43
|
end
|
|
46
|
-
|
|
47
44
|
end
|
|
48
45
|
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
50
47
|
# @return Array for valid properties with the reasons
|
|
51
48
|
def list_invalid_properties
|
|
52
49
|
invalid_properties = Array.new
|
|
53
|
-
|
|
50
|
+
invalid_properties
|
|
54
51
|
end
|
|
55
52
|
|
|
56
53
|
# Check to see if the all the properties in the model are valid
|
|
57
54
|
# @return true if the model is valid
|
|
58
55
|
def valid?
|
|
59
|
-
|
|
56
|
+
true
|
|
60
57
|
end
|
|
61
58
|
|
|
62
59
|
# Checks equality by comparing each attribute.
|
|
@@ -86,10 +83,10 @@ module CloudmersiveNlpApiClient
|
|
|
86
83
|
return nil unless attributes.is_a?(Hash)
|
|
87
84
|
self.class.swagger_types.each_pair do |key, type|
|
|
88
85
|
if type =~ /\AArray<(.*)>/i
|
|
89
|
-
# check to ensure the input is an array given that the
|
|
86
|
+
# check to ensure the input is an array given that the attribute
|
|
90
87
|
# is documented as an array but the input is not
|
|
91
88
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
92
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
93
90
|
end
|
|
94
91
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
95
92
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -171,7 +168,7 @@ module CloudmersiveNlpApiClient
|
|
|
171
168
|
# @return [Hash] Returns the value in the form of hash
|
|
172
169
|
def _to_hash(value)
|
|
173
170
|
if value.is_a?(Array)
|
|
174
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
|
175
172
|
elsif value.is_a?(Hash)
|
|
176
173
|
{}.tap do |hash|
|
|
177
174
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -184,5 +181,4 @@ module CloudmersiveNlpApiClient
|
|
|
184
181
|
end
|
|
185
182
|
|
|
186
183
|
end
|
|
187
|
-
|
|
188
184
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -21,7 +21,6 @@ module CloudmersiveNlpApiClient
|
|
|
21
21
|
# Suggested spelling corrections
|
|
22
22
|
attr_accessor :suggestions
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
25
|
def self.attribute_map
|
|
27
26
|
{
|
|
@@ -44,7 +43,7 @@ module CloudmersiveNlpApiClient
|
|
|
44
43
|
return unless attributes.is_a?(Hash)
|
|
45
44
|
|
|
46
45
|
# convert string to symbol for hash key
|
|
47
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
48
47
|
|
|
49
48
|
if attributes.has_key?(:'Correct')
|
|
50
49
|
self.correct = attributes[:'Correct']
|
|
@@ -55,20 +54,19 @@ module CloudmersiveNlpApiClient
|
|
|
55
54
|
self.suggestions = value
|
|
56
55
|
end
|
|
57
56
|
end
|
|
58
|
-
|
|
59
57
|
end
|
|
60
58
|
|
|
61
59
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
62
60
|
# @return Array for valid properties with the reasons
|
|
63
61
|
def list_invalid_properties
|
|
64
62
|
invalid_properties = Array.new
|
|
65
|
-
|
|
63
|
+
invalid_properties
|
|
66
64
|
end
|
|
67
65
|
|
|
68
66
|
# Check to see if the all the properties in the model are valid
|
|
69
67
|
# @return true if the model is valid
|
|
70
68
|
def valid?
|
|
71
|
-
|
|
69
|
+
true
|
|
72
70
|
end
|
|
73
71
|
|
|
74
72
|
# Checks equality by comparing each attribute.
|
|
@@ -99,10 +97,10 @@ module CloudmersiveNlpApiClient
|
|
|
99
97
|
return nil unless attributes.is_a?(Hash)
|
|
100
98
|
self.class.swagger_types.each_pair do |key, type|
|
|
101
99
|
if type =~ /\AArray<(.*)>/i
|
|
102
|
-
# check to ensure the input is an array given that the
|
|
100
|
+
# check to ensure the input is an array given that the attribute
|
|
103
101
|
# is documented as an array but the input is not
|
|
104
102
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
105
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
106
104
|
end
|
|
107
105
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
108
106
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -184,7 +182,7 @@ module CloudmersiveNlpApiClient
|
|
|
184
182
|
# @return [Hash] Returns the value in the form of hash
|
|
185
183
|
def _to_hash(value)
|
|
186
184
|
if value.is_a?(Array)
|
|
187
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
185
|
+
value.compact.map { |v| _to_hash(v) }
|
|
188
186
|
elsif value.is_a?(Hash)
|
|
189
187
|
{}.tap do |hash|
|
|
190
188
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -197,5 +195,4 @@ module CloudmersiveNlpApiClient
|
|
|
197
195
|
end
|
|
198
196
|
|
|
199
197
|
end
|
|
200
|
-
|
|
201
198
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -24,7 +24,6 @@ module CloudmersiveNlpApiClient
|
|
|
24
24
|
# Suggested spelling improvements
|
|
25
25
|
attr_accessor :suggestions
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
28
|
def self.attribute_map
|
|
30
29
|
{
|
|
@@ -49,7 +48,7 @@ module CloudmersiveNlpApiClient
|
|
|
49
48
|
return unless attributes.is_a?(Hash)
|
|
50
49
|
|
|
51
50
|
# convert string to symbol for hash key
|
|
52
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
53
52
|
|
|
54
53
|
if attributes.has_key?(:'Word')
|
|
55
54
|
self.word = attributes[:'Word']
|
|
@@ -64,20 +63,19 @@ module CloudmersiveNlpApiClient
|
|
|
64
63
|
self.suggestions = value
|
|
65
64
|
end
|
|
66
65
|
end
|
|
67
|
-
|
|
68
66
|
end
|
|
69
67
|
|
|
70
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
69
|
# @return Array for valid properties with the reasons
|
|
72
70
|
def list_invalid_properties
|
|
73
71
|
invalid_properties = Array.new
|
|
74
|
-
|
|
72
|
+
invalid_properties
|
|
75
73
|
end
|
|
76
74
|
|
|
77
75
|
# Check to see if the all the properties in the model are valid
|
|
78
76
|
# @return true if the model is valid
|
|
79
77
|
def valid?
|
|
80
|
-
|
|
78
|
+
true
|
|
81
79
|
end
|
|
82
80
|
|
|
83
81
|
# Checks equality by comparing each attribute.
|
|
@@ -109,10 +107,10 @@ module CloudmersiveNlpApiClient
|
|
|
109
107
|
return nil unless attributes.is_a?(Hash)
|
|
110
108
|
self.class.swagger_types.each_pair do |key, type|
|
|
111
109
|
if type =~ /\AArray<(.*)>/i
|
|
112
|
-
# check to ensure the input is an array given that the
|
|
110
|
+
# check to ensure the input is an array given that the attribute
|
|
113
111
|
# is documented as an array but the input is not
|
|
114
112
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
115
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
113
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
116
114
|
end
|
|
117
115
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
118
116
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -194,7 +192,7 @@ module CloudmersiveNlpApiClient
|
|
|
194
192
|
# @return [Hash] Returns the value in the form of hash
|
|
195
193
|
def _to_hash(value)
|
|
196
194
|
if value.is_a?(Array)
|
|
197
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
|
198
196
|
elsif value.is_a?(Hash)
|
|
199
197
|
{}.tap do |hash|
|
|
200
198
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -207,5 +205,4 @@ module CloudmersiveNlpApiClient
|
|
|
207
205
|
end
|
|
208
206
|
|
|
209
207
|
end
|
|
210
|
-
|
|
211
208
|
end
|
|
@@ -6,20 +6,18 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module CloudmersiveNlpApiClient
|
|
16
|
-
|
|
17
16
|
class Entity
|
|
18
17
|
attr_accessor :entity_type
|
|
19
18
|
|
|
20
19
|
attr_accessor :entity_text
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
22
|
def self.attribute_map
|
|
25
23
|
{
|
|
@@ -42,7 +40,7 @@ module CloudmersiveNlpApiClient
|
|
|
42
40
|
return unless attributes.is_a?(Hash)
|
|
43
41
|
|
|
44
42
|
# convert string to symbol for hash key
|
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
46
44
|
|
|
47
45
|
if attributes.has_key?(:'EntityType')
|
|
48
46
|
self.entity_type = attributes[:'EntityType']
|
|
@@ -51,20 +49,19 @@ module CloudmersiveNlpApiClient
|
|
|
51
49
|
if attributes.has_key?(:'EntityText')
|
|
52
50
|
self.entity_text = attributes[:'EntityText']
|
|
53
51
|
end
|
|
54
|
-
|
|
55
52
|
end
|
|
56
53
|
|
|
57
54
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
58
55
|
# @return Array for valid properties with the reasons
|
|
59
56
|
def list_invalid_properties
|
|
60
57
|
invalid_properties = Array.new
|
|
61
|
-
|
|
58
|
+
invalid_properties
|
|
62
59
|
end
|
|
63
60
|
|
|
64
61
|
# Check to see if the all the properties in the model are valid
|
|
65
62
|
# @return true if the model is valid
|
|
66
63
|
def valid?
|
|
67
|
-
|
|
64
|
+
true
|
|
68
65
|
end
|
|
69
66
|
|
|
70
67
|
# Checks equality by comparing each attribute.
|
|
@@ -95,10 +92,10 @@ module CloudmersiveNlpApiClient
|
|
|
95
92
|
return nil unless attributes.is_a?(Hash)
|
|
96
93
|
self.class.swagger_types.each_pair do |key, type|
|
|
97
94
|
if type =~ /\AArray<(.*)>/i
|
|
98
|
-
# check to ensure the input is an array given that the
|
|
95
|
+
# check to ensure the input is an array given that the attribute
|
|
99
96
|
# is documented as an array but the input is not
|
|
100
97
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
101
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
102
99
|
end
|
|
103
100
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
104
101
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -180,7 +177,7 @@ module CloudmersiveNlpApiClient
|
|
|
180
177
|
# @return [Hash] Returns the value in the form of hash
|
|
181
178
|
def _to_hash(value)
|
|
182
179
|
if value.is_a?(Array)
|
|
183
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
|
184
181
|
elsif value.is_a?(Hash)
|
|
185
182
|
{}.tap do |hash|
|
|
186
183
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -193,5 +190,4 @@ module CloudmersiveNlpApiClient
|
|
|
193
190
|
end
|
|
194
191
|
|
|
195
192
|
end
|
|
196
|
-
|
|
197
193
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -18,7 +18,6 @@ module CloudmersiveNlpApiClient
|
|
|
18
18
|
# Input string to extract entities from
|
|
19
19
|
attr_accessor :input_string
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
22
|
def self.attribute_map
|
|
24
23
|
{
|
|
@@ -39,25 +38,24 @@ module CloudmersiveNlpApiClient
|
|
|
39
38
|
return unless attributes.is_a?(Hash)
|
|
40
39
|
|
|
41
40
|
# convert string to symbol for hash key
|
|
42
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
43
42
|
|
|
44
43
|
if attributes.has_key?(:'InputString')
|
|
45
44
|
self.input_string = attributes[:'InputString']
|
|
46
45
|
end
|
|
47
|
-
|
|
48
46
|
end
|
|
49
47
|
|
|
50
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
51
49
|
# @return Array for valid properties with the reasons
|
|
52
50
|
def list_invalid_properties
|
|
53
51
|
invalid_properties = Array.new
|
|
54
|
-
|
|
52
|
+
invalid_properties
|
|
55
53
|
end
|
|
56
54
|
|
|
57
55
|
# Check to see if the all the properties in the model are valid
|
|
58
56
|
# @return true if the model is valid
|
|
59
57
|
def valid?
|
|
60
|
-
|
|
58
|
+
true
|
|
61
59
|
end
|
|
62
60
|
|
|
63
61
|
# Checks equality by comparing each attribute.
|
|
@@ -87,10 +85,10 @@ module CloudmersiveNlpApiClient
|
|
|
87
85
|
return nil unless attributes.is_a?(Hash)
|
|
88
86
|
self.class.swagger_types.each_pair do |key, type|
|
|
89
87
|
if type =~ /\AArray<(.*)>/i
|
|
90
|
-
# check to ensure the input is an array given that the
|
|
88
|
+
# check to ensure the input is an array given that the attribute
|
|
91
89
|
# is documented as an array but the input is not
|
|
92
90
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
93
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
94
92
|
end
|
|
95
93
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
96
94
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -172,7 +170,7 @@ module CloudmersiveNlpApiClient
|
|
|
172
170
|
# @return [Hash] Returns the value in the form of hash
|
|
173
171
|
def _to_hash(value)
|
|
174
172
|
if value.is_a?(Array)
|
|
175
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
|
176
174
|
elsif value.is_a?(Hash)
|
|
177
175
|
{}.tap do |hash|
|
|
178
176
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -185,5 +183,4 @@ module CloudmersiveNlpApiClient
|
|
|
185
183
|
end
|
|
186
184
|
|
|
187
185
|
end
|
|
188
|
-
|
|
189
186
|
end
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -20,7 +20,6 @@ module CloudmersiveNlpApiClient
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :entities
|
|
22
22
|
|
|
23
|
-
|
|
24
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
24
|
def self.attribute_map
|
|
26
25
|
{
|
|
@@ -43,7 +42,7 @@ module CloudmersiveNlpApiClient
|
|
|
43
42
|
return unless attributes.is_a?(Hash)
|
|
44
43
|
|
|
45
44
|
# convert string to symbol for hash key
|
|
46
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
47
46
|
|
|
48
47
|
if attributes.has_key?(:'Successful')
|
|
49
48
|
self.successful = attributes[:'Successful']
|
|
@@ -54,20 +53,19 @@ module CloudmersiveNlpApiClient
|
|
|
54
53
|
self.entities = value
|
|
55
54
|
end
|
|
56
55
|
end
|
|
57
|
-
|
|
58
56
|
end
|
|
59
57
|
|
|
60
58
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
61
59
|
# @return Array for valid properties with the reasons
|
|
62
60
|
def list_invalid_properties
|
|
63
61
|
invalid_properties = Array.new
|
|
64
|
-
|
|
62
|
+
invalid_properties
|
|
65
63
|
end
|
|
66
64
|
|
|
67
65
|
# Check to see if the all the properties in the model are valid
|
|
68
66
|
# @return true if the model is valid
|
|
69
67
|
def valid?
|
|
70
|
-
|
|
68
|
+
true
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
# Checks equality by comparing each attribute.
|
|
@@ -98,10 +96,10 @@ module CloudmersiveNlpApiClient
|
|
|
98
96
|
return nil unless attributes.is_a?(Hash)
|
|
99
97
|
self.class.swagger_types.each_pair do |key, type|
|
|
100
98
|
if type =~ /\AArray<(.*)>/i
|
|
101
|
-
# check to ensure the input is an array given that the
|
|
99
|
+
# check to ensure the input is an array given that the attribute
|
|
102
100
|
# is documented as an array but the input is not
|
|
103
101
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
104
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
102
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
105
103
|
end
|
|
106
104
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
107
105
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -183,7 +181,7 @@ module CloudmersiveNlpApiClient
|
|
|
183
181
|
# @return [Hash] Returns the value in the form of hash
|
|
184
182
|
def _to_hash(value)
|
|
185
183
|
if value.is_a?(Array)
|
|
186
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
184
|
+
value.compact.map { |v| _to_hash(v) }
|
|
187
185
|
elsif value.is_a?(Hash)
|
|
188
186
|
{}.tap do |hash|
|
|
189
187
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -196,5 +194,4 @@ module CloudmersiveNlpApiClient
|
|
|
196
194
|
end
|
|
197
195
|
|
|
198
196
|
end
|
|
199
|
-
|
|
200
197
|
end
|