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.
- checksums.yaml +4 -4
- data/README.md +38 -35
- data/cloudmersive-nlp-api-client.gemspec +3 -3
- data/docs/CheckSentenceRequest.md +8 -0
- data/docs/CheckSentenceResponse.md +9 -0
- data/docs/CheckWordRequest.md +8 -0
- data/docs/{CorrectJsonResponse.md → CheckWordResponse.md} +1 -1
- data/docs/{CorrectWordInSentenceJsonResponse.md → CorrectWordInSentence.md} +1 -1
- data/docs/Entity.md +9 -0
- data/docs/{ExtractEntitiesStringApi.md → ExtractEntitiesApi.md} +10 -10
- data/docs/ExtractEntitiesRequest.md +8 -0
- data/docs/ExtractEntitiesResponse.md +9 -0
- data/docs/GetWordsRequest.md +8 -0
- data/docs/{GetWordsJsonResponse.md → GetWordsResponse.md} +1 -1
- data/docs/LanguageDetectionApi.md +7 -7
- data/docs/LanguageDetectionRequest.md +8 -0
- data/docs/{ParseStringApi.md → ParseApi.md} +10 -10
- data/docs/ParseRequest.md +8 -0
- data/docs/ParseResponse.md +8 -0
- data/docs/{SpellCheckApi.md → PosTaggerApi.md} +73 -73
- data/docs/SegmentationApi.md +118 -0
- data/docs/SentenceSegmentationRequest.md +8 -0
- data/docs/SentenceSegmentationResponse.md +10 -0
- data/docs/SpellcheckApi.md +118 -0
- data/lib/cloudmersive-nlp-api-client.rb +23 -15
- data/lib/cloudmersive-nlp-api-client/api/{extract_entities_string_api.rb → extract_entities_api.rb} +14 -14
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +15 -15
- data/lib/cloudmersive-nlp-api-client/api/{parse_string_api.rb → parse_api.rb} +14 -14
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +353 -0
- data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +133 -0
- data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +133 -0
- data/lib/cloudmersive-nlp-api-client/api_client.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/api_error.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/configuration.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/{check_sentence_json_response.rb → check_sentence_response.rb} +5 -5
- data/lib/cloudmersive-nlp-api-client/models/{check_json_response.rb → check_word_request.rb} +12 -13
- data/lib/cloudmersive-nlp-api-client/models/{correct_json_response.rb → check_word_response.rb} +4 -4
- data/lib/cloudmersive-nlp-api-client/models/{correct_word_in_sentence_json_response.rb → correct_word_in_sentence.rb} +4 -4
- data/lib/cloudmersive-nlp-api-client/models/entity.rb +197 -0
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +200 -0
- data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +188 -0
- data/lib/cloudmersive-nlp-api-client/models/{get_words_json_response.rb → get_words_response.rb} +4 -4
- data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +188 -0
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +208 -0
- data/lib/cloudmersive-nlp-api-client/models/word_position.rb +3 -3
- data/lib/cloudmersive-nlp-api-client/version.rb +4 -4
- data/spec/api/{extract_entities_string_api_spec.rb → extract_entities_api_spec.rb} +12 -12
- data/spec/api/language_detection_api_spec.rb +6 -6
- data/spec/api/{parse_string_api_spec.rb → parse_api_spec.rb} +12 -12
- data/spec/api/pos_tagger_api_spec.rb +107 -0
- data/spec/api/segmentation_api_spec.rb +59 -0
- data/spec/api/spellcheck_api_spec.rb +59 -0
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/check_sentence_request_spec.rb +42 -0
- data/spec/models/{check_sentence_json_response_spec.rb → check_sentence_response_spec.rb} +9 -9
- data/spec/models/{check_json_response_spec.rb → check_word_request_spec.rb} +10 -10
- data/spec/models/{correct_json_response_spec.rb → check_word_response_spec.rb} +9 -9
- data/spec/models/{correct_word_in_sentence_json_response_spec.rb → correct_word_in_sentence_spec.rb} +9 -9
- data/spec/models/entity_spec.rb +48 -0
- data/spec/models/extract_entities_request_spec.rb +42 -0
- data/spec/models/extract_entities_response_spec.rb +48 -0
- data/spec/models/get_words_request_spec.rb +42 -0
- data/spec/models/{get_words_json_response_spec.rb → get_words_response_spec.rb} +9 -9
- data/spec/models/language_detection_request_spec.rb +42 -0
- data/spec/models/language_detection_response_spec.rb +3 -3
- data/spec/models/parse_request_spec.rb +42 -0
- data/spec/models/parse_response_spec.rb +42 -0
- data/spec/models/pos_request_spec.rb +3 -3
- data/spec/models/pos_response_spec.rb +3 -3
- data/spec/models/pos_sentence_spec.rb +3 -3
- data/spec/models/pos_tagged_word_spec.rb +3 -3
- data/spec/models/sentence_segmentation_request_spec.rb +42 -0
- data/spec/models/sentence_segmentation_response_spec.rb +54 -0
- data/spec/models/word_position_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -3
- metadata +75 -52
- data/docs/CheckJsonResponse.md +0 -8
- data/docs/CheckSentenceJsonResponse.md +0 -9
- data/docs/PosTaggerJsonApi.md +0 -63
- data/docs/PosTaggerStringApi.md +0 -63
- data/docs/SentencesApi.md +0 -63
- data/docs/WordsApi.md +0 -448
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_json_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_string_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/sentences_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/spell_check_api.rb +0 -353
- data/lib/cloudmersive-nlp-api-client/api/words_api.rb +0 -463
- data/spec/api/pos_tagger_json_api_spec.rb +0 -47
- data/spec/api/pos_tagger_string_api_spec.rb +0 -47
- data/spec/api/sentences_api_spec.rb +0 -47
- data/spec/api/spell_check_api_spec.rb +0 -107
- 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,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
|
-
#
|
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:
|
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/
|
21
|
-
require 'cloudmersive-nlp-api-client/models/
|
22
|
-
require 'cloudmersive-nlp-api-client/models/
|
23
|
-
require 'cloudmersive-nlp-api-client/models/
|
24
|
-
require 'cloudmersive-nlp-api-client/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'
|
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/
|
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/
|
36
|
-
require 'cloudmersive-nlp-api-client/api/
|
37
|
-
require 'cloudmersive-nlp-api-client/api/
|
38
|
-
require 'cloudmersive-nlp-api-client/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
|
data/lib/cloudmersive-nlp-api-client/api/{extract_entities_string_api.rb → extract_entities_api.rb}
RENAMED
@@ -1,19 +1,19 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
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:
|
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
|
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 [
|
28
|
-
def
|
29
|
-
data, _status_code, _headers =
|
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<(
|
38
|
-
def
|
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:
|
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
|
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/
|
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 => '
|
71
|
+
:return_type => 'ExtractEntitiesResponse')
|
72
72
|
if @api_client.config.debugging
|
73
|
-
@api_client.config.logger.debug "API called:
|
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
|
-
#
|
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:
|
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
|
25
|
+
# @param input
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [LanguageDetectionResponse]
|
28
|
-
def
|
29
|
-
data, _status_code, _headers =
|
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
|
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
|
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.
|
40
|
+
@api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_get_language ..."
|
41
41
|
end
|
42
|
-
# verify the required parameter '
|
43
|
-
if @api_client.config.client_side_validation &&
|
44
|
-
fail ArgumentError, "Missing the required parameter '
|
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(
|
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#
|
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
|