cloudmersive-nlp-api-client 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 472b8b5e390d99dc11041638db86957ea823d9ded3df7bca25e6ae8b8e00683b
|
4
|
+
data.tar.gz: 65dec04e143972cc66c6a874388bda1e39c86d0cbe2baf47add69acf3e0f5360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcc590c78e866b975d66a25bf2f38a88b19ef8b7aa7e0602eeafd24b8ac5be43d3fa41c91f32c68193cde3e9cf94aac5eaa2e9fc23b50072d3e41d51d183d9ea
|
7
|
+
data.tar.gz: 5f368075985441c467652a5e49ef92fd2c3f7d9078b0437b06a9bba8c7d78611694aa19835a86d903a6277280d3d884e2eaf53bd27a3daebd661fedd722489bd
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ The powerful Natural Language Processing APIs (v2) let you perform part of speec
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 2.0.
|
10
|
+
- Package version: 2.0.4
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-nlp-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-nlp-api-client-2.0.
|
26
|
+
gem install ./cloudmersive-nlp-api-client-2.0.4.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.4.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-nlp-api-client', '~> 2.0.
|
34
|
+
gem 'cloudmersive-nlp-api-client', '~> 2.0.4'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -87,6 +87,8 @@ Class | Method | HTTP request | Description
|
|
87
87
|
*CloudmersiveNlpApiClient::LanguageDetectionApi* | [**language_detection_get_language**](docs/LanguageDetectionApi.md#language_detection_get_language) | **POST** /nlp-v2/language/detect | Detect language of text
|
88
88
|
*CloudmersiveNlpApiClient::LanguageTranslationApi* | [**language_translation_translate_deu_to_eng**](docs/LanguageTranslationApi.md#language_translation_translate_deu_to_eng) | **POST** /nlp-v2/translate/language/deu/to/eng | Translate German to English text with Deep Learning AI
|
89
89
|
*CloudmersiveNlpApiClient::LanguageTranslationApi* | [**language_translation_translate_eng_to_deu**](docs/LanguageTranslationApi.md#language_translation_translate_eng_to_deu) | **POST** /nlp-v2/translate/language/eng/to/deu | Translate English to German text with Deep Learning AI
|
90
|
+
*CloudmersiveNlpApiClient::LanguageTranslationApi* | [**language_translation_translate_eng_to_rus**](docs/LanguageTranslationApi.md#language_translation_translate_eng_to_rus) | **POST** /nlp-v2/translate/language/eng/to/rus | Translate English to Russian text with Deep Learning AI
|
91
|
+
*CloudmersiveNlpApiClient::LanguageTranslationApi* | [**language_translation_translate_rus_to_eng**](docs/LanguageTranslationApi.md#language_translation_translate_rus_to_eng) | **POST** /nlp-v2/translate/language/rus/to/eng | Translate Russian to English text with Deep Learning AI
|
90
92
|
*CloudmersiveNlpApiClient::ParseApi* | [**parse_parse_string**](docs/ParseApi.md#parse_parse_string) | **POST** /nlp-v2/parse/tree | Parse string to syntax tree
|
91
93
|
*CloudmersiveNlpApiClient::PosTaggerApi* | [**pos_tagger_tag_adjectives**](docs/PosTaggerApi.md#pos_tagger_tag_adjectives) | **POST** /nlp-v2/pos/tag/adjectives | Part-of-speech tag a string, filter to adjectives
|
92
94
|
*CloudmersiveNlpApiClient::PosTaggerApi* | [**pos_tagger_tag_adverbs**](docs/PosTaggerApi.md#pos_tagger_tag_adverbs) | **POST** /nlp-v2/pos/tag/adverbs | Part-of-speech tag a string, filter to adverbs
|
@@ -6,6 +6,8 @@ Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**language_translation_translate_deu_to_eng**](LanguageTranslationApi.md#language_translation_translate_deu_to_eng) | **POST** /nlp-v2/translate/language/deu/to/eng | Translate German to English text with Deep Learning AI
|
8
8
|
[**language_translation_translate_eng_to_deu**](LanguageTranslationApi.md#language_translation_translate_eng_to_deu) | **POST** /nlp-v2/translate/language/eng/to/deu | Translate English to German text with Deep Learning AI
|
9
|
+
[**language_translation_translate_eng_to_rus**](LanguageTranslationApi.md#language_translation_translate_eng_to_rus) | **POST** /nlp-v2/translate/language/eng/to/rus | Translate English to Russian text with Deep Learning AI
|
10
|
+
[**language_translation_translate_rus_to_eng**](LanguageTranslationApi.md#language_translation_translate_rus_to_eng) | **POST** /nlp-v2/translate/language/rus/to/eng | Translate Russian to English text with Deep Learning AI
|
9
11
|
|
10
12
|
|
11
13
|
# **language_translation_translate_deu_to_eng**
|
@@ -116,3 +118,111 @@ Name | Type | Description | Notes
|
|
116
118
|
|
117
119
|
|
118
120
|
|
121
|
+
# **language_translation_translate_eng_to_rus**
|
122
|
+
> LanguageTranslationResponse language_translation_translate_eng_to_rus(input)
|
123
|
+
|
124
|
+
Translate English to Russian text with Deep Learning AI
|
125
|
+
|
126
|
+
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.
|
127
|
+
|
128
|
+
### Example
|
129
|
+
```ruby
|
130
|
+
# load the gem
|
131
|
+
require 'cloudmersive-nlp-api-client'
|
132
|
+
# setup authorization
|
133
|
+
CloudmersiveNlpApiClient.configure do |config|
|
134
|
+
# Configure API key authorization: Apikey
|
135
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
136
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
137
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
138
|
+
end
|
139
|
+
|
140
|
+
api_instance = CloudmersiveNlpApiClient::LanguageTranslationApi.new
|
141
|
+
|
142
|
+
input = CloudmersiveNlpApiClient::LanguageTranslationRequest.new # LanguageTranslationRequest | Input translation request
|
143
|
+
|
144
|
+
|
145
|
+
begin
|
146
|
+
#Translate English to Russian text with Deep Learning AI
|
147
|
+
result = api_instance.language_translation_translate_eng_to_rus(input)
|
148
|
+
p result
|
149
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
150
|
+
puts "Exception when calling LanguageTranslationApi->language_translation_translate_eng_to_rus: #{e}"
|
151
|
+
end
|
152
|
+
```
|
153
|
+
|
154
|
+
### Parameters
|
155
|
+
|
156
|
+
Name | Type | Description | Notes
|
157
|
+
------------- | ------------- | ------------- | -------------
|
158
|
+
**input** | [**LanguageTranslationRequest**](LanguageTranslationRequest.md)| Input translation request |
|
159
|
+
|
160
|
+
### Return type
|
161
|
+
|
162
|
+
[**LanguageTranslationResponse**](LanguageTranslationResponse.md)
|
163
|
+
|
164
|
+
### Authorization
|
165
|
+
|
166
|
+
[Apikey](../README.md#Apikey)
|
167
|
+
|
168
|
+
### HTTP request headers
|
169
|
+
|
170
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
171
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
# **language_translation_translate_rus_to_eng**
|
176
|
+
> LanguageTranslationResponse language_translation_translate_rus_to_eng(input)
|
177
|
+
|
178
|
+
Translate Russian to English text with Deep Learning AI
|
179
|
+
|
180
|
+
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.
|
181
|
+
|
182
|
+
### Example
|
183
|
+
```ruby
|
184
|
+
# load the gem
|
185
|
+
require 'cloudmersive-nlp-api-client'
|
186
|
+
# setup authorization
|
187
|
+
CloudmersiveNlpApiClient.configure do |config|
|
188
|
+
# Configure API key authorization: Apikey
|
189
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
190
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
191
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
192
|
+
end
|
193
|
+
|
194
|
+
api_instance = CloudmersiveNlpApiClient::LanguageTranslationApi.new
|
195
|
+
|
196
|
+
input = CloudmersiveNlpApiClient::LanguageTranslationRequest.new # LanguageTranslationRequest | Input translation request
|
197
|
+
|
198
|
+
|
199
|
+
begin
|
200
|
+
#Translate Russian to English text with Deep Learning AI
|
201
|
+
result = api_instance.language_translation_translate_rus_to_eng(input)
|
202
|
+
p result
|
203
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
204
|
+
puts "Exception when calling LanguageTranslationApi->language_translation_translate_rus_to_eng: #{e}"
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
### Parameters
|
209
|
+
|
210
|
+
Name | Type | Description | Notes
|
211
|
+
------------- | ------------- | ------------- | -------------
|
212
|
+
**input** | [**LanguageTranslationRequest**](LanguageTranslationRequest.md)| Input translation request |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
[**LanguageTranslationResponse**](LanguageTranslationResponse.md)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[Apikey](../README.md#Apikey)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
225
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
226
|
+
|
227
|
+
|
228
|
+
|
@@ -129,5 +129,115 @@ module CloudmersiveNlpApiClient
|
|
129
129
|
end
|
130
130
|
return data, status_code, headers
|
131
131
|
end
|
132
|
+
|
133
|
+
# Translate English to Russian text with Deep Learning AI
|
134
|
+
# 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
|
+
# @param input Input translation request
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [LanguageTranslationResponse]
|
138
|
+
def language_translation_translate_eng_to_rus(input, opts = {})
|
139
|
+
data, _status_code, _headers = language_translation_translate_eng_to_rus_with_http_info(input, opts)
|
140
|
+
return data
|
141
|
+
end
|
142
|
+
|
143
|
+
# Translate English to Russian text with Deep Learning AI
|
144
|
+
# 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.
|
145
|
+
# @param input Input translation request
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
|
148
|
+
def language_translation_translate_eng_to_rus_with_http_info(input, opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_eng_to_rus ..."
|
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 LanguageTranslationApi.language_translation_translate_eng_to_rus"
|
155
|
+
end
|
156
|
+
# resource path
|
157
|
+
local_var_path = "/nlp-v2/translate/language/eng/to/rus"
|
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 => 'LanguageTranslationResponse')
|
182
|
+
if @api_client.config.debugging
|
183
|
+
@api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_eng_to_rus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
+
end
|
185
|
+
return data, status_code, headers
|
186
|
+
end
|
187
|
+
|
188
|
+
# Translate Russian to English text with Deep Learning AI
|
189
|
+
# 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
|
+
# @param input Input translation request
|
191
|
+
# @param [Hash] opts the optional parameters
|
192
|
+
# @return [LanguageTranslationResponse]
|
193
|
+
def language_translation_translate_rus_to_eng(input, opts = {})
|
194
|
+
data, _status_code, _headers = language_translation_translate_rus_to_eng_with_http_info(input, opts)
|
195
|
+
return data
|
196
|
+
end
|
197
|
+
|
198
|
+
# Translate Russian to English text with Deep Learning AI
|
199
|
+
# 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.
|
200
|
+
# @param input Input translation request
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
|
203
|
+
def language_translation_translate_rus_to_eng_with_http_info(input, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_rus_to_eng ..."
|
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 LanguageTranslationApi.language_translation_translate_rus_to_eng"
|
210
|
+
end
|
211
|
+
# resource path
|
212
|
+
local_var_path = "/nlp-v2/translate/language/rus/to/eng"
|
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 => 'LanguageTranslationResponse')
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_rus_to_eng\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
return data, status_code, headers
|
241
|
+
end
|
132
242
|
end
|
133
243
|
end
|
@@ -56,4 +56,28 @@ describe 'LanguageTranslationApi' do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
# unit tests for language_translation_translate_eng_to_rus
|
60
|
+
# Translate English to Russian text with Deep Learning AI
|
61
|
+
# 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.
|
62
|
+
# @param input Input translation request
|
63
|
+
# @param [Hash] opts the optional parameters
|
64
|
+
# @return [LanguageTranslationResponse]
|
65
|
+
describe 'language_translation_translate_eng_to_rus test' do
|
66
|
+
it "should work" do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# unit tests for language_translation_translate_rus_to_eng
|
72
|
+
# Translate Russian to English text with Deep Learning AI
|
73
|
+
# 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.
|
74
|
+
# @param input Input translation request
|
75
|
+
# @param [Hash] opts the optional parameters
|
76
|
+
# @return [LanguageTranslationResponse]
|
77
|
+
describe 'language_translation_translate_rus_to_eng test' do
|
78
|
+
it "should work" do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
59
83
|
end
|