cloudmersive-nlp-api-client 2.0.4 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -10
  3. data/docs/AnalyticsApi.md +283 -0
  4. data/docs/ExtractEntitiesApi.md +1 -1
  5. data/docs/HateSpeechAnalysisRequest.md +8 -0
  6. data/docs/HateSpeechAnalysisResponse.md +10 -0
  7. data/docs/LanguageDetectionApi.md +1 -1
  8. data/docs/LanguageTranslationApi.md +4 -4
  9. data/docs/ParseApi.md +1 -1
  10. data/docs/PosTaggerApi.md +6 -6
  11. data/docs/ProfanityAnalysisRequest.md +8 -0
  12. data/docs/ProfanityAnalysisResponse.md +10 -0
  13. data/docs/RephraseApi.md +6 -6
  14. data/docs/SegmentationApi.md +2 -2
  15. data/docs/SentimentAnalysisRequest.md +8 -0
  16. data/docs/SentimentAnalysisResponse.md +11 -0
  17. data/docs/SimilarityAnalysisRequest.md +9 -0
  18. data/docs/SimilarityAnalysisResponse.md +10 -0
  19. data/docs/SpellcheckApi.md +2 -2
  20. data/docs/SubjectivityAnalysisRequest.md +8 -0
  21. data/docs/SubjectivityAnalysisResponse.md +10 -0
  22. data/lib/cloudmersive-nlp-api-client.rb +11 -0
  23. data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +298 -0
  24. data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +1 -1
  25. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +1 -1
  26. data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +4 -4
  27. data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +1 -1
  28. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +6 -6
  29. data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +7 -7
  30. data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +2 -2
  31. data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +2 -2
  32. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +189 -0
  33. data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +209 -0
  34. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +189 -0
  35. data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +209 -0
  36. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +189 -0
  37. data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +219 -0
  38. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +199 -0
  39. data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +209 -0
  40. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +189 -0
  41. data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +209 -0
  42. data/lib/cloudmersive-nlp-api-client/version.rb +1 -1
  43. data/spec/api/analytics_api_spec.rb +95 -0
  44. data/spec/api/rephrase_api_spec.rb +2 -2
  45. data/spec/models/hate_speech_analysis_request_spec.rb +42 -0
  46. data/spec/models/hate_speech_analysis_response_spec.rb +54 -0
  47. data/spec/models/profanity_analysis_request_spec.rb +42 -0
  48. data/spec/models/profanity_analysis_response_spec.rb +54 -0
  49. data/spec/models/sentiment_analysis_request_spec.rb +42 -0
  50. data/spec/models/sentiment_analysis_response_spec.rb +60 -0
  51. data/spec/models/similarity_analysis_request_spec.rb +48 -0
  52. data/spec/models/similarity_analysis_response_spec.rb +54 -0
  53. data/spec/models/subjectivity_analysis_request_spec.rb +42 -0
  54. data/spec/models/subjectivity_analysis_response_spec.rb +54 -0
  55. metadata +35 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 472b8b5e390d99dc11041638db86957ea823d9ded3df7bca25e6ae8b8e00683b
4
- data.tar.gz: 65dec04e143972cc66c6a874388bda1e39c86d0cbe2baf47add69acf3e0f5360
3
+ metadata.gz: 82289aba4bdbe40e0291bc50327a35b3e7c4c3e7007f68f1e2d057a8b9e9c1ec
4
+ data.tar.gz: 33889d1a1063fec6588bf88a443314ec4e82c60aa2d600ff3564b395a3ed89bf
5
5
  SHA512:
6
- metadata.gz: dcc590c78e866b975d66a25bf2f38a88b19ef8b7aa7e0602eeafd24b8ac5be43d3fa41c91f32c68193cde3e9cf94aac5eaa2e9fc23b50072d3e41d51d183d9ea
7
- data.tar.gz: 5f368075985441c467652a5e49ef92fd2c3f7d9078b0437b06a9bba8c7d78611694aa19835a86d903a6277280d3d884e2eaf53bd27a3daebd661fedd722489bd
6
+ metadata.gz: c2f404733f5766ccb6a8dc4f296ac59d8dd215fc8bb7f61900b9bbf5a4bebe67ed6fe4ed8f160c4dca2121b457231d4523778b16e56aacd696bb1869ee3000c0
7
+ data.tar.gz: 2da3eebb17241c848a3c87c041acf5054e1689377ff1700227cc41ed809ad411e6ccb7c0ddba9dbe9ba85caed3123f658a83c89f301c58a9383f9e6902cfeb09
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.4
10
+ - Package version: 2.0.9
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.4.gem
26
+ gem install ./cloudmersive-nlp-api-client-2.0.9.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.4.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-nlp-api-client-2.0.9.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.4'
34
+ gem 'cloudmersive-nlp-api-client', '~> 2.0.9'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -62,17 +62,17 @@ CloudmersiveNlpApiClient.configure do |config|
62
62
  #config.api_key_prefix['Apikey'] = 'Bearer'
63
63
  end
64
64
 
65
- api_instance = CloudmersiveNlpApiClient::ExtractEntitiesApi.new
65
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
66
66
 
67
- value = CloudmersiveNlpApiClient::ExtractEntitiesRequest.new # ExtractEntitiesRequest | Input string
67
+ input = CloudmersiveNlpApiClient::HateSpeechAnalysisRequest.new # HateSpeechAnalysisRequest | Input hate speech analysis request
68
68
 
69
69
 
70
70
  begin
71
- #Extract entities from string
72
- result = api_instance.extract_entities_post(value)
71
+ #Perform Hate Speech Analysis and Detection on Text
72
+ result = api_instance.analytics_hate_speech(input)
73
73
  p result
74
74
  rescue CloudmersiveNlpApiClient::ApiError => e
75
- puts "Exception when calling ExtractEntitiesApi->extract_entities_post: #{e}"
75
+ puts "Exception when calling AnalyticsApi->analytics_hate_speech: #{e}"
76
76
  end
77
77
 
78
78
  ```
@@ -83,6 +83,11 @@ All URIs are relative to *https://api.cloudmersive.com*
83
83
 
84
84
  Class | Method | HTTP request | Description
85
85
  ------------ | ------------- | ------------- | -------------
86
+ *CloudmersiveNlpApiClient::AnalyticsApi* | [**analytics_hate_speech**](docs/AnalyticsApi.md#analytics_hate_speech) | **POST** /nlp-v2/analytics/hate-speech | Perform Hate Speech Analysis and Detection on Text
87
+ *CloudmersiveNlpApiClient::AnalyticsApi* | [**analytics_profanity**](docs/AnalyticsApi.md#analytics_profanity) | **POST** /nlp-v2/analytics/profanity | Perform Profanity and Obscene Language Analysis and Detection on Text
88
+ *CloudmersiveNlpApiClient::AnalyticsApi* | [**analytics_sentiment**](docs/AnalyticsApi.md#analytics_sentiment) | **POST** /nlp-v2/analytics/sentiment | Perform Sentiment Analysis and Classification on Text
89
+ *CloudmersiveNlpApiClient::AnalyticsApi* | [**analytics_similarity**](docs/AnalyticsApi.md#analytics_similarity) | **POST** /nlp-v2/analytics/similarity | Perform Semantic Similarity Comparison of Two Strings
90
+ *CloudmersiveNlpApiClient::AnalyticsApi* | [**analytics_subjectivity**](docs/AnalyticsApi.md#analytics_subjectivity) | **POST** /nlp-v2/analytics/subjectivity | Perform Subjectivity and Objectivity Analysis on Text
86
91
  *CloudmersiveNlpApiClient::ExtractEntitiesApi* | [**extract_entities_post**](docs/ExtractEntitiesApi.md#extract_entities_post) | **POST** /nlp-v2/extract-entities | Extract entities from string
87
92
  *CloudmersiveNlpApiClient::LanguageDetectionApi* | [**language_detection_get_language**](docs/LanguageDetectionApi.md#language_detection_get_language) | **POST** /nlp-v2/language/detect | Detect language of text
88
93
  *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
@@ -96,7 +101,7 @@ Class | Method | HTTP request | Description
96
101
  *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
97
102
  *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
98
103
  *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
99
- *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
104
+ *CloudmersiveNlpApiClient::RephraseApi* | [**rephrase_english_rephrase_sentence_by_sentence**](docs/RephraseApi.md#rephrase_english_rephrase_sentence_by_sentence) | **POST** /nlp-v2/rephrase/rephrase/eng/by-sentence | Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
100
105
  *CloudmersiveNlpApiClient::SegmentationApi* | [**segmentation_get_sentences**](docs/SegmentationApi.md#segmentation_get_sentences) | **POST** /nlp-v2/segmentation/sentences | Extract sentences from string
101
106
  *CloudmersiveNlpApiClient::SegmentationApi* | [**segmentation_get_words**](docs/SegmentationApi.md#segmentation_get_words) | **POST** /nlp-v2/segmentation/words | Get words in input string
102
107
  *CloudmersiveNlpApiClient::SpellcheckApi* | [**spellcheck_check_sentence**](docs/SpellcheckApi.md#spellcheck_check_sentence) | **POST** /nlp-v2/spellcheck/check/sentence | Check if sentence is spelled correctly
@@ -115,6 +120,8 @@ Class | Method | HTTP request | Description
115
120
  - [CloudmersiveNlpApiClient::ExtractEntitiesResponse](docs/ExtractEntitiesResponse.md)
116
121
  - [CloudmersiveNlpApiClient::GetWordsRequest](docs/GetWordsRequest.md)
117
122
  - [CloudmersiveNlpApiClient::GetWordsResponse](docs/GetWordsResponse.md)
123
+ - [CloudmersiveNlpApiClient::HateSpeechAnalysisRequest](docs/HateSpeechAnalysisRequest.md)
124
+ - [CloudmersiveNlpApiClient::HateSpeechAnalysisResponse](docs/HateSpeechAnalysisResponse.md)
118
125
  - [CloudmersiveNlpApiClient::LanguageDetectionRequest](docs/LanguageDetectionRequest.md)
119
126
  - [CloudmersiveNlpApiClient::LanguageDetectionResponse](docs/LanguageDetectionResponse.md)
120
127
  - [CloudmersiveNlpApiClient::LanguageTranslationRequest](docs/LanguageTranslationRequest.md)
@@ -125,12 +132,20 @@ Class | Method | HTTP request | Description
125
132
  - [CloudmersiveNlpApiClient::PosResponse](docs/PosResponse.md)
126
133
  - [CloudmersiveNlpApiClient::PosSentence](docs/PosSentence.md)
127
134
  - [CloudmersiveNlpApiClient::PosTaggedWord](docs/PosTaggedWord.md)
135
+ - [CloudmersiveNlpApiClient::ProfanityAnalysisRequest](docs/ProfanityAnalysisRequest.md)
136
+ - [CloudmersiveNlpApiClient::ProfanityAnalysisResponse](docs/ProfanityAnalysisResponse.md)
128
137
  - [CloudmersiveNlpApiClient::RephraseRequest](docs/RephraseRequest.md)
129
138
  - [CloudmersiveNlpApiClient::RephraseResponse](docs/RephraseResponse.md)
130
139
  - [CloudmersiveNlpApiClient::RephrasedSentence](docs/RephrasedSentence.md)
131
140
  - [CloudmersiveNlpApiClient::RephrasedSentenceOption](docs/RephrasedSentenceOption.md)
132
141
  - [CloudmersiveNlpApiClient::SentenceSegmentationRequest](docs/SentenceSegmentationRequest.md)
133
142
  - [CloudmersiveNlpApiClient::SentenceSegmentationResponse](docs/SentenceSegmentationResponse.md)
143
+ - [CloudmersiveNlpApiClient::SentimentAnalysisRequest](docs/SentimentAnalysisRequest.md)
144
+ - [CloudmersiveNlpApiClient::SentimentAnalysisResponse](docs/SentimentAnalysisResponse.md)
145
+ - [CloudmersiveNlpApiClient::SimilarityAnalysisRequest](docs/SimilarityAnalysisRequest.md)
146
+ - [CloudmersiveNlpApiClient::SimilarityAnalysisResponse](docs/SimilarityAnalysisResponse.md)
147
+ - [CloudmersiveNlpApiClient::SubjectivityAnalysisRequest](docs/SubjectivityAnalysisRequest.md)
148
+ - [CloudmersiveNlpApiClient::SubjectivityAnalysisResponse](docs/SubjectivityAnalysisResponse.md)
134
149
  - [CloudmersiveNlpApiClient::WordPosition](docs/WordPosition.md)
135
150
 
136
151
 
@@ -0,0 +1,283 @@
1
+ # CloudmersiveNlpApiClient::AnalyticsApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**analytics_hate_speech**](AnalyticsApi.md#analytics_hate_speech) | **POST** /nlp-v2/analytics/hate-speech | Perform Hate Speech Analysis and Detection on Text
8
+ [**analytics_profanity**](AnalyticsApi.md#analytics_profanity) | **POST** /nlp-v2/analytics/profanity | Perform Profanity and Obscene Language Analysis and Detection on Text
9
+ [**analytics_sentiment**](AnalyticsApi.md#analytics_sentiment) | **POST** /nlp-v2/analytics/sentiment | Perform Sentiment Analysis and Classification on Text
10
+ [**analytics_similarity**](AnalyticsApi.md#analytics_similarity) | **POST** /nlp-v2/analytics/similarity | Perform Semantic Similarity Comparison of Two Strings
11
+ [**analytics_subjectivity**](AnalyticsApi.md#analytics_subjectivity) | **POST** /nlp-v2/analytics/subjectivity | Perform Subjectivity and Objectivity Analysis on Text
12
+
13
+
14
+ # **analytics_hate_speech**
15
+ > HateSpeechAnalysisResponse analytics_hate_speech(input)
16
+
17
+ Perform Hate Speech Analysis and Detection on Text
18
+
19
+ Analyze input text using advanced Hate Speech Analysis to determine if the input contains hate speech language. Supports English language input. Consumes 1-2 API calls per sentence.
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'cloudmersive-nlp-api-client'
25
+ # setup authorization
26
+ CloudmersiveNlpApiClient.configure do |config|
27
+ # Configure API key authorization: Apikey
28
+ config.api_key['Apikey'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['Apikey'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
34
+
35
+ input = CloudmersiveNlpApiClient::HateSpeechAnalysisRequest.new # HateSpeechAnalysisRequest | Input hate speech analysis request
36
+
37
+
38
+ begin
39
+ #Perform Hate Speech Analysis and Detection on Text
40
+ result = api_instance.analytics_hate_speech(input)
41
+ p result
42
+ rescue CloudmersiveNlpApiClient::ApiError => e
43
+ puts "Exception when calling AnalyticsApi->analytics_hate_speech: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **input** | [**HateSpeechAnalysisRequest**](HateSpeechAnalysisRequest.md)| Input hate speech analysis request |
52
+
53
+ ### Return type
54
+
55
+ [**HateSpeechAnalysisResponse**](HateSpeechAnalysisResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [Apikey](../README.md#Apikey)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **analytics_profanity**
69
+ > ProfanityAnalysisResponse analytics_profanity(input)
70
+
71
+ Perform Profanity and Obscene Language Analysis and Detection on Text
72
+
73
+ Analyze input text using advanced Profanity and Obscene Language Analysis to determine if the input contains profane language. Supports English language input. Consumes 1-2 API calls per sentence.
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'cloudmersive-nlp-api-client'
79
+ # setup authorization
80
+ CloudmersiveNlpApiClient.configure do |config|
81
+ # Configure API key authorization: Apikey
82
+ config.api_key['Apikey'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Apikey'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
88
+
89
+ input = CloudmersiveNlpApiClient::ProfanityAnalysisRequest.new # ProfanityAnalysisRequest | Input profanity analysis request
90
+
91
+
92
+ begin
93
+ #Perform Profanity and Obscene Language Analysis and Detection on Text
94
+ result = api_instance.analytics_profanity(input)
95
+ p result
96
+ rescue CloudmersiveNlpApiClient::ApiError => e
97
+ puts "Exception when calling AnalyticsApi->analytics_profanity: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **input** | [**ProfanityAnalysisRequest**](ProfanityAnalysisRequest.md)| Input profanity analysis request |
106
+
107
+ ### Return type
108
+
109
+ [**ProfanityAnalysisResponse**](ProfanityAnalysisResponse.md)
110
+
111
+ ### Authorization
112
+
113
+ [Apikey](../README.md#Apikey)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
118
+ - **Accept**: application/json
119
+
120
+
121
+
122
+ # **analytics_sentiment**
123
+ > SentimentAnalysisResponse analytics_sentiment(input)
124
+
125
+ Perform Sentiment Analysis and Classification on Text
126
+
127
+ 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.
128
+
129
+ ### Example
130
+ ```ruby
131
+ # load the gem
132
+ require 'cloudmersive-nlp-api-client'
133
+ # setup authorization
134
+ CloudmersiveNlpApiClient.configure do |config|
135
+ # Configure API key authorization: Apikey
136
+ config.api_key['Apikey'] = 'YOUR API KEY'
137
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
138
+ #config.api_key_prefix['Apikey'] = 'Bearer'
139
+ end
140
+
141
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
142
+
143
+ input = CloudmersiveNlpApiClient::SentimentAnalysisRequest.new # SentimentAnalysisRequest | Input sentiment analysis request
144
+
145
+
146
+ begin
147
+ #Perform Sentiment Analysis and Classification on Text
148
+ result = api_instance.analytics_sentiment(input)
149
+ p result
150
+ rescue CloudmersiveNlpApiClient::ApiError => e
151
+ puts "Exception when calling AnalyticsApi->analytics_sentiment: #{e}"
152
+ end
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+ Name | Type | Description | Notes
158
+ ------------- | ------------- | ------------- | -------------
159
+ **input** | [**SentimentAnalysisRequest**](SentimentAnalysisRequest.md)| Input sentiment analysis request |
160
+
161
+ ### Return type
162
+
163
+ [**SentimentAnalysisResponse**](SentimentAnalysisResponse.md)
164
+
165
+ ### Authorization
166
+
167
+ [Apikey](../README.md#Apikey)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
172
+ - **Accept**: application/json
173
+
174
+
175
+
176
+ # **analytics_similarity**
177
+ > SimilarityAnalysisResponse analytics_similarity(input)
178
+
179
+ Perform Semantic Similarity Comparison of Two Strings
180
+
181
+ Analyze two input text strings, typically sentences, and determine the semantic similarity of each. Semantic similarity refers to the degree to which two sentences mean the same thing semantically. Uses advanced Deep Learning to perform the semantic similarity comparison. Consumes 1-2 API calls per sentence.
182
+
183
+ ### Example
184
+ ```ruby
185
+ # load the gem
186
+ require 'cloudmersive-nlp-api-client'
187
+ # setup authorization
188
+ CloudmersiveNlpApiClient.configure do |config|
189
+ # Configure API key authorization: Apikey
190
+ config.api_key['Apikey'] = 'YOUR API KEY'
191
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
192
+ #config.api_key_prefix['Apikey'] = 'Bearer'
193
+ end
194
+
195
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
196
+
197
+ input = CloudmersiveNlpApiClient::SimilarityAnalysisRequest.new # SimilarityAnalysisRequest | Input similarity analysis request
198
+
199
+
200
+ begin
201
+ #Perform Semantic Similarity Comparison of Two Strings
202
+ result = api_instance.analytics_similarity(input)
203
+ p result
204
+ rescue CloudmersiveNlpApiClient::ApiError => e
205
+ puts "Exception when calling AnalyticsApi->analytics_similarity: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **input** | [**SimilarityAnalysisRequest**](SimilarityAnalysisRequest.md)| Input similarity analysis request |
214
+
215
+ ### Return type
216
+
217
+ [**SimilarityAnalysisResponse**](SimilarityAnalysisResponse.md)
218
+
219
+ ### Authorization
220
+
221
+ [Apikey](../README.md#Apikey)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
226
+ - **Accept**: application/json
227
+
228
+
229
+
230
+ # **analytics_subjectivity**
231
+ > SubjectivityAnalysisResponse analytics_subjectivity(input)
232
+
233
+ Perform Subjectivity and Objectivity Analysis on Text
234
+
235
+ Analyze input text using advanced Subjectivity and Objectivity Language Analysis to determine if the input text is objective or subjective, and how much. Supports English language input. Consumes 1-2 API calls per sentence.
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'cloudmersive-nlp-api-client'
241
+ # setup authorization
242
+ CloudmersiveNlpApiClient.configure do |config|
243
+ # Configure API key authorization: Apikey
244
+ config.api_key['Apikey'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ #config.api_key_prefix['Apikey'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = CloudmersiveNlpApiClient::AnalyticsApi.new
250
+
251
+ input = CloudmersiveNlpApiClient::SubjectivityAnalysisRequest.new # SubjectivityAnalysisRequest | Input subjectivity analysis request
252
+
253
+
254
+ begin
255
+ #Perform Subjectivity and Objectivity Analysis on Text
256
+ result = api_instance.analytics_subjectivity(input)
257
+ p result
258
+ rescue CloudmersiveNlpApiClient::ApiError => e
259
+ puts "Exception when calling AnalyticsApi->analytics_subjectivity: #{e}"
260
+ end
261
+ ```
262
+
263
+ ### Parameters
264
+
265
+ Name | Type | Description | Notes
266
+ ------------- | ------------- | ------------- | -------------
267
+ **input** | [**SubjectivityAnalysisRequest**](SubjectivityAnalysisRequest.md)| Input subjectivity analysis request |
268
+
269
+ ### Return type
270
+
271
+ [**SubjectivityAnalysisResponse**](SubjectivityAnalysisResponse.md)
272
+
273
+ ### Authorization
274
+
275
+ [Apikey](../README.md#Apikey)
276
+
277
+ ### HTTP request headers
278
+
279
+ - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
280
+ - **Accept**: application/json
281
+
282
+
283
+
@@ -57,7 +57,7 @@ Name | Type | Description | Notes
57
57
  ### HTTP request headers
58
58
 
59
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
60
+ - **Accept**: application/json
61
61
 
62
62
 
63
63
 
@@ -0,0 +1,8 @@
1
+ # CloudmersiveNlpApiClient::HateSpeechAnalysisRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **text_to_analyze** | **String** | Text to analyze | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveNlpApiClient::HateSpeechAnalysisResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the profanity detection operation was successful, false otherwise | [optional]
7
+ **hate_speech_score_result** | **Float** | Hate speech classification score between 0.0 and 1.0 where scores closer to zero have a low probability of being hate speech language, while scores close to 1.0 have a high probability of being hate speech language. Values above 0.8 have a very high probability of being hate speech. | [optional]
8
+ **sentence_count** | **Integer** | Number of sentences in input text | [optional]
9
+
10
+
@@ -57,7 +57,7 @@ Name | Type | Description | Notes
57
57
  ### HTTP request headers
58
58
 
59
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
60
+ - **Accept**: application/json
61
61
 
62
62
 
63
63
 
@@ -60,7 +60,7 @@ Name | Type | Description | Notes
60
60
  ### HTTP request headers
61
61
 
62
62
  - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
63
- - **Accept**: application/json, text/json, application/xml, text/xml
63
+ - **Accept**: application/json
64
64
 
65
65
 
66
66
 
@@ -114,7 +114,7 @@ Name | Type | Description | Notes
114
114
  ### HTTP request headers
115
115
 
116
116
  - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
117
- - **Accept**: application/json, text/json, application/xml, text/xml
117
+ - **Accept**: application/json
118
118
 
119
119
 
120
120
 
@@ -168,7 +168,7 @@ Name | Type | Description | Notes
168
168
  ### HTTP request headers
169
169
 
170
170
  - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
171
- - **Accept**: application/json, text/json, application/xml, text/xml
171
+ - **Accept**: application/json
172
172
 
173
173
 
174
174
 
@@ -222,7 +222,7 @@ Name | Type | Description | Notes
222
222
  ### HTTP request headers
223
223
 
224
224
  - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
225
- - **Accept**: application/json, text/json, application/xml, text/xml
225
+ - **Accept**: application/json
226
226
 
227
227
 
228
228