cloudmersive-nlp-api-client 2.0.7 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +16 -8
  4. data/cloudmersive-nlp-api-client.gemspec +3 -3
  5. data/docs/AnalyticsApi.md +113 -3
  6. data/docs/ExtractEntitiesApi.md +1 -1
  7. data/docs/HateSpeechAnalysisRequest.md +8 -0
  8. data/docs/HateSpeechAnalysisResponse.md +10 -0
  9. data/docs/LanguageDetectionApi.md +1 -1
  10. data/docs/LanguageTranslationApi.md +114 -4
  11. data/docs/ParseApi.md +1 -1
  12. data/docs/PosTaggerApi.md +6 -6
  13. data/docs/RephraseApi.md +1 -1
  14. data/docs/SegmentationApi.md +2 -2
  15. data/docs/SimilarityAnalysisRequest.md +9 -0
  16. data/docs/SimilarityAnalysisResponse.md +10 -0
  17. data/docs/SpellcheckApi.md +2 -2
  18. data/lib/cloudmersive-nlp-api-client.rb +5 -1
  19. data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +120 -15
  20. data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +6 -7
  21. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +6 -7
  22. data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +124 -20
  23. data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +6 -7
  24. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +26 -32
  25. data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +6 -7
  26. data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +10 -12
  27. data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +10 -12
  28. data/lib/cloudmersive-nlp-api-client/api_client.rb +11 -9
  29. data/lib/cloudmersive-nlp-api-client/api_error.rb +1 -1
  30. data/lib/cloudmersive-nlp-api-client/configuration.rb +2 -2
  31. data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +7 -10
  32. data/lib/cloudmersive-nlp-api-client/models/check_sentence_response.rb +7 -10
  33. data/lib/cloudmersive-nlp-api-client/models/check_word_request.rb +7 -11
  34. data/lib/cloudmersive-nlp-api-client/models/check_word_response.rb +7 -10
  35. data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence.rb +7 -10
  36. data/lib/cloudmersive-nlp-api-client/models/entity.rb +7 -11
  37. data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +7 -10
  38. data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +7 -10
  39. data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +7 -11
  40. data/lib/cloudmersive-nlp-api-client/models/get_words_response.rb +7 -10
  41. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +186 -0
  42. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +206 -0
  43. data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +7 -10
  44. data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +7 -10
  45. data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +7 -10
  46. data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +7 -10
  47. data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +7 -10
  48. data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +7 -10
  49. data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +7 -10
  50. data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +7 -10
  51. data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +7 -10
  52. data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +7 -10
  53. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +7 -10
  54. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +7 -10
  55. data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +7 -10
  56. data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +7 -10
  57. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +7 -10
  58. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +7 -10
  59. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +7 -11
  60. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +7 -11
  61. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +7 -10
  62. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +7 -10
  63. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +196 -0
  64. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +206 -0
  65. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +7 -10
  66. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +7 -10
  67. data/lib/cloudmersive-nlp-api-client/models/word_position.rb +7 -11
  68. data/lib/cloudmersive-nlp-api-client/version.rb +2 -2
  69. data/spec/api/analytics_api_spec.rb +28 -4
  70. data/spec/api/extract_entities_api_spec.rb +2 -2
  71. data/spec/api/language_detection_api_spec.rb +2 -2
  72. data/spec/api/language_translation_api_spec.rb +29 -5
  73. data/spec/api/parse_api_spec.rb +2 -2
  74. data/spec/api/pos_tagger_api_spec.rb +7 -7
  75. data/spec/api/rephrase_api_spec.rb +2 -2
  76. data/spec/api/segmentation_api_spec.rb +3 -3
  77. data/spec/api/spellcheck_api_spec.rb +3 -3
  78. data/spec/api_client_spec.rb +52 -35
  79. data/spec/configuration_spec.rb +9 -9
  80. data/spec/models/check_sentence_request_spec.rb +2 -3
  81. data/spec/models/check_sentence_response_spec.rb +3 -4
  82. data/spec/models/check_word_request_spec.rb +2 -3
  83. data/spec/models/check_word_response_spec.rb +3 -4
  84. data/spec/models/correct_word_in_sentence_spec.rb +4 -5
  85. data/spec/models/entity_spec.rb +3 -4
  86. data/spec/models/extract_entities_request_spec.rb +2 -3
  87. data/spec/models/extract_entities_response_spec.rb +3 -4
  88. data/spec/models/get_words_request_spec.rb +2 -3
  89. data/spec/models/get_words_response_spec.rb +2 -3
  90. data/spec/models/hate_speech_analysis_request_spec.rb +41 -0
  91. data/spec/models/hate_speech_analysis_response_spec.rb +53 -0
  92. data/spec/models/language_detection_request_spec.rb +2 -3
  93. data/spec/models/language_detection_response_spec.rb +4 -5
  94. data/spec/models/language_translation_request_spec.rb +2 -3
  95. data/spec/models/language_translation_response_spec.rb +4 -5
  96. data/spec/models/parse_request_spec.rb +2 -3
  97. data/spec/models/parse_response_spec.rb +2 -3
  98. data/spec/models/pos_request_spec.rb +2 -3
  99. data/spec/models/pos_response_spec.rb +2 -3
  100. data/spec/models/pos_sentence_spec.rb +2 -3
  101. data/spec/models/pos_tagged_word_spec.rb +3 -4
  102. data/spec/models/profanity_analysis_request_spec.rb +2 -3
  103. data/spec/models/profanity_analysis_response_spec.rb +4 -5
  104. data/spec/models/rephrase_request_spec.rb +3 -4
  105. data/spec/models/rephrase_response_spec.rb +4 -5
  106. data/spec/models/rephrased_sentence_option_spec.rb +3 -4
  107. data/spec/models/rephrased_sentence_spec.rb +4 -5
  108. data/spec/models/sentence_segmentation_request_spec.rb +2 -3
  109. data/spec/models/sentence_segmentation_response_spec.rb +4 -5
  110. data/spec/models/sentiment_analysis_request_spec.rb +2 -3
  111. data/spec/models/sentiment_analysis_response_spec.rb +5 -6
  112. data/spec/models/similarity_analysis_request_spec.rb +47 -0
  113. data/spec/models/similarity_analysis_response_spec.rb +53 -0
  114. data/spec/models/subjectivity_analysis_request_spec.rb +2 -3
  115. data/spec/models/subjectivity_analysis_response_spec.rb +4 -5
  116. data/spec/models/word_position_spec.rb +5 -6
  117. data/spec/spec_helper.rb +1 -1
  118. metadata +14 -2
@@ -6,11 +6,11 @@
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.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveNlpApiClient
16
16
  class LanguageDetectionApi
@@ -19,7 +19,6 @@ module CloudmersiveNlpApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Detect language of text
24
23
  # Automatically determine which language a text string is written in. Supports Danish (DAN), German (DEU), English (ENG), French (FRA), Italian (ITA), Japanese (JPN), Korean (KOR), Dutch (NLD), Norwegian (NOR), Portuguese (POR), Russian (RUS), Spanish (SPA), Swedish (SWE), Chinese (ZHO).
25
24
  # @param input
@@ -27,7 +26,7 @@ module CloudmersiveNlpApiClient
27
26
  # @return [LanguageDetectionResponse]
28
27
  def language_detection_get_language(input, opts = {})
29
28
  data, _status_code, _headers = language_detection_get_language_with_http_info(input, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Detect language of text
@@ -37,14 +36,14 @@ module CloudmersiveNlpApiClient
37
36
  # @return [Array<(LanguageDetectionResponse, Fixnum, Hash)>] LanguageDetectionResponse data, response status code and response headers
38
37
  def language_detection_get_language_with_http_info(input, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_get_language ..."
39
+ @api_client.config.logger.debug 'Calling API: LanguageDetectionApi.language_detection_get_language ...'
41
40
  end
42
41
  # verify the required parameter 'input' is set
43
42
  if @api_client.config.client_side_validation && input.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'input' when calling LanguageDetectionApi.language_detection_get_language"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/nlp-v2/language/detect"
46
+ local_var_path = '/nlp-v2/language/detect'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -52,7 +51,7 @@ module CloudmersiveNlpApiClient
52
51
  # header parameters
53
52
  header_params = {}
54
53
  # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
55
  # HTTP header 'Content-Type'
57
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
57
 
@@ -6,11 +6,11 @@
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.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveNlpApiClient
16
16
  class LanguageTranslationApi
@@ -19,7 +19,6 @@ module CloudmersiveNlpApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Translate German to English text with Deep Learning AI
24
23
  # Automatically translates input text in German to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
25
24
  # @param input Input translation request
@@ -27,7 +26,7 @@ module CloudmersiveNlpApiClient
27
26
  # @return [LanguageTranslationResponse]
28
27
  def language_translation_translate_deu_to_eng(input, opts = {})
29
28
  data, _status_code, _headers = language_translation_translate_deu_to_eng_with_http_info(input, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Translate German to English text with Deep Learning AI
@@ -37,14 +36,14 @@ module CloudmersiveNlpApiClient
37
36
  # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
38
37
  def language_translation_translate_deu_to_eng_with_http_info(input, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_deu_to_eng ..."
39
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_deu_to_eng ...'
41
40
  end
42
41
  # verify the required parameter 'input' is set
43
42
  if @api_client.config.client_side_validation && input.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_deu_to_eng"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/nlp-v2/translate/language/deu/to/eng"
46
+ local_var_path = '/nlp-v2/translate/language/deu/to/eng'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -52,7 +51,7 @@ module CloudmersiveNlpApiClient
52
51
  # header parameters
53
52
  header_params = {}
54
53
  # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
55
  # HTTP header 'Content-Type'
57
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
57
 
@@ -74,7 +73,6 @@ module CloudmersiveNlpApiClient
74
73
  end
75
74
  return data, status_code, headers
76
75
  end
77
-
78
76
  # Translate English to German text with Deep Learning AI
79
77
  # Automatically translates input text in English to output text in German using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
80
78
  # @param input Input translation request
@@ -82,7 +80,7 @@ module CloudmersiveNlpApiClient
82
80
  # @return [LanguageTranslationResponse]
83
81
  def language_translation_translate_eng_to_deu(input, opts = {})
84
82
  data, _status_code, _headers = language_translation_translate_eng_to_deu_with_http_info(input, opts)
85
- return data
83
+ data
86
84
  end
87
85
 
88
86
  # Translate English to German text with Deep Learning AI
@@ -92,14 +90,14 @@ module CloudmersiveNlpApiClient
92
90
  # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
93
91
  def language_translation_translate_eng_to_deu_with_http_info(input, opts = {})
94
92
  if @api_client.config.debugging
95
- @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_eng_to_deu ..."
93
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_eng_to_deu ...'
96
94
  end
97
95
  # verify the required parameter 'input' is set
98
96
  if @api_client.config.client_side_validation && input.nil?
99
97
  fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_eng_to_deu"
100
98
  end
101
99
  # resource path
102
- local_var_path = "/nlp-v2/translate/language/eng/to/deu"
100
+ local_var_path = '/nlp-v2/translate/language/eng/to/deu'
103
101
 
104
102
  # query parameters
105
103
  query_params = {}
@@ -107,7 +105,7 @@ module CloudmersiveNlpApiClient
107
105
  # header parameters
108
106
  header_params = {}
109
107
  # HTTP header 'Accept' (if needed)
110
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
109
  # HTTP header 'Content-Type'
112
110
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
113
111
 
@@ -129,7 +127,60 @@ module CloudmersiveNlpApiClient
129
127
  end
130
128
  return data, status_code, headers
131
129
  end
130
+ # Translate English to French text with Deep Learning AI
131
+ # Automatically translates input text in English to output text in French using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
132
+ # @param input Input translation request
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [LanguageTranslationResponse]
135
+ def language_translation_translate_eng_to_fra(input, opts = {})
136
+ data, _status_code, _headers = language_translation_translate_eng_to_fra_with_http_info(input, opts)
137
+ data
138
+ end
132
139
 
140
+ # Translate English to French text with Deep Learning AI
141
+ # Automatically translates input text in English to output text in French using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
142
+ # @param input Input translation request
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
145
+ def language_translation_translate_eng_to_fra_with_http_info(input, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_eng_to_fra ...'
148
+ end
149
+ # verify the required parameter 'input' is set
150
+ if @api_client.config.client_side_validation && input.nil?
151
+ fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_eng_to_fra"
152
+ end
153
+ # resource path
154
+ local_var_path = '/nlp-v2/translate/language/eng/to/fra'
155
+
156
+ # query parameters
157
+ query_params = {}
158
+
159
+ # header parameters
160
+ header_params = {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
163
+ # HTTP header 'Content-Type'
164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = @api_client.object_to_http_body(input)
171
+ auth_names = ['Apikey']
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'LanguageTranslationResponse')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_eng_to_fra\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
133
184
  # Translate English to Russian text with Deep Learning AI
134
185
  # Automatically translates input text in English to output text in Russian using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
135
186
  # @param input Input translation request
@@ -137,7 +188,7 @@ module CloudmersiveNlpApiClient
137
188
  # @return [LanguageTranslationResponse]
138
189
  def language_translation_translate_eng_to_rus(input, opts = {})
139
190
  data, _status_code, _headers = language_translation_translate_eng_to_rus_with_http_info(input, opts)
140
- return data
191
+ data
141
192
  end
142
193
 
143
194
  # Translate English to Russian text with Deep Learning AI
@@ -147,14 +198,14 @@ module CloudmersiveNlpApiClient
147
198
  # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
148
199
  def language_translation_translate_eng_to_rus_with_http_info(input, opts = {})
149
200
  if @api_client.config.debugging
150
- @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_eng_to_rus ..."
201
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_eng_to_rus ...'
151
202
  end
152
203
  # verify the required parameter 'input' is set
153
204
  if @api_client.config.client_side_validation && input.nil?
154
205
  fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_eng_to_rus"
155
206
  end
156
207
  # resource path
157
- local_var_path = "/nlp-v2/translate/language/eng/to/rus"
208
+ local_var_path = '/nlp-v2/translate/language/eng/to/rus'
158
209
 
159
210
  # query parameters
160
211
  query_params = {}
@@ -162,7 +213,7 @@ module CloudmersiveNlpApiClient
162
213
  # header parameters
163
214
  header_params = {}
164
215
  # HTTP header 'Accept' (if needed)
165
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
166
217
  # HTTP header 'Content-Type'
167
218
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
168
219
 
@@ -184,7 +235,60 @@ module CloudmersiveNlpApiClient
184
235
  end
185
236
  return data, status_code, headers
186
237
  end
238
+ # Translate French to English text with Deep Learning AI
239
+ # Automatically translates input text in French to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
240
+ # @param input Input translation request
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [LanguageTranslationResponse]
243
+ def language_translation_translate_fra_to_eng(input, opts = {})
244
+ data, _status_code, _headers = language_translation_translate_fra_to_eng_with_http_info(input, opts)
245
+ data
246
+ end
187
247
 
248
+ # Translate French to English text with Deep Learning AI
249
+ # Automatically translates input text in French to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
250
+ # @param input Input translation request
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
253
+ def language_translation_translate_fra_to_eng_with_http_info(input, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_fra_to_eng ...'
256
+ end
257
+ # verify the required parameter 'input' is set
258
+ if @api_client.config.client_side_validation && input.nil?
259
+ fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_fra_to_eng"
260
+ end
261
+ # resource path
262
+ local_var_path = '/nlp-v2/translate/language/fra/to/eng'
263
+
264
+ # query parameters
265
+ query_params = {}
266
+
267
+ # header parameters
268
+ header_params = {}
269
+ # HTTP header 'Accept' (if needed)
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
+ # HTTP header 'Content-Type'
272
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
273
+
274
+ # form parameters
275
+ form_params = {}
276
+
277
+ # http body (model)
278
+ post_body = @api_client.object_to_http_body(input)
279
+ auth_names = ['Apikey']
280
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
281
+ :header_params => header_params,
282
+ :query_params => query_params,
283
+ :form_params => form_params,
284
+ :body => post_body,
285
+ :auth_names => auth_names,
286
+ :return_type => 'LanguageTranslationResponse')
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_fra_to_eng\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
188
292
  # Translate Russian to English text with Deep Learning AI
189
293
  # Automatically translates input text in Russian to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
190
294
  # @param input Input translation request
@@ -192,7 +296,7 @@ module CloudmersiveNlpApiClient
192
296
  # @return [LanguageTranslationResponse]
193
297
  def language_translation_translate_rus_to_eng(input, opts = {})
194
298
  data, _status_code, _headers = language_translation_translate_rus_to_eng_with_http_info(input, opts)
195
- return data
299
+ data
196
300
  end
197
301
 
198
302
  # Translate Russian to English text with Deep Learning AI
@@ -202,14 +306,14 @@ module CloudmersiveNlpApiClient
202
306
  # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
203
307
  def language_translation_translate_rus_to_eng_with_http_info(input, opts = {})
204
308
  if @api_client.config.debugging
205
- @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_rus_to_eng ..."
309
+ @api_client.config.logger.debug 'Calling API: LanguageTranslationApi.language_translation_translate_rus_to_eng ...'
206
310
  end
207
311
  # verify the required parameter 'input' is set
208
312
  if @api_client.config.client_side_validation && input.nil?
209
313
  fail ArgumentError, "Missing the required parameter 'input' when calling LanguageTranslationApi.language_translation_translate_rus_to_eng"
210
314
  end
211
315
  # resource path
212
- local_var_path = "/nlp-v2/translate/language/rus/to/eng"
316
+ local_var_path = '/nlp-v2/translate/language/rus/to/eng'
213
317
 
214
318
  # query parameters
215
319
  query_params = {}
@@ -217,7 +321,7 @@ module CloudmersiveNlpApiClient
217
321
  # header parameters
218
322
  header_params = {}
219
323
  # HTTP header 'Accept' (if needed)
220
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
325
  # HTTP header 'Content-Type'
222
326
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
223
327
 
@@ -6,11 +6,11 @@
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.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveNlpApiClient
16
16
  class ParseApi
@@ -19,7 +19,6 @@ module CloudmersiveNlpApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Parse string to syntax tree
24
23
  # Parses the input string into a Penn Treebank syntax tree
25
24
  # @param input Input string
@@ -27,7 +26,7 @@ module CloudmersiveNlpApiClient
27
26
  # @return [ParseResponse]
28
27
  def parse_parse_string(input, opts = {})
29
28
  data, _status_code, _headers = parse_parse_string_with_http_info(input, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Parse string to syntax tree
@@ -37,14 +36,14 @@ module CloudmersiveNlpApiClient
37
36
  # @return [Array<(ParseResponse, Fixnum, Hash)>] ParseResponse data, response status code and response headers
38
37
  def parse_parse_string_with_http_info(input, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ParseApi.parse_parse_string ..."
39
+ @api_client.config.logger.debug 'Calling API: ParseApi.parse_parse_string ...'
41
40
  end
42
41
  # verify the required parameter 'input' is set
43
42
  if @api_client.config.client_side_validation && input.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'input' when calling ParseApi.parse_parse_string"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/nlp-v2/parse/tree"
46
+ local_var_path = '/nlp-v2/parse/tree'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -52,7 +51,7 @@ module CloudmersiveNlpApiClient
52
51
  # header parameters
53
52
  header_params = {}
54
53
  # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
55
  # HTTP header 'Content-Type'
57
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
57
 
@@ -6,11 +6,11 @@
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.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module CloudmersiveNlpApiClient
16
16
  class PosTaggerApi
@@ -19,7 +19,6 @@ module CloudmersiveNlpApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Part-of-speech tag a string, filter to adjectives
24
23
  # Part-of-speech (POS) tag a string, find the adjectives, and return result as JSON
25
24
  # @param request Input string
@@ -27,7 +26,7 @@ module CloudmersiveNlpApiClient
27
26
  # @return [PosResponse]
28
27
  def pos_tagger_tag_adjectives(request, opts = {})
29
28
  data, _status_code, _headers = pos_tagger_tag_adjectives_with_http_info(request, opts)
30
- return data
29
+ data
31
30
  end
32
31
 
33
32
  # Part-of-speech tag a string, filter to adjectives
@@ -37,14 +36,14 @@ module CloudmersiveNlpApiClient
37
36
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
38
37
  def pos_tagger_tag_adjectives_with_http_info(request, opts = {})
39
38
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_adjectives ..."
39
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_adjectives ...'
41
40
  end
42
41
  # verify the required parameter 'request' is set
43
42
  if @api_client.config.client_side_validation && request.nil?
44
43
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_adjectives"
45
44
  end
46
45
  # resource path
47
- local_var_path = "/nlp-v2/pos/tag/adjectives"
46
+ local_var_path = '/nlp-v2/pos/tag/adjectives'
48
47
 
49
48
  # query parameters
50
49
  query_params = {}
@@ -52,7 +51,7 @@ module CloudmersiveNlpApiClient
52
51
  # header parameters
53
52
  header_params = {}
54
53
  # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
55
  # HTTP header 'Content-Type'
57
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
57
 
@@ -74,7 +73,6 @@ module CloudmersiveNlpApiClient
74
73
  end
75
74
  return data, status_code, headers
76
75
  end
77
-
78
76
  # Part-of-speech tag a string, filter to adverbs
79
77
  # Part-of-speech (POS) tag a string, find the adverbs, and return result as JSON
80
78
  # @param request Input string
@@ -82,7 +80,7 @@ module CloudmersiveNlpApiClient
82
80
  # @return [PosResponse]
83
81
  def pos_tagger_tag_adverbs(request, opts = {})
84
82
  data, _status_code, _headers = pos_tagger_tag_adverbs_with_http_info(request, opts)
85
- return data
83
+ data
86
84
  end
87
85
 
88
86
  # Part-of-speech tag a string, filter to adverbs
@@ -92,14 +90,14 @@ module CloudmersiveNlpApiClient
92
90
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
93
91
  def pos_tagger_tag_adverbs_with_http_info(request, opts = {})
94
92
  if @api_client.config.debugging
95
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_adverbs ..."
93
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_adverbs ...'
96
94
  end
97
95
  # verify the required parameter 'request' is set
98
96
  if @api_client.config.client_side_validation && request.nil?
99
97
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_adverbs"
100
98
  end
101
99
  # resource path
102
- local_var_path = "/nlp-v2/pos/tag/adverbs"
100
+ local_var_path = '/nlp-v2/pos/tag/adverbs'
103
101
 
104
102
  # query parameters
105
103
  query_params = {}
@@ -107,7 +105,7 @@ module CloudmersiveNlpApiClient
107
105
  # header parameters
108
106
  header_params = {}
109
107
  # HTTP header 'Accept' (if needed)
110
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
109
  # HTTP header 'Content-Type'
112
110
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
113
111
 
@@ -129,7 +127,6 @@ module CloudmersiveNlpApiClient
129
127
  end
130
128
  return data, status_code, headers
131
129
  end
132
-
133
130
  # Part-of-speech tag a string, filter to nouns
134
131
  # Part-of-speech (POS) tag a string, find the nouns, and return result as JSON
135
132
  # @param request Input string
@@ -137,7 +134,7 @@ module CloudmersiveNlpApiClient
137
134
  # @return [PosResponse]
138
135
  def pos_tagger_tag_nouns(request, opts = {})
139
136
  data, _status_code, _headers = pos_tagger_tag_nouns_with_http_info(request, opts)
140
- return data
137
+ data
141
138
  end
142
139
 
143
140
  # Part-of-speech tag a string, filter to nouns
@@ -147,14 +144,14 @@ module CloudmersiveNlpApiClient
147
144
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
148
145
  def pos_tagger_tag_nouns_with_http_info(request, opts = {})
149
146
  if @api_client.config.debugging
150
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_nouns ..."
147
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_nouns ...'
151
148
  end
152
149
  # verify the required parameter 'request' is set
153
150
  if @api_client.config.client_side_validation && request.nil?
154
151
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_nouns"
155
152
  end
156
153
  # resource path
157
- local_var_path = "/nlp-v2/pos/tag/nouns"
154
+ local_var_path = '/nlp-v2/pos/tag/nouns'
158
155
 
159
156
  # query parameters
160
157
  query_params = {}
@@ -162,7 +159,7 @@ module CloudmersiveNlpApiClient
162
159
  # header parameters
163
160
  header_params = {}
164
161
  # HTTP header 'Accept' (if needed)
165
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
166
163
  # HTTP header 'Content-Type'
167
164
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
168
165
 
@@ -184,7 +181,6 @@ module CloudmersiveNlpApiClient
184
181
  end
185
182
  return data, status_code, headers
186
183
  end
187
-
188
184
  # Part-of-speech tag a string, filter to pronouns
189
185
  # Part-of-speech (POS) tag a string, find the pronouns, and return result as JSON
190
186
  # @param request Input string
@@ -192,7 +188,7 @@ module CloudmersiveNlpApiClient
192
188
  # @return [PosResponse]
193
189
  def pos_tagger_tag_pronouns(request, opts = {})
194
190
  data, _status_code, _headers = pos_tagger_tag_pronouns_with_http_info(request, opts)
195
- return data
191
+ data
196
192
  end
197
193
 
198
194
  # Part-of-speech tag a string, filter to pronouns
@@ -202,14 +198,14 @@ module CloudmersiveNlpApiClient
202
198
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
203
199
  def pos_tagger_tag_pronouns_with_http_info(request, opts = {})
204
200
  if @api_client.config.debugging
205
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_pronouns ..."
201
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_pronouns ...'
206
202
  end
207
203
  # verify the required parameter 'request' is set
208
204
  if @api_client.config.client_side_validation && request.nil?
209
205
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_pronouns"
210
206
  end
211
207
  # resource path
212
- local_var_path = "/nlp-v2/pos/tag/pronouns"
208
+ local_var_path = '/nlp-v2/pos/tag/pronouns'
213
209
 
214
210
  # query parameters
215
211
  query_params = {}
@@ -217,7 +213,7 @@ module CloudmersiveNlpApiClient
217
213
  # header parameters
218
214
  header_params = {}
219
215
  # HTTP header 'Accept' (if needed)
220
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
217
  # HTTP header 'Content-Type'
222
218
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
223
219
 
@@ -239,7 +235,6 @@ module CloudmersiveNlpApiClient
239
235
  end
240
236
  return data, status_code, headers
241
237
  end
242
-
243
238
  # Part-of-speech tag a string
244
239
  # Part-of-speech (POS) tag a string and return result as JSON
245
240
  # @param request Input string
@@ -247,7 +242,7 @@ module CloudmersiveNlpApiClient
247
242
  # @return [PosResponse]
248
243
  def pos_tagger_tag_sentence(request, opts = {})
249
244
  data, _status_code, _headers = pos_tagger_tag_sentence_with_http_info(request, opts)
250
- return data
245
+ data
251
246
  end
252
247
 
253
248
  # Part-of-speech tag a string
@@ -257,14 +252,14 @@ module CloudmersiveNlpApiClient
257
252
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
258
253
  def pos_tagger_tag_sentence_with_http_info(request, opts = {})
259
254
  if @api_client.config.debugging
260
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_sentence ..."
255
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_sentence ...'
261
256
  end
262
257
  # verify the required parameter 'request' is set
263
258
  if @api_client.config.client_side_validation && request.nil?
264
259
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_sentence"
265
260
  end
266
261
  # resource path
267
- local_var_path = "/nlp-v2/pos/tag/sentence"
262
+ local_var_path = '/nlp-v2/pos/tag/sentence'
268
263
 
269
264
  # query parameters
270
265
  query_params = {}
@@ -272,7 +267,7 @@ module CloudmersiveNlpApiClient
272
267
  # header parameters
273
268
  header_params = {}
274
269
  # HTTP header 'Accept' (if needed)
275
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
271
  # HTTP header 'Content-Type'
277
272
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
278
273
 
@@ -294,7 +289,6 @@ module CloudmersiveNlpApiClient
294
289
  end
295
290
  return data, status_code, headers
296
291
  end
297
-
298
292
  # Part-of-speech tag a string, filter to verbs
299
293
  # Part-of-speech (POS) tag a string, find the verbs, and return result as JSON
300
294
  # @param request Input string
@@ -302,7 +296,7 @@ module CloudmersiveNlpApiClient
302
296
  # @return [PosResponse]
303
297
  def pos_tagger_tag_verbs(request, opts = {})
304
298
  data, _status_code, _headers = pos_tagger_tag_verbs_with_http_info(request, opts)
305
- return data
299
+ data
306
300
  end
307
301
 
308
302
  # Part-of-speech tag a string, filter to verbs
@@ -312,14 +306,14 @@ module CloudmersiveNlpApiClient
312
306
  # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
313
307
  def pos_tagger_tag_verbs_with_http_info(request, opts = {})
314
308
  if @api_client.config.debugging
315
- @api_client.config.logger.debug "Calling API: PosTaggerApi.pos_tagger_tag_verbs ..."
309
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_verbs ...'
316
310
  end
317
311
  # verify the required parameter 'request' is set
318
312
  if @api_client.config.client_side_validation && request.nil?
319
313
  fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_verbs"
320
314
  end
321
315
  # resource path
322
- local_var_path = "/nlp-v2/pos/tag/verbs"
316
+ local_var_path = '/nlp-v2/pos/tag/verbs'
323
317
 
324
318
  # query parameters
325
319
  query_params = {}
@@ -327,7 +321,7 @@ module CloudmersiveNlpApiClient
327
321
  # header parameters
328
322
  header_params = {}
329
323
  # HTTP header 'Accept' (if needed)
330
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
325
  # HTTP header 'Content-Type'
332
326
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
333
327