cloudmersive-nlp-api-client 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -4
  3. data/docs/LanguageTranslationApi.md +118 -0
  4. data/docs/LanguageTranslationRequest.md +8 -0
  5. data/docs/LanguageTranslationResponse.md +10 -0
  6. data/docs/RephraseApi.md +63 -0
  7. data/docs/RephraseRequest.md +9 -0
  8. data/docs/RephraseResponse.md +10 -0
  9. data/docs/RephrasedSentence.md +10 -0
  10. data/docs/RephrasedSentenceOption.md +9 -0
  11. data/lib/cloudmersive-nlp-api-client.rb +8 -0
  12. data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +133 -0
  13. data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +78 -0
  14. data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +189 -0
  15. data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +209 -0
  16. data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +199 -0
  17. data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +211 -0
  18. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +211 -0
  19. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +199 -0
  20. data/lib/cloudmersive-nlp-api-client/version.rb +1 -1
  21. data/spec/api/language_translation_api_spec.rb +59 -0
  22. data/spec/api/rephrase_api_spec.rb +47 -0
  23. data/spec/models/language_translation_request_spec.rb +42 -0
  24. data/spec/models/language_translation_response_spec.rb +54 -0
  25. data/spec/models/rephrase_request_spec.rb +48 -0
  26. data/spec/models/rephrase_response_spec.rb +54 -0
  27. data/spec/models/rephrased_sentence_option_spec.rb +48 -0
  28. data/spec/models/rephrased_sentence_spec.rb +54 -0
  29. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c51cb5bde44ae5e1cf4d2cae634dd689cb8dbddea01b3877860740a1efc16d58
4
- data.tar.gz: 572e3ae48bca5d68026287ec00998bf3129fd62e5cdd25d9be57c3a7eb4c8cce
3
+ metadata.gz: 054ef1c5cca75a3e15e49c58e5921526f190f03d034ed9c8615a4cb065489cac
4
+ data.tar.gz: 2491feae480444e05ad6c75aaee05d118e7a3bacfb037f10625c15da5f830e4d
5
5
  SHA512:
6
- metadata.gz: 7f7535a698329b17999f43484b160458b7ba27a0a2de996cf4f53dcd1730e76a8fc648bab190f4f827c50a2ad63919be72771da2cb1e2340169d1cfcd1c25083
7
- data.tar.gz: 51c86e5b0f7a3f900884373f4c3678351397c93e93ad21c34c82d91da87dca37f7ad5d85e9ffa221181f28b189600d205154dce0e79b86155d9d77e4bf803f29
6
+ metadata.gz: 17e62640bb15b8f3cc78b4ae40e2d14e526abd6400df7f94a85b30c8aa980736a403369aded905ae940b605b769354f02107e089355d9faeaef56da13d8697e9
7
+ data.tar.gz: b7d11d1191c325daed65e82890d0272e21bcc02739f4492ad8245cfcd856d67683fe9338bdf55d24326e7080439c8859293e64747c8d4a52d6a44663e6b8fbd8
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.2
10
+ - Package version: 2.0.3
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.2.gem
26
+ gem install ./cloudmersive-nlp-api-client-2.0.3.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.2.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.3.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.2'
34
+ gem 'cloudmersive-nlp-api-client', '~> 2.0.3'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -85,6 +85,8 @@ Class | Method | HTTP request | Description
85
85
  ------------ | ------------- | ------------- | -------------
86
86
  *CloudmersiveNlpApiClient::ExtractEntitiesApi* | [**extract_entities_post**](docs/ExtractEntitiesApi.md#extract_entities_post) | **POST** /nlp-v2/extract-entities | Extract entities from string
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
+ *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
+ *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
88
90
  *CloudmersiveNlpApiClient::ParseApi* | [**parse_parse_string**](docs/ParseApi.md#parse_parse_string) | **POST** /nlp-v2/parse/tree | Parse string to syntax tree
89
91
  *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
90
92
  *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
@@ -92,6 +94,7 @@ Class | Method | HTTP request | Description
92
94
  *CloudmersiveNlpApiClient::PosTaggerApi* | [**pos_tagger_tag_pronouns**](docs/PosTaggerApi.md#pos_tagger_tag_pronouns) | **POST** /nlp-v2/pos/tag/pronouns | Part-of-speech tag a string, filter to pronouns
93
95
  *CloudmersiveNlpApiClient::PosTaggerApi* | [**pos_tagger_tag_sentence**](docs/PosTaggerApi.md#pos_tagger_tag_sentence) | **POST** /nlp-v2/pos/tag/sentence | Part-of-speech tag a string
94
96
  *CloudmersiveNlpApiClient::PosTaggerApi* | [**pos_tagger_tag_verbs**](docs/PosTaggerApi.md#pos_tagger_tag_verbs) | **POST** /nlp-v2/pos/tag/verbs | Part-of-speech tag a string, filter to verbs
97
+ *CloudmersiveNlpApiClient::RephraseApi* | [**rephrase_translate_deu_to_eng**](docs/RephraseApi.md#rephrase_translate_deu_to_eng) | **POST** /nlp-v2/rephrase/rephrase/eng/by-sentence | Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
95
98
  *CloudmersiveNlpApiClient::SegmentationApi* | [**segmentation_get_sentences**](docs/SegmentationApi.md#segmentation_get_sentences) | **POST** /nlp-v2/segmentation/sentences | Extract sentences from string
96
99
  *CloudmersiveNlpApiClient::SegmentationApi* | [**segmentation_get_words**](docs/SegmentationApi.md#segmentation_get_words) | **POST** /nlp-v2/segmentation/words | Get words in input string
97
100
  *CloudmersiveNlpApiClient::SpellcheckApi* | [**spellcheck_check_sentence**](docs/SpellcheckApi.md#spellcheck_check_sentence) | **POST** /nlp-v2/spellcheck/check/sentence | Check if sentence is spelled correctly
@@ -112,12 +115,18 @@ Class | Method | HTTP request | Description
112
115
  - [CloudmersiveNlpApiClient::GetWordsResponse](docs/GetWordsResponse.md)
113
116
  - [CloudmersiveNlpApiClient::LanguageDetectionRequest](docs/LanguageDetectionRequest.md)
114
117
  - [CloudmersiveNlpApiClient::LanguageDetectionResponse](docs/LanguageDetectionResponse.md)
118
+ - [CloudmersiveNlpApiClient::LanguageTranslationRequest](docs/LanguageTranslationRequest.md)
119
+ - [CloudmersiveNlpApiClient::LanguageTranslationResponse](docs/LanguageTranslationResponse.md)
115
120
  - [CloudmersiveNlpApiClient::ParseRequest](docs/ParseRequest.md)
116
121
  - [CloudmersiveNlpApiClient::ParseResponse](docs/ParseResponse.md)
117
122
  - [CloudmersiveNlpApiClient::PosRequest](docs/PosRequest.md)
118
123
  - [CloudmersiveNlpApiClient::PosResponse](docs/PosResponse.md)
119
124
  - [CloudmersiveNlpApiClient::PosSentence](docs/PosSentence.md)
120
125
  - [CloudmersiveNlpApiClient::PosTaggedWord](docs/PosTaggedWord.md)
126
+ - [CloudmersiveNlpApiClient::RephraseRequest](docs/RephraseRequest.md)
127
+ - [CloudmersiveNlpApiClient::RephraseResponse](docs/RephraseResponse.md)
128
+ - [CloudmersiveNlpApiClient::RephrasedSentence](docs/RephrasedSentence.md)
129
+ - [CloudmersiveNlpApiClient::RephrasedSentenceOption](docs/RephrasedSentenceOption.md)
121
130
  - [CloudmersiveNlpApiClient::SentenceSegmentationRequest](docs/SentenceSegmentationRequest.md)
122
131
  - [CloudmersiveNlpApiClient::SentenceSegmentationResponse](docs/SentenceSegmentationResponse.md)
123
132
  - [CloudmersiveNlpApiClient::WordPosition](docs/WordPosition.md)
@@ -0,0 +1,118 @@
1
+ # CloudmersiveNlpApiClient::LanguageTranslationApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
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
+ [**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
+
10
+
11
+ # **language_translation_translate_deu_to_eng**
12
+ > LanguageTranslationResponse language_translation_translate_deu_to_eng(input)
13
+
14
+ Translate German to English text with Deep Learning AI
15
+
16
+ Automatically translates input text in German to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'cloudmersive-nlp-api-client'
22
+ # setup authorization
23
+ CloudmersiveNlpApiClient.configure do |config|
24
+ # Configure API key authorization: Apikey
25
+ config.api_key['Apikey'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Apikey'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = CloudmersiveNlpApiClient::LanguageTranslationApi.new
31
+
32
+ input = CloudmersiveNlpApiClient::LanguageTranslationRequest.new # LanguageTranslationRequest | Input translation request
33
+
34
+
35
+ begin
36
+ #Translate German to English text with Deep Learning AI
37
+ result = api_instance.language_translation_translate_deu_to_eng(input)
38
+ p result
39
+ rescue CloudmersiveNlpApiClient::ApiError => e
40
+ puts "Exception when calling LanguageTranslationApi->language_translation_translate_deu_to_eng: #{e}"
41
+ end
42
+ ```
43
+
44
+ ### Parameters
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **input** | [**LanguageTranslationRequest**](LanguageTranslationRequest.md)| Input translation request |
49
+
50
+ ### Return type
51
+
52
+ [**LanguageTranslationResponse**](LanguageTranslationResponse.md)
53
+
54
+ ### Authorization
55
+
56
+ [Apikey](../README.md#Apikey)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
61
+ - **Accept**: application/json, text/json, application/xml, text/xml
62
+
63
+
64
+
65
+ # **language_translation_translate_eng_to_deu**
66
+ > LanguageTranslationResponse language_translation_translate_eng_to_deu(input)
67
+
68
+ Translate English to German text with Deep Learning AI
69
+
70
+ Automatically translates input text in English to output text in German using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
71
+
72
+ ### Example
73
+ ```ruby
74
+ # load the gem
75
+ require 'cloudmersive-nlp-api-client'
76
+ # setup authorization
77
+ CloudmersiveNlpApiClient.configure do |config|
78
+ # Configure API key authorization: Apikey
79
+ config.api_key['Apikey'] = 'YOUR API KEY'
80
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
81
+ #config.api_key_prefix['Apikey'] = 'Bearer'
82
+ end
83
+
84
+ api_instance = CloudmersiveNlpApiClient::LanguageTranslationApi.new
85
+
86
+ input = CloudmersiveNlpApiClient::LanguageTranslationRequest.new # LanguageTranslationRequest | Input translation request
87
+
88
+
89
+ begin
90
+ #Translate English to German text with Deep Learning AI
91
+ result = api_instance.language_translation_translate_eng_to_deu(input)
92
+ p result
93
+ rescue CloudmersiveNlpApiClient::ApiError => e
94
+ puts "Exception when calling LanguageTranslationApi->language_translation_translate_eng_to_deu: #{e}"
95
+ end
96
+ ```
97
+
98
+ ### Parameters
99
+
100
+ Name | Type | Description | Notes
101
+ ------------- | ------------- | ------------- | -------------
102
+ **input** | [**LanguageTranslationRequest**](LanguageTranslationRequest.md)| Input translation request |
103
+
104
+ ### Return type
105
+
106
+ [**LanguageTranslationResponse**](LanguageTranslationResponse.md)
107
+
108
+ ### Authorization
109
+
110
+ [Apikey](../README.md#Apikey)
111
+
112
+ ### HTTP request headers
113
+
114
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
115
+ - **Accept**: application/json, text/json, application/xml, text/xml
116
+
117
+
118
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveNlpApiClient::LanguageTranslationRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **text_to_translate** | **String** | Text to translate | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveNlpApiClient::LanguageTranslationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the language detection operation was successful, false otherwise | [optional]
7
+ **translated_text_result** | **String** | Translated text in target language | [optional]
8
+ **sentence_count** | **Integer** | Number of sentences in input text | [optional]
9
+
10
+
@@ -0,0 +1,63 @@
1
+ # CloudmersiveNlpApiClient::RephraseApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**rephrase_translate_deu_to_eng**](RephraseApi.md#rephrase_translate_deu_to_eng) | **POST** /nlp-v2/rephrase/rephrase/eng/by-sentence | Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
8
+
9
+
10
+ # **rephrase_translate_deu_to_eng**
11
+ > RephraseResponse rephrase_translate_deu_to_eng(input)
12
+
13
+ Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
14
+
15
+ 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.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'cloudmersive-nlp-api-client'
21
+ # setup authorization
22
+ CloudmersiveNlpApiClient.configure do |config|
23
+ # Configure API key authorization: Apikey
24
+ config.api_key['Apikey'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['Apikey'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = CloudmersiveNlpApiClient::RephraseApi.new
30
+
31
+ input = CloudmersiveNlpApiClient::RephraseRequest.new # RephraseRequest | Input rephrase request
32
+
33
+
34
+ begin
35
+ #Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
36
+ result = api_instance.rephrase_translate_deu_to_eng(input)
37
+ p result
38
+ rescue CloudmersiveNlpApiClient::ApiError => e
39
+ puts "Exception when calling RephraseApi->rephrase_translate_deu_to_eng: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **input** | [**RephraseRequest**](RephraseRequest.md)| Input rephrase request |
48
+
49
+ ### Return type
50
+
51
+ [**RephraseResponse**](RephraseResponse.md)
52
+
53
+ ### Authorization
54
+
55
+ [Apikey](../README.md#Apikey)
56
+
57
+ ### HTTP request headers
58
+
59
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
60
+ - **Accept**: application/json, text/json, application/xml, text/xml
61
+
62
+
63
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveNlpApiClient::RephraseRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **text_to_translate** | **String** | Text to rephrase | [optional]
7
+ **target_rephrasing_count** | **Integer** | The number of rephrasing output options you would like per sentence; possible values are 1 to 10. Default is 2. | [optional]
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveNlpApiClient::RephraseResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the language detection operation was successful, false otherwise | [optional]
7
+ **rephrased_results** | [**Array<RephrasedSentence>**](RephrasedSentence.md) | Results of the rephrasing, paraphrasing operation, in the order of the input sentences | [optional]
8
+ **sentence_count** | **Integer** | Number of sentences in input text | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveNlpApiClient::RephrasedSentence
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **sentence_index** | **Integer** | Index of the sentence, 1-based, ordered | [optional]
7
+ **original_sentence_text** | **String** | Original input sentence text | [optional]
8
+ **rephrasings** | [**Array<RephrasedSentenceOption>**](RephrasedSentenceOption.md) | Rephrasing text options, candidates of the original input sentence, in order - with best candidate first | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveNlpApiClient::RephrasedSentenceOption
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **rephrased_option_index** | **Integer** | Ordered index of the rephrasing option, 1-based, with 1 being the best option | [optional]
7
+ **rephrased_sentence_text** | **String** | One sentence of output rephrased text of original input sentence | [optional]
8
+
9
+
@@ -29,12 +29,18 @@ require 'cloudmersive-nlp-api-client/models/get_words_request'
29
29
  require 'cloudmersive-nlp-api-client/models/get_words_response'
30
30
  require 'cloudmersive-nlp-api-client/models/language_detection_request'
31
31
  require 'cloudmersive-nlp-api-client/models/language_detection_response'
32
+ require 'cloudmersive-nlp-api-client/models/language_translation_request'
33
+ require 'cloudmersive-nlp-api-client/models/language_translation_response'
32
34
  require 'cloudmersive-nlp-api-client/models/parse_request'
33
35
  require 'cloudmersive-nlp-api-client/models/parse_response'
34
36
  require 'cloudmersive-nlp-api-client/models/pos_request'
35
37
  require 'cloudmersive-nlp-api-client/models/pos_response'
36
38
  require 'cloudmersive-nlp-api-client/models/pos_sentence'
37
39
  require 'cloudmersive-nlp-api-client/models/pos_tagged_word'
40
+ require 'cloudmersive-nlp-api-client/models/rephrase_request'
41
+ require 'cloudmersive-nlp-api-client/models/rephrase_response'
42
+ require 'cloudmersive-nlp-api-client/models/rephrased_sentence'
43
+ require 'cloudmersive-nlp-api-client/models/rephrased_sentence_option'
38
44
  require 'cloudmersive-nlp-api-client/models/sentence_segmentation_request'
39
45
  require 'cloudmersive-nlp-api-client/models/sentence_segmentation_response'
40
46
  require 'cloudmersive-nlp-api-client/models/word_position'
@@ -42,8 +48,10 @@ require 'cloudmersive-nlp-api-client/models/word_position'
42
48
  # APIs
43
49
  require 'cloudmersive-nlp-api-client/api/extract_entities_api'
44
50
  require 'cloudmersive-nlp-api-client/api/language_detection_api'
51
+ require 'cloudmersive-nlp-api-client/api/language_translation_api'
45
52
  require 'cloudmersive-nlp-api-client/api/parse_api'
46
53
  require 'cloudmersive-nlp-api-client/api/pos_tagger_api'
54
+ require 'cloudmersive-nlp-api-client/api/rephrase_api'
47
55
  require 'cloudmersive-nlp-api-client/api/segmentation_api'
48
56
  require 'cloudmersive-nlp-api-client/api/spellcheck_api'
49
57
 
@@ -0,0 +1,133 @@
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.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class LanguageTranslationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Translate German to English text with Deep Learning AI
24
+ # Automatically translates input text in German to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
25
+ # @param input Input translation request
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [LanguageTranslationResponse]
28
+ def language_translation_translate_deu_to_eng(input, opts = {})
29
+ data, _status_code, _headers = language_translation_translate_deu_to_eng_with_http_info(input, opts)
30
+ return data
31
+ end
32
+
33
+ # Translate German to English text with Deep Learning AI
34
+ # Automatically translates input text in German to output text in English using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
35
+ # @param input Input translation request
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
38
+ def language_translation_translate_deu_to_eng_with_http_info(input, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_deu_to_eng ..."
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 LanguageTranslationApi.language_translation_translate_deu_to_eng"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp-v2/translate/language/deu/to/eng"
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 => 'LanguageTranslationResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_deu_to_eng\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Translate English to German text with Deep Learning AI
79
+ # Automatically translates input text in English to output text in German using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
80
+ # @param input Input translation request
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [LanguageTranslationResponse]
83
+ def language_translation_translate_eng_to_deu(input, opts = {})
84
+ data, _status_code, _headers = language_translation_translate_eng_to_deu_with_http_info(input, opts)
85
+ return data
86
+ end
87
+
88
+ # Translate English to German text with Deep Learning AI
89
+ # Automatically translates input text in English to output text in German using advanced Deep Learning and Neural NLP. Consumes 1-2 API calls per input sentence.
90
+ # @param input Input translation request
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(LanguageTranslationResponse, Fixnum, Hash)>] LanguageTranslationResponse data, response status code and response headers
93
+ def language_translation_translate_eng_to_deu_with_http_info(input, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "Calling API: LanguageTranslationApi.language_translation_translate_eng_to_deu ..."
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 LanguageTranslationApi.language_translation_translate_eng_to_deu"
100
+ end
101
+ # resource path
102
+ local_var_path = "/nlp-v2/translate/language/eng/to/deu"
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 => 'LanguageTranslationResponse')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: LanguageTranslationApi#language_translation_translate_eng_to_deu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ end
133
+ end