cloudmersive-nlp-api-client 1.2.9 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -35
  3. data/cloudmersive-nlp-api-client.gemspec +3 -3
  4. data/docs/CheckSentenceRequest.md +8 -0
  5. data/docs/CheckSentenceResponse.md +9 -0
  6. data/docs/CheckWordRequest.md +8 -0
  7. data/docs/{CorrectJsonResponse.md → CheckWordResponse.md} +1 -1
  8. data/docs/{CorrectWordInSentenceJsonResponse.md → CorrectWordInSentence.md} +1 -1
  9. data/docs/Entity.md +9 -0
  10. data/docs/{ExtractEntitiesStringApi.md → ExtractEntitiesApi.md} +10 -10
  11. data/docs/ExtractEntitiesRequest.md +8 -0
  12. data/docs/ExtractEntitiesResponse.md +9 -0
  13. data/docs/GetWordsRequest.md +8 -0
  14. data/docs/{GetWordsJsonResponse.md → GetWordsResponse.md} +1 -1
  15. data/docs/LanguageDetectionApi.md +7 -7
  16. data/docs/LanguageDetectionRequest.md +8 -0
  17. data/docs/{ParseStringApi.md → ParseApi.md} +10 -10
  18. data/docs/ParseRequest.md +8 -0
  19. data/docs/ParseResponse.md +8 -0
  20. data/docs/{SpellCheckApi.md → PosTaggerApi.md} +73 -73
  21. data/docs/SegmentationApi.md +118 -0
  22. data/docs/SentenceSegmentationRequest.md +8 -0
  23. data/docs/SentenceSegmentationResponse.md +10 -0
  24. data/docs/SpellcheckApi.md +118 -0
  25. data/lib/cloudmersive-nlp-api-client.rb +23 -15
  26. data/lib/cloudmersive-nlp-api-client/api/{extract_entities_string_api.rb → extract_entities_api.rb} +14 -14
  27. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +15 -15
  28. data/lib/cloudmersive-nlp-api-client/api/{parse_string_api.rb → parse_api.rb} +14 -14
  29. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +353 -0
  30. data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +133 -0
  31. data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +133 -0
  32. data/lib/cloudmersive-nlp-api-client/api_client.rb +3 -3
  33. data/lib/cloudmersive-nlp-api-client/api_error.rb +3 -3
  34. data/lib/cloudmersive-nlp-api-client/configuration.rb +3 -3
  35. data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +189 -0
  36. data/lib/cloudmersive-nlp-api-client/models/{check_sentence_json_response.rb → check_sentence_response.rb} +5 -5
  37. data/lib/cloudmersive-nlp-api-client/models/{check_json_response.rb → check_word_request.rb} +12 -13
  38. data/lib/cloudmersive-nlp-api-client/models/{correct_json_response.rb → check_word_response.rb} +4 -4
  39. data/lib/cloudmersive-nlp-api-client/models/{correct_word_in_sentence_json_response.rb → correct_word_in_sentence.rb} +4 -4
  40. data/lib/cloudmersive-nlp-api-client/models/entity.rb +197 -0
  41. data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +189 -0
  42. data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +200 -0
  43. data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +188 -0
  44. data/lib/cloudmersive-nlp-api-client/models/{get_words_json_response.rb → get_words_response.rb} +4 -4
  45. data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +189 -0
  46. data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +3 -3
  47. data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +189 -0
  48. data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +189 -0
  49. data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +3 -3
  50. data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +3 -3
  51. data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +3 -3
  52. data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +3 -3
  53. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +188 -0
  54. data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +208 -0
  55. data/lib/cloudmersive-nlp-api-client/models/word_position.rb +3 -3
  56. data/lib/cloudmersive-nlp-api-client/version.rb +4 -4
  57. data/spec/api/{extract_entities_string_api_spec.rb → extract_entities_api_spec.rb} +12 -12
  58. data/spec/api/language_detection_api_spec.rb +6 -6
  59. data/spec/api/{parse_string_api_spec.rb → parse_api_spec.rb} +12 -12
  60. data/spec/api/pos_tagger_api_spec.rb +107 -0
  61. data/spec/api/segmentation_api_spec.rb +59 -0
  62. data/spec/api/spellcheck_api_spec.rb +59 -0
  63. data/spec/api_client_spec.rb +3 -3
  64. data/spec/configuration_spec.rb +3 -3
  65. data/spec/models/check_sentence_request_spec.rb +42 -0
  66. data/spec/models/{check_sentence_json_response_spec.rb → check_sentence_response_spec.rb} +9 -9
  67. data/spec/models/{check_json_response_spec.rb → check_word_request_spec.rb} +10 -10
  68. data/spec/models/{correct_json_response_spec.rb → check_word_response_spec.rb} +9 -9
  69. data/spec/models/{correct_word_in_sentence_json_response_spec.rb → correct_word_in_sentence_spec.rb} +9 -9
  70. data/spec/models/entity_spec.rb +48 -0
  71. data/spec/models/extract_entities_request_spec.rb +42 -0
  72. data/spec/models/extract_entities_response_spec.rb +48 -0
  73. data/spec/models/get_words_request_spec.rb +42 -0
  74. data/spec/models/{get_words_json_response_spec.rb → get_words_response_spec.rb} +9 -9
  75. data/spec/models/language_detection_request_spec.rb +42 -0
  76. data/spec/models/language_detection_response_spec.rb +3 -3
  77. data/spec/models/parse_request_spec.rb +42 -0
  78. data/spec/models/parse_response_spec.rb +42 -0
  79. data/spec/models/pos_request_spec.rb +3 -3
  80. data/spec/models/pos_response_spec.rb +3 -3
  81. data/spec/models/pos_sentence_spec.rb +3 -3
  82. data/spec/models/pos_tagged_word_spec.rb +3 -3
  83. data/spec/models/sentence_segmentation_request_spec.rb +42 -0
  84. data/spec/models/sentence_segmentation_response_spec.rb +54 -0
  85. data/spec/models/word_position_spec.rb +3 -3
  86. data/spec/spec_helper.rb +3 -3
  87. metadata +75 -52
  88. data/docs/CheckJsonResponse.md +0 -8
  89. data/docs/CheckSentenceJsonResponse.md +0 -9
  90. data/docs/PosTaggerJsonApi.md +0 -63
  91. data/docs/PosTaggerStringApi.md +0 -63
  92. data/docs/SentencesApi.md +0 -63
  93. data/docs/WordsApi.md +0 -448
  94. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_json_api.rb +0 -78
  95. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_string_api.rb +0 -78
  96. data/lib/cloudmersive-nlp-api-client/api/sentences_api.rb +0 -78
  97. data/lib/cloudmersive-nlp-api-client/api/spell_check_api.rb +0 -353
  98. data/lib/cloudmersive-nlp-api-client/api/words_api.rb +0 -463
  99. data/spec/api/pos_tagger_json_api_spec.rb +0 -47
  100. data/spec/api/pos_tagger_string_api_spec.rb +0 -47
  101. data/spec/api/sentences_api_spec.rb +0 -47
  102. data/spec/api/spell_check_api_spec.rb +0 -107
  103. data/spec/api/words_api_spec.rb +0 -131
@@ -0,0 +1,118 @@
1
+ # CloudmersiveNlpApiClient::SegmentationApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**segmentation_get_sentences**](SegmentationApi.md#segmentation_get_sentences) | **POST** /nlp-v2/segmentation/sentences | Extract sentences from string
8
+ [**segmentation_get_words**](SegmentationApi.md#segmentation_get_words) | **POST** /nlp-v2/segmentation/words | Get words in input string
9
+
10
+
11
+ # **segmentation_get_sentences**
12
+ > SentenceSegmentationResponse segmentation_get_sentences(input)
13
+
14
+ Extract sentences from string
15
+
16
+ Segment an input string into separate sentences, output result as a string.
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::SegmentationApi.new
31
+
32
+ input = CloudmersiveNlpApiClient::SentenceSegmentationRequest.new # SentenceSegmentationRequest | Input string
33
+
34
+
35
+ begin
36
+ #Extract sentences from string
37
+ result = api_instance.segmentation_get_sentences(input)
38
+ p result
39
+ rescue CloudmersiveNlpApiClient::ApiError => e
40
+ puts "Exception when calling SegmentationApi->segmentation_get_sentences: #{e}"
41
+ end
42
+ ```
43
+
44
+ ### Parameters
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **input** | [**SentenceSegmentationRequest**](SentenceSegmentationRequest.md)| Input string |
49
+
50
+ ### Return type
51
+
52
+ [**SentenceSegmentationResponse**](SentenceSegmentationResponse.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
+ # **segmentation_get_words**
66
+ > GetWordsResponse segmentation_get_words(input)
67
+
68
+ Get words in input string
69
+
70
+ Get the component words in an input string
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::SegmentationApi.new
85
+
86
+ input = CloudmersiveNlpApiClient::GetWordsRequest.new # GetWordsRequest | String to process
87
+
88
+
89
+ begin
90
+ #Get words in input string
91
+ result = api_instance.segmentation_get_words(input)
92
+ p result
93
+ rescue CloudmersiveNlpApiClient::ApiError => e
94
+ puts "Exception when calling SegmentationApi->segmentation_get_words: #{e}"
95
+ end
96
+ ```
97
+
98
+ ### Parameters
99
+
100
+ Name | Type | Description | Notes
101
+ ------------- | ------------- | ------------- | -------------
102
+ **input** | [**GetWordsRequest**](GetWordsRequest.md)| String to process |
103
+
104
+ ### Return type
105
+
106
+ [**GetWordsResponse**](GetWordsResponse.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::SentenceSegmentationRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_string** | **String** | | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveNlpApiClient::SentenceSegmentationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | | [optional]
7
+ **sentences** | **Array<String>** | | [optional]
8
+ **sentence_count** | **Integer** | | [optional]
9
+
10
+
@@ -0,0 +1,118 @@
1
+ # CloudmersiveNlpApiClient::SpellcheckApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**spellcheck_check_sentence**](SpellcheckApi.md#spellcheck_check_sentence) | **POST** /nlp-v2/spellcheck/check/sentence | Check if sentence is spelled correctly
8
+ [**spellcheck_correct_json**](SpellcheckApi.md#spellcheck_correct_json) | **POST** /nlp-v2/spellcheck/check/word | Find spelling corrections
9
+
10
+
11
+ # **spellcheck_check_sentence**
12
+ > CheckSentenceResponse spellcheck_check_sentence(value)
13
+
14
+ Check if sentence is spelled correctly
15
+
16
+ Checks whether the sentence is spelled correctly and returns the result as JSON
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::SpellcheckApi.new
31
+
32
+ value = CloudmersiveNlpApiClient::CheckSentenceRequest.new # CheckSentenceRequest | Input sentence
33
+
34
+
35
+ begin
36
+ #Check if sentence is spelled correctly
37
+ result = api_instance.spellcheck_check_sentence(value)
38
+ p result
39
+ rescue CloudmersiveNlpApiClient::ApiError => e
40
+ puts "Exception when calling SpellcheckApi->spellcheck_check_sentence: #{e}"
41
+ end
42
+ ```
43
+
44
+ ### Parameters
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **value** | [**CheckSentenceRequest**](CheckSentenceRequest.md)| Input sentence |
49
+
50
+ ### Return type
51
+
52
+ [**CheckSentenceResponse**](CheckSentenceResponse.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
+ # **spellcheck_correct_json**
66
+ > CheckWordResponse spellcheck_correct_json(value)
67
+
68
+ Find spelling corrections
69
+
70
+ Find spelling correction suggestions and return result as JSON
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::SpellcheckApi.new
85
+
86
+ value = CloudmersiveNlpApiClient::CheckWordRequest.new # CheckWordRequest | Input string
87
+
88
+
89
+ begin
90
+ #Find spelling corrections
91
+ result = api_instance.spellcheck_correct_json(value)
92
+ p result
93
+ rescue CloudmersiveNlpApiClient::ApiError => e
94
+ puts "Exception when calling SpellcheckApi->spellcheck_correct_json: #{e}"
95
+ end
96
+ ```
97
+
98
+ ### Parameters
99
+
100
+ Name | Type | Description | Notes
101
+ ------------- | ------------- | ------------- | -------------
102
+ **value** | [**CheckWordRequest**](CheckWordRequest.md)| Input string |
103
+
104
+ ### Return type
105
+
106
+ [**CheckWordResponse**](CheckWordResponse.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
+
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #nlpapi
2
+ #nlpapiv2
3
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.
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
5
 
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
@@ -17,27 +17,35 @@ require 'cloudmersive-nlp-api-client/version'
17
17
  require 'cloudmersive-nlp-api-client/configuration'
18
18
 
19
19
  # Models
20
- require 'cloudmersive-nlp-api-client/models/check_json_response'
21
- require 'cloudmersive-nlp-api-client/models/check_sentence_json_response'
22
- require 'cloudmersive-nlp-api-client/models/correct_json_response'
23
- require 'cloudmersive-nlp-api-client/models/correct_word_in_sentence_json_response'
24
- require 'cloudmersive-nlp-api-client/models/get_words_json_response'
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'
25
31
  require 'cloudmersive-nlp-api-client/models/language_detection_response'
32
+ require 'cloudmersive-nlp-api-client/models/parse_request'
33
+ require 'cloudmersive-nlp-api-client/models/parse_response'
26
34
  require 'cloudmersive-nlp-api-client/models/pos_request'
27
35
  require 'cloudmersive-nlp-api-client/models/pos_response'
28
36
  require 'cloudmersive-nlp-api-client/models/pos_sentence'
29
37
  require 'cloudmersive-nlp-api-client/models/pos_tagged_word'
38
+ require 'cloudmersive-nlp-api-client/models/sentence_segmentation_request'
39
+ require 'cloudmersive-nlp-api-client/models/sentence_segmentation_response'
30
40
  require 'cloudmersive-nlp-api-client/models/word_position'
31
41
 
32
42
  # APIs
33
- require 'cloudmersive-nlp-api-client/api/extract_entities_string_api'
43
+ require 'cloudmersive-nlp-api-client/api/extract_entities_api'
34
44
  require 'cloudmersive-nlp-api-client/api/language_detection_api'
35
- require 'cloudmersive-nlp-api-client/api/parse_string_api'
36
- require 'cloudmersive-nlp-api-client/api/pos_tagger_json_api'
37
- require 'cloudmersive-nlp-api-client/api/pos_tagger_string_api'
38
- require 'cloudmersive-nlp-api-client/api/sentences_api'
39
- require 'cloudmersive-nlp-api-client/api/spell_check_api'
40
- require 'cloudmersive-nlp-api-client/api/words_api'
45
+ require 'cloudmersive-nlp-api-client/api/parse_api'
46
+ require 'cloudmersive-nlp-api-client/api/pos_tagger_api'
47
+ require 'cloudmersive-nlp-api-client/api/segmentation_api'
48
+ require 'cloudmersive-nlp-api-client/api/spellcheck_api'
41
49
 
42
50
  module CloudmersiveNlpApiClient
43
51
  class << self
@@ -1,19 +1,19 @@
1
1
  =begin
2
- #nlpapi
2
+ #nlpapiv2
3
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.
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
5
 
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
13
13
  require "uri"
14
14
 
15
15
  module CloudmersiveNlpApiClient
16
- class ExtractEntitiesStringApi
16
+ class ExtractEntitiesApi
17
17
  attr_accessor :api_client
18
18
 
19
19
  def initialize(api_client = ApiClient.default)
@@ -24,9 +24,9 @@ module CloudmersiveNlpApiClient
24
24
  # Extract the named entitites from an input string.
25
25
  # @param value Input string
26
26
  # @param [Hash] opts the optional parameters
27
- # @return [String]
28
- def extract_entities_string_post(value, opts = {})
29
- data, _status_code, _headers = extract_entities_string_post_with_http_info(value, opts)
27
+ # @return [ExtractEntitiesResponse]
28
+ def extract_entities_post(value, opts = {})
29
+ data, _status_code, _headers = extract_entities_post_with_http_info(value, opts)
30
30
  return data
31
31
  end
32
32
 
@@ -34,17 +34,17 @@ module CloudmersiveNlpApiClient
34
34
  # Extract the named entitites from an input string.
35
35
  # @param value Input string
36
36
  # @param [Hash] opts the optional parameters
37
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
- def extract_entities_string_post_with_http_info(value, opts = {})
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
39
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ExtractEntitiesStringApi.extract_entities_string_post ..."
40
+ @api_client.config.logger.debug "Calling API: ExtractEntitiesApi.extract_entities_post ..."
41
41
  end
42
42
  # verify the required parameter 'value' is set
43
43
  if @api_client.config.client_side_validation && value.nil?
44
- fail ArgumentError, "Missing the required parameter 'value' when calling ExtractEntitiesStringApi.extract_entities_string_post"
44
+ fail ArgumentError, "Missing the required parameter 'value' when calling ExtractEntitiesApi.extract_entities_post"
45
45
  end
46
46
  # resource path
47
- local_var_path = "/nlp/ExtractEntitiesString"
47
+ local_var_path = "/nlp-v2/extract-entities"
48
48
 
49
49
  # query parameters
50
50
  query_params = {}
@@ -68,9 +68,9 @@ module CloudmersiveNlpApiClient
68
68
  :form_params => form_params,
69
69
  :body => post_body,
70
70
  :auth_names => auth_names,
71
- :return_type => 'String')
71
+ :return_type => 'ExtractEntitiesResponse')
72
72
  if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: ExtractEntitiesStringApi#extract_entities_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ @api_client.config.logger.debug "API called: ExtractEntitiesApi#extract_entities_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
74
  end
75
75
  return data, status_code, headers
76
76
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #nlpapi
2
+ #nlpapiv2
3
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.
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
5
 
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
@@ -22,29 +22,29 @@ module CloudmersiveNlpApiClient
22
22
 
23
23
  # Detect language of text
24
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 text_to_detect Text to detect language of
25
+ # @param input
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [LanguageDetectionResponse]
28
- def language_detection_post(text_to_detect, opts = {})
29
- data, _status_code, _headers = language_detection_post_with_http_info(text_to_detect, opts)
28
+ def language_detection_get_language(input, opts = {})
29
+ data, _status_code, _headers = language_detection_get_language_with_http_info(input, opts)
30
30
  return data
31
31
  end
32
32
 
33
33
  # Detect language of text
34
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 text_to_detect Text to detect language of
35
+ # @param input
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @return [Array<(LanguageDetectionResponse, Fixnum, Hash)>] LanguageDetectionResponse data, response status code and response headers
38
- def language_detection_post_with_http_info(text_to_detect, opts = {})
38
+ def language_detection_get_language_with_http_info(input, opts = {})
39
39
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_post ..."
40
+ @api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_get_language ..."
41
41
  end
42
- # verify the required parameter 'text_to_detect' is set
43
- if @api_client.config.client_side_validation && text_to_detect.nil?
44
- fail ArgumentError, "Missing the required parameter 'text_to_detect' when calling LanguageDetectionApi.language_detection_post"
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
45
  end
46
46
  # resource path
47
- local_var_path = "/nlp/language/detect"
47
+ local_var_path = "/nlp-v2/language/detect"
48
48
 
49
49
  # query parameters
50
50
  query_params = {}
@@ -60,7 +60,7 @@ module CloudmersiveNlpApiClient
60
60
  form_params = {}
61
61
 
62
62
  # http body (model)
63
- post_body = @api_client.object_to_http_body(text_to_detect)
63
+ post_body = @api_client.object_to_http_body(input)
64
64
  auth_names = ['Apikey']
65
65
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
66
  :header_params => header_params,
@@ -70,7 +70,7 @@ module CloudmersiveNlpApiClient
70
70
  :auth_names => auth_names,
71
71
  :return_type => 'LanguageDetectionResponse')
72
72
  if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: LanguageDetectionApi#language_detection_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ @api_client.config.logger.debug "API called: LanguageDetectionApi#language_detection_get_language\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
74
  end
75
75
  return data, status_code, headers
76
76
  end