cloudmersive-nlp-api-client 1.2.9
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 +7 -0
- data/Gemfile +7 -0
- data/README.md +131 -0
- data/Rakefile +8 -0
- data/cloudmersive-nlp-api-client.gemspec +45 -0
- data/docs/CheckJsonResponse.md +8 -0
- data/docs/CheckSentenceJsonResponse.md +9 -0
- data/docs/CorrectJsonResponse.md +9 -0
- data/docs/CorrectWordInSentenceJsonResponse.md +10 -0
- data/docs/ExtractEntitiesStringApi.md +63 -0
- data/docs/GetWordsJsonResponse.md +8 -0
- data/docs/LanguageDetectionApi.md +63 -0
- data/docs/LanguageDetectionResponse.md +10 -0
- data/docs/ParseStringApi.md +63 -0
- data/docs/PosRequest.md +8 -0
- data/docs/PosResponse.md +8 -0
- data/docs/PosSentence.md +8 -0
- data/docs/PosTaggedWord.md +9 -0
- data/docs/PosTaggerJsonApi.md +63 -0
- data/docs/PosTaggerStringApi.md +63 -0
- data/docs/SentencesApi.md +63 -0
- data/docs/SpellCheckApi.md +338 -0
- data/docs/WordPosition.md +11 -0
- data/docs/WordsApi.md +448 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-nlp-api-client.rb +58 -0
- data/lib/cloudmersive-nlp-api-client/api/extract_entities_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/parse_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_json_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/sentences_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/spell_check_api.rb +353 -0
- data/lib/cloudmersive-nlp-api-client/api/words_api.rb +463 -0
- data/lib/cloudmersive-nlp-api-client/api_client.rb +389 -0
- data/lib/cloudmersive-nlp-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-nlp-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/check_json_response.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_json_response.rb +201 -0
- data/lib/cloudmersive-nlp-api-client/models/correct_json_response.rb +201 -0
- data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence_json_response.rb +211 -0
- data/lib/cloudmersive-nlp-api-client/models/get_words_json_response.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +199 -0
- data/lib/cloudmersive-nlp-api-client/models/word_position.rb +219 -0
- data/lib/cloudmersive-nlp-api-client/version.rb +15 -0
- data/spec/api/extract_entities_string_api_spec.rb +47 -0
- data/spec/api/language_detection_api_spec.rb +47 -0
- data/spec/api/parse_string_api_spec.rb +47 -0
- data/spec/api/pos_tagger_json_api_spec.rb +47 -0
- data/spec/api/pos_tagger_string_api_spec.rb +47 -0
- data/spec/api/sentences_api_spec.rb +47 -0
- data/spec/api/spell_check_api_spec.rb +107 -0
- data/spec/api/words_api_spec.rb +131 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/check_json_response_spec.rb +42 -0
- data/spec/models/check_sentence_json_response_spec.rb +48 -0
- data/spec/models/correct_json_response_spec.rb +48 -0
- data/spec/models/correct_word_in_sentence_json_response_spec.rb +54 -0
- data/spec/models/get_words_json_response_spec.rb +42 -0
- data/spec/models/language_detection_response_spec.rb +54 -0
- data/spec/models/pos_request_spec.rb +42 -0
- data/spec/models/pos_response_spec.rb +42 -0
- data/spec/models/pos_sentence_spec.rb +42 -0
- data/spec/models/pos_tagged_word_spec.rb +48 -0
- data/spec/models/word_position_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +296 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#nlpapi
|
3
|
+
|
4
|
+
#The powerful Natural Language Processing APIs 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: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module CloudmersiveNlpApiClient
|
16
|
+
class SentencesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Extract sentences from string
|
24
|
+
# Segment an input string into separate sentences, output result as a string.
|
25
|
+
# @param input Input string
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [String]
|
28
|
+
def sentences_post(input, opts = {})
|
29
|
+
data, _status_code, _headers = sentences_post_with_http_info(input, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Extract sentences from string
|
34
|
+
# Segment an input string into separate sentences, output result as a string.
|
35
|
+
# @param input Input string
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
|
+
def sentences_post_with_http_info(input, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: SentencesApi.sentences_post ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'input' is set
|
43
|
+
if @api_client.config.client_side_validation && input.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling SentencesApi.sentences_post"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/nlp/get/sentences/string"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(input)
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'String')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: SentencesApi#sentences_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,353 @@
|
|
1
|
+
=begin
|
2
|
+
#nlpapi
|
3
|
+
|
4
|
+
#The powerful Natural Language Processing APIs 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: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module CloudmersiveNlpApiClient
|
16
|
+
class SpellCheckApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Spell check word
|
24
|
+
# Spell check a word as JSON
|
25
|
+
# @param value Input sentence
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [CheckJsonResponse]
|
28
|
+
def spell_check_check_json(value, opts = {})
|
29
|
+
data, _status_code, _headers = spell_check_check_json_with_http_info(value, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Spell check word
|
34
|
+
# Spell check a word as JSON
|
35
|
+
# @param value Input sentence
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(CheckJsonResponse, Fixnum, Hash)>] CheckJsonResponse data, response status code and response headers
|
38
|
+
def spell_check_check_json_with_http_info(value, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_check_json ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'value' is set
|
43
|
+
if @api_client.config.client_side_validation && value.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_check_json"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/nlp/spellcheck/check/word/json"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(value)
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'CheckJsonResponse')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_check_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check if sentence is spelled correctly
|
79
|
+
# Checks whether the sentence is spelled correctly and returns the result as JSON
|
80
|
+
# @param value Input sentence
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [CheckSentenceJsonResponse]
|
83
|
+
def spell_check_check_sentence_json(value, opts = {})
|
84
|
+
data, _status_code, _headers = spell_check_check_sentence_json_with_http_info(value, opts)
|
85
|
+
return data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check if sentence is spelled correctly
|
89
|
+
# Checks whether the sentence is spelled correctly and returns the result as JSON
|
90
|
+
# @param value Input sentence
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(CheckSentenceJsonResponse, Fixnum, Hash)>] CheckSentenceJsonResponse data, response status code and response headers
|
93
|
+
def spell_check_check_sentence_json_with_http_info(value, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_check_sentence_json ..."
|
96
|
+
end
|
97
|
+
# verify the required parameter 'value' is set
|
98
|
+
if @api_client.config.client_side_validation && value.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_check_sentence_json"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/nlp/spellcheck/check/sentence/json"
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = @api_client.object_to_http_body(value)
|
119
|
+
auth_names = ['Apikey']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => 'CheckSentenceJsonResponse')
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_check_sentence_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
+
end
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
|
133
|
+
# Spell check a sentence
|
134
|
+
# Check if a sentence is spelled correctly
|
135
|
+
# @param value Input sentence word
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [BOOLEAN]
|
138
|
+
def spell_check_check_sentence_string(value, opts = {})
|
139
|
+
data, _status_code, _headers = spell_check_check_sentence_string_with_http_info(value, opts)
|
140
|
+
return data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Spell check a sentence
|
144
|
+
# Check if a sentence is spelled correctly
|
145
|
+
# @param value Input sentence word
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
|
148
|
+
def spell_check_check_sentence_string_with_http_info(value, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_check_sentence_string ..."
|
151
|
+
end
|
152
|
+
# verify the required parameter 'value' is set
|
153
|
+
if @api_client.config.client_side_validation && value.nil?
|
154
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_check_sentence_string"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = "/nlp/spellcheck/check/sentence/string"
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = {}
|
161
|
+
|
162
|
+
# header parameters
|
163
|
+
header_params = {}
|
164
|
+
# HTTP header 'Accept' (if needed)
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
166
|
+
# HTTP header 'Content-Type'
|
167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = @api_client.object_to_http_body(value)
|
174
|
+
auth_names = ['Apikey']
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
176
|
+
:header_params => header_params,
|
177
|
+
:query_params => query_params,
|
178
|
+
:form_params => form_params,
|
179
|
+
:body => post_body,
|
180
|
+
:auth_names => auth_names,
|
181
|
+
:return_type => 'BOOLEAN')
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_check_sentence_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
|
188
|
+
# Find spelling corrections
|
189
|
+
# Find the spelling corrections for a word
|
190
|
+
# @param value Input word
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [String]
|
193
|
+
def spell_check_correct(value, opts = {})
|
194
|
+
data, _status_code, _headers = spell_check_correct_with_http_info(value, opts)
|
195
|
+
return data
|
196
|
+
end
|
197
|
+
|
198
|
+
# Find spelling corrections
|
199
|
+
# Find the spelling corrections for a word
|
200
|
+
# @param value Input word
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
203
|
+
def spell_check_correct_with_http_info(value, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_correct ..."
|
206
|
+
end
|
207
|
+
# verify the required parameter 'value' is set
|
208
|
+
if @api_client.config.client_side_validation && value.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_correct"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = "/nlp/spellcheck/correct/word/string"
|
213
|
+
|
214
|
+
# query parameters
|
215
|
+
query_params = {}
|
216
|
+
|
217
|
+
# header parameters
|
218
|
+
header_params = {}
|
219
|
+
# HTTP header 'Accept' (if needed)
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
221
|
+
# HTTP header 'Content-Type'
|
222
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
223
|
+
|
224
|
+
# form parameters
|
225
|
+
form_params = {}
|
226
|
+
|
227
|
+
# http body (model)
|
228
|
+
post_body = @api_client.object_to_http_body(value)
|
229
|
+
auth_names = ['Apikey']
|
230
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
231
|
+
:header_params => header_params,
|
232
|
+
:query_params => query_params,
|
233
|
+
:form_params => form_params,
|
234
|
+
:body => post_body,
|
235
|
+
:auth_names => auth_names,
|
236
|
+
:return_type => 'String')
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_correct\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
return data, status_code, headers
|
241
|
+
end
|
242
|
+
|
243
|
+
# Find spelling corrections
|
244
|
+
# Find spelling correction suggestions and return result as JSON
|
245
|
+
# @param value Input string
|
246
|
+
# @param [Hash] opts the optional parameters
|
247
|
+
# @return [CorrectJsonResponse]
|
248
|
+
def spell_check_correct_json(value, opts = {})
|
249
|
+
data, _status_code, _headers = spell_check_correct_json_with_http_info(value, opts)
|
250
|
+
return data
|
251
|
+
end
|
252
|
+
|
253
|
+
# Find spelling corrections
|
254
|
+
# Find spelling correction suggestions and return result as JSON
|
255
|
+
# @param value Input string
|
256
|
+
# @param [Hash] opts the optional parameters
|
257
|
+
# @return [Array<(CorrectJsonResponse, Fixnum, Hash)>] CorrectJsonResponse data, response status code and response headers
|
258
|
+
def spell_check_correct_json_with_http_info(value, opts = {})
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_correct_json ..."
|
261
|
+
end
|
262
|
+
# verify the required parameter 'value' is set
|
263
|
+
if @api_client.config.client_side_validation && value.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_correct_json"
|
265
|
+
end
|
266
|
+
# resource path
|
267
|
+
local_var_path = "/nlp/spellcheck/correct/word/json"
|
268
|
+
|
269
|
+
# query parameters
|
270
|
+
query_params = {}
|
271
|
+
|
272
|
+
# header parameters
|
273
|
+
header_params = {}
|
274
|
+
# HTTP header 'Accept' (if needed)
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
276
|
+
# HTTP header 'Content-Type'
|
277
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
278
|
+
|
279
|
+
# form parameters
|
280
|
+
form_params = {}
|
281
|
+
|
282
|
+
# http body (model)
|
283
|
+
post_body = @api_client.object_to_http_body(value)
|
284
|
+
auth_names = ['Apikey']
|
285
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
286
|
+
:header_params => header_params,
|
287
|
+
:query_params => query_params,
|
288
|
+
:form_params => form_params,
|
289
|
+
:body => post_body,
|
290
|
+
:auth_names => auth_names,
|
291
|
+
:return_type => 'CorrectJsonResponse')
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_correct_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
294
|
+
end
|
295
|
+
return data, status_code, headers
|
296
|
+
end
|
297
|
+
|
298
|
+
# Spell check a word
|
299
|
+
# Check if a word is spelled correctly
|
300
|
+
# @param value Input string word
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @return [BOOLEAN]
|
303
|
+
def spell_check_post(value, opts = {})
|
304
|
+
data, _status_code, _headers = spell_check_post_with_http_info(value, opts)
|
305
|
+
return data
|
306
|
+
end
|
307
|
+
|
308
|
+
# Spell check a word
|
309
|
+
# Check if a word is spelled correctly
|
310
|
+
# @param value Input string word
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
|
313
|
+
def spell_check_post_with_http_info(value, opts = {})
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug "Calling API: SpellCheckApi.spell_check_post ..."
|
316
|
+
end
|
317
|
+
# verify the required parameter 'value' is set
|
318
|
+
if @api_client.config.client_side_validation && value.nil?
|
319
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling SpellCheckApi.spell_check_post"
|
320
|
+
end
|
321
|
+
# resource path
|
322
|
+
local_var_path = "/nlp/spellcheck/check/word/string"
|
323
|
+
|
324
|
+
# query parameters
|
325
|
+
query_params = {}
|
326
|
+
|
327
|
+
# header parameters
|
328
|
+
header_params = {}
|
329
|
+
# HTTP header 'Accept' (if needed)
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
331
|
+
# HTTP header 'Content-Type'
|
332
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
333
|
+
|
334
|
+
# form parameters
|
335
|
+
form_params = {}
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = @api_client.object_to_http_body(value)
|
339
|
+
auth_names = ['Apikey']
|
340
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
341
|
+
:header_params => header_params,
|
342
|
+
:query_params => query_params,
|
343
|
+
:form_params => form_params,
|
344
|
+
:body => post_body,
|
345
|
+
:auth_names => auth_names,
|
346
|
+
:return_type => 'BOOLEAN')
|
347
|
+
if @api_client.config.debugging
|
348
|
+
@api_client.config.logger.debug "API called: SpellCheckApi#spell_check_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
349
|
+
end
|
350
|
+
return data, status_code, headers
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|
@@ -0,0 +1,463 @@
|
|
1
|
+
=begin
|
2
|
+
#nlpapi
|
3
|
+
|
4
|
+
#The powerful Natural Language Processing APIs 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: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module CloudmersiveNlpApiClient
|
16
|
+
class WordsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Get adjectives in string
|
24
|
+
# Retrieves all adjectives in input string
|
25
|
+
# @param input Input string
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [String]
|
28
|
+
def words_adjectives(input, opts = {})
|
29
|
+
data, _status_code, _headers = words_adjectives_with_http_info(input, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get adjectives in string
|
34
|
+
# Retrieves all adjectives in input string
|
35
|
+
# @param input Input string
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
|
+
def words_adjectives_with_http_info(input, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_adjectives ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'input' is set
|
43
|
+
if @api_client.config.client_side_validation && input.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_adjectives"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/nlp/get/words/adjectives/string"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(input)
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'String')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: WordsApi#words_adjectives\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Get adverbs in input string
|
79
|
+
# Returns all adverb words in the input string
|
80
|
+
# @param input Input string
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [String]
|
83
|
+
def words_adverbs(input, opts = {})
|
84
|
+
data, _status_code, _headers = words_adverbs_with_http_info(input, opts)
|
85
|
+
return data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get adverbs in input string
|
89
|
+
# Returns all adverb words in the input string
|
90
|
+
# @param input Input string
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
93
|
+
def words_adverbs_with_http_info(input, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_adverbs ..."
|
96
|
+
end
|
97
|
+
# verify the required parameter 'input' is set
|
98
|
+
if @api_client.config.client_side_validation && input.nil?
|
99
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_adverbs"
|
100
|
+
end
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/nlp/get/words/adverbs/string"
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
# HTTP header 'Accept' (if needed)
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
111
|
+
# HTTP header 'Content-Type'
|
112
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = @api_client.object_to_http_body(input)
|
119
|
+
auth_names = ['Apikey']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => 'String')
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "API called: WordsApi#words_adverbs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
+
end
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
|
133
|
+
# Get words in input string (JSON)
|
134
|
+
# Get the component words in an input string, formatted as JSON
|
135
|
+
# @param input String to process
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [GetWordsJsonResponse]
|
138
|
+
def words_get_words_json(input, opts = {})
|
139
|
+
data, _status_code, _headers = words_get_words_json_with_http_info(input, opts)
|
140
|
+
return data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Get words in input string (JSON)
|
144
|
+
# Get the component words in an input string, formatted as JSON
|
145
|
+
# @param input String to process
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(GetWordsJsonResponse, Fixnum, Hash)>] GetWordsJsonResponse data, response status code and response headers
|
148
|
+
def words_get_words_json_with_http_info(input, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_get_words_json ..."
|
151
|
+
end
|
152
|
+
# verify the required parameter 'input' is set
|
153
|
+
if @api_client.config.client_side_validation && input.nil?
|
154
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_get_words_json"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = "/nlp/get/words/json"
|
158
|
+
|
159
|
+
# query parameters
|
160
|
+
query_params = {}
|
161
|
+
|
162
|
+
# header parameters
|
163
|
+
header_params = {}
|
164
|
+
# HTTP header 'Accept' (if needed)
|
165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
166
|
+
# HTTP header 'Content-Type'
|
167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
168
|
+
|
169
|
+
# form parameters
|
170
|
+
form_params = {}
|
171
|
+
|
172
|
+
# http body (model)
|
173
|
+
post_body = @api_client.object_to_http_body(input)
|
174
|
+
auth_names = ['Apikey']
|
175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
176
|
+
:header_params => header_params,
|
177
|
+
:query_params => query_params,
|
178
|
+
:form_params => form_params,
|
179
|
+
:body => post_body,
|
180
|
+
:auth_names => auth_names,
|
181
|
+
:return_type => 'GetWordsJsonResponse')
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: WordsApi#words_get_words_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
|
188
|
+
# Get words from string
|
189
|
+
# Segment an input string into its component words
|
190
|
+
# @param input Input string
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [String]
|
193
|
+
def words_get_words_string(input, opts = {})
|
194
|
+
data, _status_code, _headers = words_get_words_string_with_http_info(input, opts)
|
195
|
+
return data
|
196
|
+
end
|
197
|
+
|
198
|
+
# Get words from string
|
199
|
+
# Segment an input string into its component words
|
200
|
+
# @param input Input string
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
203
|
+
def words_get_words_string_with_http_info(input, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_get_words_string ..."
|
206
|
+
end
|
207
|
+
# verify the required parameter 'input' is set
|
208
|
+
if @api_client.config.client_side_validation && input.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_get_words_string"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = "/nlp/get/words/string"
|
213
|
+
|
214
|
+
# query parameters
|
215
|
+
query_params = {}
|
216
|
+
|
217
|
+
# header parameters
|
218
|
+
header_params = {}
|
219
|
+
# HTTP header 'Accept' (if needed)
|
220
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
221
|
+
# HTTP header 'Content-Type'
|
222
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
223
|
+
|
224
|
+
# form parameters
|
225
|
+
form_params = {}
|
226
|
+
|
227
|
+
# http body (model)
|
228
|
+
post_body = @api_client.object_to_http_body(input)
|
229
|
+
auth_names = ['Apikey']
|
230
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
231
|
+
:header_params => header_params,
|
232
|
+
:query_params => query_params,
|
233
|
+
:form_params => form_params,
|
234
|
+
:body => post_body,
|
235
|
+
:auth_names => auth_names,
|
236
|
+
:return_type => 'String')
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: WordsApi#words_get_words_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
return data, status_code, headers
|
241
|
+
end
|
242
|
+
|
243
|
+
# Get nouns in string
|
244
|
+
# Returns all of the nouns in the input string
|
245
|
+
# @param input Input string
|
246
|
+
# @param [Hash] opts the optional parameters
|
247
|
+
# @return [String]
|
248
|
+
def words_nouns(input, opts = {})
|
249
|
+
data, _status_code, _headers = words_nouns_with_http_info(input, opts)
|
250
|
+
return data
|
251
|
+
end
|
252
|
+
|
253
|
+
# Get nouns in string
|
254
|
+
# Returns all of the nouns in the input string
|
255
|
+
# @param input Input string
|
256
|
+
# @param [Hash] opts the optional parameters
|
257
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
258
|
+
def words_nouns_with_http_info(input, opts = {})
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_nouns ..."
|
261
|
+
end
|
262
|
+
# verify the required parameter 'input' is set
|
263
|
+
if @api_client.config.client_side_validation && input.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_nouns"
|
265
|
+
end
|
266
|
+
# resource path
|
267
|
+
local_var_path = "/nlp/get/words/nouns/string"
|
268
|
+
|
269
|
+
# query parameters
|
270
|
+
query_params = {}
|
271
|
+
|
272
|
+
# header parameters
|
273
|
+
header_params = {}
|
274
|
+
# HTTP header 'Accept' (if needed)
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
276
|
+
# HTTP header 'Content-Type'
|
277
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
278
|
+
|
279
|
+
# form parameters
|
280
|
+
form_params = {}
|
281
|
+
|
282
|
+
# http body (model)
|
283
|
+
post_body = @api_client.object_to_http_body(input)
|
284
|
+
auth_names = ['Apikey']
|
285
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
286
|
+
:header_params => header_params,
|
287
|
+
:query_params => query_params,
|
288
|
+
:form_params => form_params,
|
289
|
+
:body => post_body,
|
290
|
+
:auth_names => auth_names,
|
291
|
+
:return_type => 'String')
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug "API called: WordsApi#words_nouns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
294
|
+
end
|
295
|
+
return data, status_code, headers
|
296
|
+
end
|
297
|
+
|
298
|
+
# Get the verbs in a string
|
299
|
+
# Get all of the verbs in the input string.
|
300
|
+
# @param input Input string
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @return [String]
|
303
|
+
def words_post(input, opts = {})
|
304
|
+
data, _status_code, _headers = words_post_with_http_info(input, opts)
|
305
|
+
return data
|
306
|
+
end
|
307
|
+
|
308
|
+
# Get the verbs in a string
|
309
|
+
# Get all of the verbs in the input string.
|
310
|
+
# @param input Input string
|
311
|
+
# @param [Hash] opts the optional parameters
|
312
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
313
|
+
def words_post_with_http_info(input, opts = {})
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_post ..."
|
316
|
+
end
|
317
|
+
# verify the required parameter 'input' is set
|
318
|
+
if @api_client.config.client_side_validation && input.nil?
|
319
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_post"
|
320
|
+
end
|
321
|
+
# resource path
|
322
|
+
local_var_path = "/nlp/get/words/verbs/string"
|
323
|
+
|
324
|
+
# query parameters
|
325
|
+
query_params = {}
|
326
|
+
|
327
|
+
# header parameters
|
328
|
+
header_params = {}
|
329
|
+
# HTTP header 'Accept' (if needed)
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
331
|
+
# HTTP header 'Content-Type'
|
332
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
333
|
+
|
334
|
+
# form parameters
|
335
|
+
form_params = {}
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = @api_client.object_to_http_body(input)
|
339
|
+
auth_names = ['Apikey']
|
340
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
341
|
+
:header_params => header_params,
|
342
|
+
:query_params => query_params,
|
343
|
+
:form_params => form_params,
|
344
|
+
:body => post_body,
|
345
|
+
:auth_names => auth_names,
|
346
|
+
:return_type => 'String')
|
347
|
+
if @api_client.config.debugging
|
348
|
+
@api_client.config.logger.debug "API called: WordsApi#words_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
349
|
+
end
|
350
|
+
return data, status_code, headers
|
351
|
+
end
|
352
|
+
|
353
|
+
# Returns all pronounts in string
|
354
|
+
# Returns all pronouns in the input string
|
355
|
+
# @param input Input string
|
356
|
+
# @param [Hash] opts the optional parameters
|
357
|
+
# @return [String]
|
358
|
+
def words_pronouns(input, opts = {})
|
359
|
+
data, _status_code, _headers = words_pronouns_with_http_info(input, opts)
|
360
|
+
return data
|
361
|
+
end
|
362
|
+
|
363
|
+
# Returns all pronounts in string
|
364
|
+
# Returns all pronouns in the input string
|
365
|
+
# @param input Input string
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
368
|
+
def words_pronouns_with_http_info(input, opts = {})
|
369
|
+
if @api_client.config.debugging
|
370
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_pronouns ..."
|
371
|
+
end
|
372
|
+
# verify the required parameter 'input' is set
|
373
|
+
if @api_client.config.client_side_validation && input.nil?
|
374
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_pronouns"
|
375
|
+
end
|
376
|
+
# resource path
|
377
|
+
local_var_path = "/nlp/get/words/pronouns/string"
|
378
|
+
|
379
|
+
# query parameters
|
380
|
+
query_params = {}
|
381
|
+
|
382
|
+
# header parameters
|
383
|
+
header_params = {}
|
384
|
+
# HTTP header 'Accept' (if needed)
|
385
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
386
|
+
# HTTP header 'Content-Type'
|
387
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
388
|
+
|
389
|
+
# form parameters
|
390
|
+
form_params = {}
|
391
|
+
|
392
|
+
# http body (model)
|
393
|
+
post_body = @api_client.object_to_http_body(input)
|
394
|
+
auth_names = ['Apikey']
|
395
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
396
|
+
:header_params => header_params,
|
397
|
+
:query_params => query_params,
|
398
|
+
:form_params => form_params,
|
399
|
+
:body => post_body,
|
400
|
+
:auth_names => auth_names,
|
401
|
+
:return_type => 'String')
|
402
|
+
if @api_client.config.debugging
|
403
|
+
@api_client.config.logger.debug "API called: WordsApi#words_pronouns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
404
|
+
end
|
405
|
+
return data, status_code, headers
|
406
|
+
end
|
407
|
+
|
408
|
+
# Get proper nouns in a string
|
409
|
+
# Returns all of the proper nouns in a string. Proper nouns are named entities such as \"Hilton\".
|
410
|
+
# @param input Input string
|
411
|
+
# @param [Hash] opts the optional parameters
|
412
|
+
# @return [String]
|
413
|
+
def words_proper_nouns(input, opts = {})
|
414
|
+
data, _status_code, _headers = words_proper_nouns_with_http_info(input, opts)
|
415
|
+
return data
|
416
|
+
end
|
417
|
+
|
418
|
+
# Get proper nouns in a string
|
419
|
+
# Returns all of the proper nouns in a string. Proper nouns are named entities such as \"Hilton\".
|
420
|
+
# @param input Input string
|
421
|
+
# @param [Hash] opts the optional parameters
|
422
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
423
|
+
def words_proper_nouns_with_http_info(input, opts = {})
|
424
|
+
if @api_client.config.debugging
|
425
|
+
@api_client.config.logger.debug "Calling API: WordsApi.words_proper_nouns ..."
|
426
|
+
end
|
427
|
+
# verify the required parameter 'input' is set
|
428
|
+
if @api_client.config.client_side_validation && input.nil?
|
429
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling WordsApi.words_proper_nouns"
|
430
|
+
end
|
431
|
+
# resource path
|
432
|
+
local_var_path = "/nlp/get/words/properNouns/string"
|
433
|
+
|
434
|
+
# query parameters
|
435
|
+
query_params = {}
|
436
|
+
|
437
|
+
# header parameters
|
438
|
+
header_params = {}
|
439
|
+
# HTTP header 'Accept' (if needed)
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
441
|
+
# HTTP header 'Content-Type'
|
442
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
443
|
+
|
444
|
+
# form parameters
|
445
|
+
form_params = {}
|
446
|
+
|
447
|
+
# http body (model)
|
448
|
+
post_body = @api_client.object_to_http_body(input)
|
449
|
+
auth_names = ['Apikey']
|
450
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
451
|
+
:header_params => header_params,
|
452
|
+
:query_params => query_params,
|
453
|
+
:form_params => form_params,
|
454
|
+
:body => post_body,
|
455
|
+
:auth_names => auth_names,
|
456
|
+
:return_type => 'String')
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug "API called: WordsApi#words_proper_nouns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
459
|
+
end
|
460
|
+
return data, status_code, headers
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|