cloudmersive-nlp-api-client 2.0.5 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -130
  3. data/Gemfile +0 -7
  4. data/README.md +0 -148
  5. data/Rakefile +0 -8
  6. data/cloudmersive-nlp-api-client.gemspec +0 -45
  7. data/docs/AnalyticsApi.md +0 -63
  8. data/docs/CheckSentenceRequest.md +0 -8
  9. data/docs/CheckSentenceResponse.md +0 -9
  10. data/docs/CheckWordRequest.md +0 -8
  11. data/docs/CheckWordResponse.md +0 -9
  12. data/docs/CorrectWordInSentence.md +0 -10
  13. data/docs/Entity.md +0 -9
  14. data/docs/ExtractEntitiesApi.md +0 -63
  15. data/docs/ExtractEntitiesRequest.md +0 -8
  16. data/docs/ExtractEntitiesResponse.md +0 -9
  17. data/docs/GetWordsRequest.md +0 -8
  18. data/docs/GetWordsResponse.md +0 -8
  19. data/docs/LanguageDetectionApi.md +0 -63
  20. data/docs/LanguageDetectionRequest.md +0 -8
  21. data/docs/LanguageDetectionResponse.md +0 -10
  22. data/docs/LanguageTranslationApi.md +0 -228
  23. data/docs/LanguageTranslationRequest.md +0 -8
  24. data/docs/LanguageTranslationResponse.md +0 -10
  25. data/docs/ParseApi.md +0 -63
  26. data/docs/ParseRequest.md +0 -8
  27. data/docs/ParseResponse.md +0 -8
  28. data/docs/PosRequest.md +0 -8
  29. data/docs/PosResponse.md +0 -8
  30. data/docs/PosSentence.md +0 -8
  31. data/docs/PosTaggedWord.md +0 -9
  32. data/docs/PosTaggerApi.md +0 -338
  33. data/docs/RephraseApi.md +0 -63
  34. data/docs/RephraseRequest.md +0 -9
  35. data/docs/RephraseResponse.md +0 -10
  36. data/docs/RephrasedSentence.md +0 -10
  37. data/docs/RephrasedSentenceOption.md +0 -9
  38. data/docs/SegmentationApi.md +0 -118
  39. data/docs/SentenceSegmentationRequest.md +0 -8
  40. data/docs/SentenceSegmentationResponse.md +0 -10
  41. data/docs/SentimentAnalysisRequest.md +0 -8
  42. data/docs/SentimentAnalysisResponse.md +0 -11
  43. data/docs/SpellcheckApi.md +0 -118
  44. data/docs/WordPosition.md +0 -11
  45. data/git_push.sh +0 -55
  46. data/lib/cloudmersive-nlp-api-client.rb +0 -77
  47. data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +0 -78
  48. data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +0 -78
  49. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +0 -78
  50. data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +0 -243
  51. data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +0 -78
  52. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +0 -353
  53. data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +0 -78
  54. data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +0 -133
  55. data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +0 -133
  56. data/lib/cloudmersive-nlp-api-client/api_client.rb +0 -389
  57. data/lib/cloudmersive-nlp-api-client/api_error.rb +0 -38
  58. data/lib/cloudmersive-nlp-api-client/configuration.rb +0 -209
  59. data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +0 -189
  60. data/lib/cloudmersive-nlp-api-client/models/check_sentence_response.rb +0 -201
  61. data/lib/cloudmersive-nlp-api-client/models/check_word_request.rb +0 -188
  62. data/lib/cloudmersive-nlp-api-client/models/check_word_response.rb +0 -201
  63. data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence.rb +0 -211
  64. data/lib/cloudmersive-nlp-api-client/models/entity.rb +0 -197
  65. data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +0 -189
  66. data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +0 -200
  67. data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +0 -188
  68. data/lib/cloudmersive-nlp-api-client/models/get_words_response.rb +0 -191
  69. data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +0 -189
  70. data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +0 -209
  71. data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +0 -189
  72. data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +0 -209
  73. data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +0 -189
  74. data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +0 -189
  75. data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +0 -189
  76. data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +0 -191
  77. data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +0 -191
  78. data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +0 -199
  79. data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +0 -199
  80. data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +0 -211
  81. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +0 -211
  82. data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +0 -199
  83. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +0 -188
  84. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +0 -208
  85. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +0 -189
  86. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +0 -219
  87. data/lib/cloudmersive-nlp-api-client/models/word_position.rb +0 -219
  88. data/lib/cloudmersive-nlp-api-client/version.rb +0 -15
  89. data/spec/api/analytics_api_spec.rb +0 -47
  90. data/spec/api/extract_entities_api_spec.rb +0 -47
  91. data/spec/api/language_detection_api_spec.rb +0 -47
  92. data/spec/api/language_translation_api_spec.rb +0 -83
  93. data/spec/api/parse_api_spec.rb +0 -47
  94. data/spec/api/pos_tagger_api_spec.rb +0 -107
  95. data/spec/api/rephrase_api_spec.rb +0 -47
  96. data/spec/api/segmentation_api_spec.rb +0 -59
  97. data/spec/api/spellcheck_api_spec.rb +0 -59
  98. data/spec/api_client_spec.rb +0 -226
  99. data/spec/configuration_spec.rb +0 -42
  100. data/spec/models/check_sentence_request_spec.rb +0 -42
  101. data/spec/models/check_sentence_response_spec.rb +0 -48
  102. data/spec/models/check_word_request_spec.rb +0 -42
  103. data/spec/models/check_word_response_spec.rb +0 -48
  104. data/spec/models/correct_word_in_sentence_spec.rb +0 -54
  105. data/spec/models/entity_spec.rb +0 -48
  106. data/spec/models/extract_entities_request_spec.rb +0 -42
  107. data/spec/models/extract_entities_response_spec.rb +0 -48
  108. data/spec/models/get_words_request_spec.rb +0 -42
  109. data/spec/models/get_words_response_spec.rb +0 -42
  110. data/spec/models/language_detection_request_spec.rb +0 -42
  111. data/spec/models/language_detection_response_spec.rb +0 -54
  112. data/spec/models/language_translation_request_spec.rb +0 -42
  113. data/spec/models/language_translation_response_spec.rb +0 -54
  114. data/spec/models/parse_request_spec.rb +0 -42
  115. data/spec/models/parse_response_spec.rb +0 -42
  116. data/spec/models/pos_request_spec.rb +0 -42
  117. data/spec/models/pos_response_spec.rb +0 -42
  118. data/spec/models/pos_sentence_spec.rb +0 -42
  119. data/spec/models/pos_tagged_word_spec.rb +0 -48
  120. data/spec/models/rephrase_request_spec.rb +0 -48
  121. data/spec/models/rephrase_response_spec.rb +0 -54
  122. data/spec/models/rephrased_sentence_option_spec.rb +0 -48
  123. data/spec/models/rephrased_sentence_spec.rb +0 -54
  124. data/spec/models/sentence_segmentation_request_spec.rb +0 -42
  125. data/spec/models/sentence_segmentation_response_spec.rb +0 -54
  126. data/spec/models/sentiment_analysis_request_spec.rb +0 -42
  127. data/spec/models/sentiment_analysis_response_spec.rb +0 -60
  128. data/spec/models/word_position_spec.rb +0 -60
  129. data/spec/spec_helper.rb +0 -111
@@ -1,77 +0,0 @@
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
- # Common files
14
- require 'cloudmersive-nlp-api-client/api_client'
15
- require 'cloudmersive-nlp-api-client/api_error'
16
- require 'cloudmersive-nlp-api-client/version'
17
- require 'cloudmersive-nlp-api-client/configuration'
18
-
19
- # Models
20
- require 'cloudmersive-nlp-api-client/models/check_sentence_request'
21
- require 'cloudmersive-nlp-api-client/models/check_sentence_response'
22
- require 'cloudmersive-nlp-api-client/models/check_word_request'
23
- require 'cloudmersive-nlp-api-client/models/check_word_response'
24
- require 'cloudmersive-nlp-api-client/models/correct_word_in_sentence'
25
- require 'cloudmersive-nlp-api-client/models/entity'
26
- require 'cloudmersive-nlp-api-client/models/extract_entities_request'
27
- require 'cloudmersive-nlp-api-client/models/extract_entities_response'
28
- require 'cloudmersive-nlp-api-client/models/get_words_request'
29
- require 'cloudmersive-nlp-api-client/models/get_words_response'
30
- require 'cloudmersive-nlp-api-client/models/language_detection_request'
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'
34
- require 'cloudmersive-nlp-api-client/models/parse_request'
35
- require 'cloudmersive-nlp-api-client/models/parse_response'
36
- require 'cloudmersive-nlp-api-client/models/pos_request'
37
- require 'cloudmersive-nlp-api-client/models/pos_response'
38
- require 'cloudmersive-nlp-api-client/models/pos_sentence'
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'
44
- require 'cloudmersive-nlp-api-client/models/sentence_segmentation_request'
45
- require 'cloudmersive-nlp-api-client/models/sentence_segmentation_response'
46
- require 'cloudmersive-nlp-api-client/models/sentiment_analysis_request'
47
- require 'cloudmersive-nlp-api-client/models/sentiment_analysis_response'
48
- require 'cloudmersive-nlp-api-client/models/word_position'
49
-
50
- # APIs
51
- require 'cloudmersive-nlp-api-client/api/analytics_api'
52
- require 'cloudmersive-nlp-api-client/api/extract_entities_api'
53
- require 'cloudmersive-nlp-api-client/api/language_detection_api'
54
- require 'cloudmersive-nlp-api-client/api/language_translation_api'
55
- require 'cloudmersive-nlp-api-client/api/parse_api'
56
- require 'cloudmersive-nlp-api-client/api/pos_tagger_api'
57
- require 'cloudmersive-nlp-api-client/api/rephrase_api'
58
- require 'cloudmersive-nlp-api-client/api/segmentation_api'
59
- require 'cloudmersive-nlp-api-client/api/spellcheck_api'
60
-
61
- module CloudmersiveNlpApiClient
62
- class << self
63
- # Customize default settings for the SDK using block.
64
- # CloudmersiveNlpApiClient.configure do |config|
65
- # config.username = "xxx"
66
- # config.password = "xxx"
67
- # end
68
- # If no block given, return the default Configuration object.
69
- def configure
70
- if block_given?
71
- yield(Configuration.default)
72
- else
73
- Configuration.default
74
- end
75
- end
76
- end
77
- end
@@ -1,78 +0,0 @@
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 AnalyticsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Perform Sentiment Analysis and Classification on Text
24
- # Analyze input text using advanced Sentiment Analysis to determine if the input is positive, negative, or neutral. Supports English language input. Consumes 1-2 API calls per sentence.
25
- # @param input Input sentiment analysis request
26
- # @param [Hash] opts the optional parameters
27
- # @return [SentimentAnalysisResponse]
28
- def analytics_sentiment(input, opts = {})
29
- data, _status_code, _headers = analytics_sentiment_with_http_info(input, opts)
30
- return data
31
- end
32
-
33
- # Perform Sentiment Analysis and Classification on Text
34
- # Analyze input text using advanced Sentiment Analysis to determine if the input is positive, negative, or neutral. Supports English language input. Consumes 1-2 API calls per sentence.
35
- # @param input Input sentiment analysis request
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(SentimentAnalysisResponse, Fixnum, Hash)>] SentimentAnalysisResponse data, response status code and response headers
38
- def analytics_sentiment_with_http_info(input, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_sentiment ..."
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 AnalyticsApi.analytics_sentiment"
45
- end
46
- # resource path
47
- local_var_path = "/nlp-v2/analytics/sentiment"
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 => 'SentimentAnalysisResponse')
72
- if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: AnalyticsApi#analytics_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
- end
75
- return data, status_code, headers
76
- end
77
- end
78
- end
@@ -1,78 +0,0 @@
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 ExtractEntitiesApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Extract entities from string
24
- # Extract the named entitites from an input string.
25
- # @param value Input string
26
- # @param [Hash] opts the optional parameters
27
- # @return [ExtractEntitiesResponse]
28
- def extract_entities_post(value, opts = {})
29
- data, _status_code, _headers = extract_entities_post_with_http_info(value, opts)
30
- return data
31
- end
32
-
33
- # Extract entities from string
34
- # Extract the named entitites from an input string.
35
- # @param value Input string
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(ExtractEntitiesResponse, Fixnum, Hash)>] ExtractEntitiesResponse data, response status code and response headers
38
- def extract_entities_post_with_http_info(value, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ExtractEntitiesApi.extract_entities_post ..."
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 ExtractEntitiesApi.extract_entities_post"
45
- end
46
- # resource path
47
- local_var_path = "/nlp-v2/extract-entities"
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 => 'ExtractEntitiesResponse')
72
- if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: ExtractEntitiesApi#extract_entities_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
- end
75
- return data, status_code, headers
76
- end
77
- end
78
- end
@@ -1,78 +0,0 @@
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 LanguageDetectionApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Detect language of text
24
- # Automatically determine which language a text string is written in. Supports Danish (DAN), German (DEU), English (ENG), French (FRA), Italian (ITA), Japanese (JPN), Korean (KOR), Dutch (NLD), Norwegian (NOR), Portuguese (POR), Russian (RUS), Spanish (SPA), Swedish (SWE), Chinese (ZHO).
25
- # @param input
26
- # @param [Hash] opts the optional parameters
27
- # @return [LanguageDetectionResponse]
28
- def language_detection_get_language(input, opts = {})
29
- data, _status_code, _headers = language_detection_get_language_with_http_info(input, opts)
30
- return data
31
- end
32
-
33
- # Detect language of text
34
- # Automatically determine which language a text string is written in. Supports Danish (DAN), German (DEU), English (ENG), French (FRA), Italian (ITA), Japanese (JPN), Korean (KOR), Dutch (NLD), Norwegian (NOR), Portuguese (POR), Russian (RUS), Spanish (SPA), Swedish (SWE), Chinese (ZHO).
35
- # @param input
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(LanguageDetectionResponse, Fixnum, Hash)>] LanguageDetectionResponse data, response status code and response headers
38
- def language_detection_get_language_with_http_info(input, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_get_language ..."
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 LanguageDetectionApi.language_detection_get_language"
45
- end
46
- # resource path
47
- local_var_path = "/nlp-v2/language/detect"
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 => 'LanguageDetectionResponse')
72
- if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: LanguageDetectionApi#language_detection_get_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
- end
75
- return data, status_code, headers
76
- end
77
- end
78
- end
@@ -1,243 +0,0 @@
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
-
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
242
- end
243
- end