cloudmersive-nlp-api-client 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +162 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-nlp-api-client.gemspec +45 -0
  6. data/docs/AnalyticsApi.md +283 -0
  7. data/docs/CheckSentenceRequest.md +8 -0
  8. data/docs/CheckSentenceResponse.md +9 -0
  9. data/docs/CheckWordRequest.md +8 -0
  10. data/docs/CheckWordResponse.md +9 -0
  11. data/docs/CorrectWordInSentence.md +10 -0
  12. data/docs/Entity.md +9 -0
  13. data/docs/ExtractEntitiesApi.md +63 -0
  14. data/docs/ExtractEntitiesRequest.md +8 -0
  15. data/docs/ExtractEntitiesResponse.md +9 -0
  16. data/docs/GetWordsRequest.md +8 -0
  17. data/docs/GetWordsResponse.md +8 -0
  18. data/docs/HateSpeechAnalysisRequest.md +8 -0
  19. data/docs/HateSpeechAnalysisResponse.md +10 -0
  20. data/docs/LanguageDetectionApi.md +63 -0
  21. data/docs/LanguageDetectionRequest.md +8 -0
  22. data/docs/LanguageDetectionResponse.md +10 -0
  23. data/docs/LanguageTranslationApi.md +338 -0
  24. data/docs/LanguageTranslationRequest.md +8 -0
  25. data/docs/LanguageTranslationResponse.md +10 -0
  26. data/docs/ParseApi.md +63 -0
  27. data/docs/ParseRequest.md +8 -0
  28. data/docs/ParseResponse.md +8 -0
  29. data/docs/PosRequest.md +8 -0
  30. data/docs/PosResponse.md +8 -0
  31. data/docs/PosSentence.md +8 -0
  32. data/docs/PosTaggedWord.md +9 -0
  33. data/docs/PosTaggerApi.md +338 -0
  34. data/docs/ProfanityAnalysisRequest.md +8 -0
  35. data/docs/ProfanityAnalysisResponse.md +10 -0
  36. data/docs/RephraseApi.md +63 -0
  37. data/docs/RephraseRequest.md +9 -0
  38. data/docs/RephraseResponse.md +10 -0
  39. data/docs/RephrasedSentence.md +10 -0
  40. data/docs/RephrasedSentenceOption.md +9 -0
  41. data/docs/SegmentationApi.md +118 -0
  42. data/docs/SentenceSegmentationRequest.md +8 -0
  43. data/docs/SentenceSegmentationResponse.md +10 -0
  44. data/docs/SentimentAnalysisRequest.md +8 -0
  45. data/docs/SentimentAnalysisResponse.md +11 -0
  46. data/docs/SimilarityAnalysisRequest.md +9 -0
  47. data/docs/SimilarityAnalysisResponse.md +10 -0
  48. data/docs/SpellcheckApi.md +118 -0
  49. data/docs/SubjectivityAnalysisRequest.md +8 -0
  50. data/docs/SubjectivityAnalysisResponse.md +10 -0
  51. data/docs/WordPosition.md +11 -0
  52. data/git_push.sh +55 -0
  53. data/lib/cloudmersive-nlp-api-client.rb +85 -0
  54. data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +293 -0
  55. data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +77 -0
  56. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +77 -0
  57. data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +347 -0
  58. data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +77 -0
  59. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +347 -0
  60. data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +77 -0
  61. data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +131 -0
  62. data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +131 -0
  63. data/lib/cloudmersive-nlp-api-client/api_client.rb +391 -0
  64. data/lib/cloudmersive-nlp-api-client/api_error.rb +38 -0
  65. data/lib/cloudmersive-nlp-api-client/configuration.rb +209 -0
  66. data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +186 -0
  67. data/lib/cloudmersive-nlp-api-client/models/check_sentence_response.rb +198 -0
  68. data/lib/cloudmersive-nlp-api-client/models/check_word_request.rb +184 -0
  69. data/lib/cloudmersive-nlp-api-client/models/check_word_response.rb +198 -0
  70. data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence.rb +208 -0
  71. data/lib/cloudmersive-nlp-api-client/models/entity.rb +193 -0
  72. data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +186 -0
  73. data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +197 -0
  74. data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +184 -0
  75. data/lib/cloudmersive-nlp-api-client/models/get_words_response.rb +188 -0
  76. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +186 -0
  77. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +206 -0
  78. data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +186 -0
  79. data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +206 -0
  80. data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +186 -0
  81. data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +206 -0
  82. data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +186 -0
  83. data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +186 -0
  84. data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +186 -0
  85. data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +188 -0
  86. data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +188 -0
  87. data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +196 -0
  88. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +186 -0
  89. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +206 -0
  90. data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +196 -0
  91. data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +208 -0
  92. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +208 -0
  93. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +196 -0
  94. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +184 -0
  95. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +204 -0
  96. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +186 -0
  97. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +216 -0
  98. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +196 -0
  99. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +206 -0
  100. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +186 -0
  101. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +206 -0
  102. data/lib/cloudmersive-nlp-api-client/models/word_position.rb +215 -0
  103. data/lib/cloudmersive-nlp-api-client/version.rb +15 -0
  104. data/spec/api/analytics_api_spec.rb +95 -0
  105. data/spec/api/extract_entities_api_spec.rb +47 -0
  106. data/spec/api/language_detection_api_spec.rb +47 -0
  107. data/spec/api/language_translation_api_spec.rb +107 -0
  108. data/spec/api/parse_api_spec.rb +47 -0
  109. data/spec/api/pos_tagger_api_spec.rb +107 -0
  110. data/spec/api/rephrase_api_spec.rb +47 -0
  111. data/spec/api/segmentation_api_spec.rb +59 -0
  112. data/spec/api/spellcheck_api_spec.rb +59 -0
  113. data/spec/api_client_spec.rb +243 -0
  114. data/spec/configuration_spec.rb +42 -0
  115. data/spec/models/check_sentence_request_spec.rb +41 -0
  116. data/spec/models/check_sentence_response_spec.rb +47 -0
  117. data/spec/models/check_word_request_spec.rb +41 -0
  118. data/spec/models/check_word_response_spec.rb +47 -0
  119. data/spec/models/correct_word_in_sentence_spec.rb +53 -0
  120. data/spec/models/entity_spec.rb +47 -0
  121. data/spec/models/extract_entities_request_spec.rb +41 -0
  122. data/spec/models/extract_entities_response_spec.rb +47 -0
  123. data/spec/models/get_words_request_spec.rb +41 -0
  124. data/spec/models/get_words_response_spec.rb +41 -0
  125. data/spec/models/hate_speech_analysis_request_spec.rb +41 -0
  126. data/spec/models/hate_speech_analysis_response_spec.rb +53 -0
  127. data/spec/models/language_detection_request_spec.rb +41 -0
  128. data/spec/models/language_detection_response_spec.rb +53 -0
  129. data/spec/models/language_translation_request_spec.rb +41 -0
  130. data/spec/models/language_translation_response_spec.rb +53 -0
  131. data/spec/models/parse_request_spec.rb +41 -0
  132. data/spec/models/parse_response_spec.rb +41 -0
  133. data/spec/models/pos_request_spec.rb +41 -0
  134. data/spec/models/pos_response_spec.rb +41 -0
  135. data/spec/models/pos_sentence_spec.rb +41 -0
  136. data/spec/models/pos_tagged_word_spec.rb +47 -0
  137. data/spec/models/profanity_analysis_request_spec.rb +41 -0
  138. data/spec/models/profanity_analysis_response_spec.rb +53 -0
  139. data/spec/models/rephrase_request_spec.rb +47 -0
  140. data/spec/models/rephrase_response_spec.rb +53 -0
  141. data/spec/models/rephrased_sentence_option_spec.rb +47 -0
  142. data/spec/models/rephrased_sentence_spec.rb +53 -0
  143. data/spec/models/sentence_segmentation_request_spec.rb +41 -0
  144. data/spec/models/sentence_segmentation_response_spec.rb +53 -0
  145. data/spec/models/sentiment_analysis_request_spec.rb +41 -0
  146. data/spec/models/sentiment_analysis_response_spec.rb +59 -0
  147. data/spec/models/similarity_analysis_request_spec.rb +47 -0
  148. data/spec/models/similarity_analysis_response_spec.rb +53 -0
  149. data/spec/models/subjectivity_analysis_request_spec.rb +41 -0
  150. data/spec/models/subjectivity_analysis_response_spec.rb +53 -0
  151. data/spec/models/word_position_spec.rb +59 -0
  152. data/spec/spec_helper.rb +111 -0
  153. metadata +154 -3
@@ -0,0 +1,347 @@
1
+ =begin
2
+ #nlpapiv2
3
+
4
+ #The powerful Natural Language Processing APIs (v2) let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class PosTaggerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Part-of-speech tag a string, filter to adjectives
23
+ # Part-of-speech (POS) tag a string, find the adjectives, and return result as JSON
24
+ # @param request Input string
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PosResponse]
27
+ def pos_tagger_tag_adjectives(request, opts = {})
28
+ data, _status_code, _headers = pos_tagger_tag_adjectives_with_http_info(request, opts)
29
+ data
30
+ end
31
+
32
+ # Part-of-speech tag a string, filter to adjectives
33
+ # Part-of-speech (POS) tag a string, find the adjectives, and return result as JSON
34
+ # @param request Input string
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
37
+ def pos_tagger_tag_adjectives_with_http_info(request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_adjectives ...'
40
+ end
41
+ # verify the required parameter 'request' is set
42
+ if @api_client.config.client_side_validation && request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_adjectives"
44
+ end
45
+ # resource path
46
+ local_var_path = '/nlp-v2/pos/tag/adjectives'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(request)
63
+ auth_names = ['Apikey']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'PosResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_adjectives\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Part-of-speech tag a string, filter to adverbs
77
+ # Part-of-speech (POS) tag a string, find the adverbs, and return result as JSON
78
+ # @param request Input string
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [PosResponse]
81
+ def pos_tagger_tag_adverbs(request, opts = {})
82
+ data, _status_code, _headers = pos_tagger_tag_adverbs_with_http_info(request, opts)
83
+ data
84
+ end
85
+
86
+ # Part-of-speech tag a string, filter to adverbs
87
+ # Part-of-speech (POS) tag a string, find the adverbs, and return result as JSON
88
+ # @param request Input string
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
91
+ def pos_tagger_tag_adverbs_with_http_info(request, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_adverbs ...'
94
+ end
95
+ # verify the required parameter 'request' is set
96
+ if @api_client.config.client_side_validation && request.nil?
97
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_adverbs"
98
+ end
99
+ # resource path
100
+ local_var_path = '/nlp-v2/pos/tag/adverbs'
101
+
102
+ # query parameters
103
+ query_params = {}
104
+
105
+ # header parameters
106
+ header_params = {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
+ # HTTP header 'Content-Type'
110
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
111
+
112
+ # form parameters
113
+ form_params = {}
114
+
115
+ # http body (model)
116
+ post_body = @api_client.object_to_http_body(request)
117
+ auth_names = ['Apikey']
118
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => 'PosResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_adverbs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ # Part-of-speech tag a string, filter to nouns
131
+ # Part-of-speech (POS) tag a string, find the nouns, and return result as JSON
132
+ # @param request Input string
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [PosResponse]
135
+ def pos_tagger_tag_nouns(request, opts = {})
136
+ data, _status_code, _headers = pos_tagger_tag_nouns_with_http_info(request, opts)
137
+ data
138
+ end
139
+
140
+ # Part-of-speech tag a string, filter to nouns
141
+ # Part-of-speech (POS) tag a string, find the nouns, and return result as JSON
142
+ # @param request Input string
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
145
+ def pos_tagger_tag_nouns_with_http_info(request, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_nouns ...'
148
+ end
149
+ # verify the required parameter 'request' is set
150
+ if @api_client.config.client_side_validation && request.nil?
151
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_nouns"
152
+ end
153
+ # resource path
154
+ local_var_path = '/nlp-v2/pos/tag/nouns'
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(request)
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 => 'PosResponse')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_nouns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
184
+ # Part-of-speech tag a string, filter to pronouns
185
+ # Part-of-speech (POS) tag a string, find the pronouns, and return result as JSON
186
+ # @param request Input string
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [PosResponse]
189
+ def pos_tagger_tag_pronouns(request, opts = {})
190
+ data, _status_code, _headers = pos_tagger_tag_pronouns_with_http_info(request, opts)
191
+ data
192
+ end
193
+
194
+ # Part-of-speech tag a string, filter to pronouns
195
+ # Part-of-speech (POS) tag a string, find the pronouns, and return result as JSON
196
+ # @param request Input string
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
199
+ def pos_tagger_tag_pronouns_with_http_info(request, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_pronouns ...'
202
+ end
203
+ # verify the required parameter 'request' is set
204
+ if @api_client.config.client_side_validation && request.nil?
205
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_pronouns"
206
+ end
207
+ # resource path
208
+ local_var_path = '/nlp-v2/pos/tag/pronouns'
209
+
210
+ # query parameters
211
+ query_params = {}
212
+
213
+ # header parameters
214
+ header_params = {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
217
+ # HTTP header 'Content-Type'
218
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
219
+
220
+ # form parameters
221
+ form_params = {}
222
+
223
+ # http body (model)
224
+ post_body = @api_client.object_to_http_body(request)
225
+ auth_names = ['Apikey']
226
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => 'PosResponse')
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_pronouns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+ # Part-of-speech tag a string
239
+ # Part-of-speech (POS) tag a string and return result as JSON
240
+ # @param request Input string
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [PosResponse]
243
+ def pos_tagger_tag_sentence(request, opts = {})
244
+ data, _status_code, _headers = pos_tagger_tag_sentence_with_http_info(request, opts)
245
+ data
246
+ end
247
+
248
+ # Part-of-speech tag a string
249
+ # Part-of-speech (POS) tag a string and return result as JSON
250
+ # @param request Input string
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
253
+ def pos_tagger_tag_sentence_with_http_info(request, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_sentence ...'
256
+ end
257
+ # verify the required parameter 'request' is set
258
+ if @api_client.config.client_side_validation && request.nil?
259
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_sentence"
260
+ end
261
+ # resource path
262
+ local_var_path = '/nlp-v2/pos/tag/sentence'
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(request)
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 => 'PosResponse')
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_sentence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+ # Part-of-speech tag a string, filter to verbs
293
+ # Part-of-speech (POS) tag a string, find the verbs, and return result as JSON
294
+ # @param request Input string
295
+ # @param [Hash] opts the optional parameters
296
+ # @return [PosResponse]
297
+ def pos_tagger_tag_verbs(request, opts = {})
298
+ data, _status_code, _headers = pos_tagger_tag_verbs_with_http_info(request, opts)
299
+ data
300
+ end
301
+
302
+ # Part-of-speech tag a string, filter to verbs
303
+ # Part-of-speech (POS) tag a string, find the verbs, and return result as JSON
304
+ # @param request Input string
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
307
+ def pos_tagger_tag_verbs_with_http_info(request, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: PosTaggerApi.pos_tagger_tag_verbs ...'
310
+ end
311
+ # verify the required parameter 'request' is set
312
+ if @api_client.config.client_side_validation && request.nil?
313
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerApi.pos_tagger_tag_verbs"
314
+ end
315
+ # resource path
316
+ local_var_path = '/nlp-v2/pos/tag/verbs'
317
+
318
+ # query parameters
319
+ query_params = {}
320
+
321
+ # header parameters
322
+ header_params = {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
325
+ # HTTP header 'Content-Type'
326
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
327
+
328
+ # form parameters
329
+ form_params = {}
330
+
331
+ # http body (model)
332
+ post_body = @api_client.object_to_http_body(request)
333
+ auth_names = ['Apikey']
334
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => 'PosResponse')
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "API called: PosTaggerApi#pos_tagger_tag_verbs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ end
344
+ return data, status_code, headers
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,77 @@
1
+ =begin
2
+ #nlpapiv2
3
+
4
+ #The powerful Natural Language Processing APIs (v2) let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class RephraseApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
23
+ # Automatically rephrases or paraphrases input text in English sentence by sentence using advanced Deep Learning and Neural NLP. Creates multiple reprhasing candidates per input sentence, from 1 to 10 possible rephrasings of the original sentence. Seeks to preserve original semantic meaning in rephrased output candidates. Consumes 1-2 API calls per output rephrasing option generated, per sentence.
24
+ # @param input Input rephrase request
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [RephraseResponse]
27
+ def rephrase_english_rephrase_sentence_by_sentence(input, opts = {})
28
+ data, _status_code, _headers = rephrase_english_rephrase_sentence_by_sentence_with_http_info(input, opts)
29
+ data
30
+ end
31
+
32
+ # Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
33
+ # Automatically rephrases or paraphrases input text in English sentence by sentence using advanced Deep Learning and Neural NLP. Creates multiple reprhasing candidates per input sentence, from 1 to 10 possible rephrasings of the original sentence. Seeks to preserve original semantic meaning in rephrased output candidates. Consumes 1-2 API calls per output rephrasing option generated, per sentence.
34
+ # @param input Input rephrase request
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(RephraseResponse, Fixnum, Hash)>] RephraseResponse data, response status code and response headers
37
+ def rephrase_english_rephrase_sentence_by_sentence_with_http_info(input, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RephraseApi.rephrase_english_rephrase_sentence_by_sentence ...'
40
+ end
41
+ # verify the required parameter 'input' is set
42
+ if @api_client.config.client_side_validation && input.nil?
43
+ fail ArgumentError, "Missing the required parameter 'input' when calling RephraseApi.rephrase_english_rephrase_sentence_by_sentence"
44
+ end
45
+ # resource path
46
+ local_var_path = '/nlp-v2/rephrase/rephrase/eng/by-sentence'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(input)
63
+ auth_names = ['Apikey']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'RephraseResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: RephraseApi#rephrase_english_rephrase_sentence_by_sentence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,131 @@
1
+ =begin
2
+ #nlpapiv2
3
+
4
+ #The powerful Natural Language Processing APIs (v2) let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class SegmentationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Extract sentences from string
23
+ # Segment an input string into separate sentences, output result as a string.
24
+ # @param input Input string
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [SentenceSegmentationResponse]
27
+ def segmentation_get_sentences(input, opts = {})
28
+ data, _status_code, _headers = segmentation_get_sentences_with_http_info(input, opts)
29
+ data
30
+ end
31
+
32
+ # Extract sentences from string
33
+ # Segment an input string into separate sentences, output result as a string.
34
+ # @param input Input string
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(SentenceSegmentationResponse, Fixnum, Hash)>] SentenceSegmentationResponse data, response status code and response headers
37
+ def segmentation_get_sentences_with_http_info(input, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: SegmentationApi.segmentation_get_sentences ...'
40
+ end
41
+ # verify the required parameter 'input' is set
42
+ if @api_client.config.client_side_validation && input.nil?
43
+ fail ArgumentError, "Missing the required parameter 'input' when calling SegmentationApi.segmentation_get_sentences"
44
+ end
45
+ # resource path
46
+ local_var_path = '/nlp-v2/segmentation/sentences'
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = @api_client.object_to_http_body(input)
63
+ auth_names = ['Apikey']
64
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'SentenceSegmentationResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: SegmentationApi#segmentation_get_sentences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+ # Get words in input string
77
+ # Get the component words in an input string
78
+ # @param input String to process
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [GetWordsResponse]
81
+ def segmentation_get_words(input, opts = {})
82
+ data, _status_code, _headers = segmentation_get_words_with_http_info(input, opts)
83
+ data
84
+ end
85
+
86
+ # Get words in input string
87
+ # Get the component words in an input string
88
+ # @param input String to process
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(GetWordsResponse, Fixnum, Hash)>] GetWordsResponse data, response status code and response headers
91
+ def segmentation_get_words_with_http_info(input, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: SegmentationApi.segmentation_get_words ...'
94
+ end
95
+ # verify the required parameter 'input' is set
96
+ if @api_client.config.client_side_validation && input.nil?
97
+ fail ArgumentError, "Missing the required parameter 'input' when calling SegmentationApi.segmentation_get_words"
98
+ end
99
+ # resource path
100
+ local_var_path = '/nlp-v2/segmentation/words'
101
+
102
+ # query parameters
103
+ query_params = {}
104
+
105
+ # header parameters
106
+ header_params = {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
+ # HTTP header 'Content-Type'
110
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
111
+
112
+ # form parameters
113
+ form_params = {}
114
+
115
+ # http body (model)
116
+ post_body = @api_client.object_to_http_body(input)
117
+ auth_names = ['Apikey']
118
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => 'GetWordsResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: SegmentationApi#segmentation_get_words\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+ end
131
+ end