cloudmersive-nlp-api-client 2.0.9 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +3 -154
- data/Gemfile +0 -7
- data/README.md +0 -160
- data/Rakefile +0 -8
- data/cloudmersive-nlp-api-client.gemspec +0 -45
- data/docs/AnalyticsApi.md +0 -283
- data/docs/CheckSentenceRequest.md +0 -8
- data/docs/CheckSentenceResponse.md +0 -9
- data/docs/CheckWordRequest.md +0 -8
- data/docs/CheckWordResponse.md +0 -9
- data/docs/CorrectWordInSentence.md +0 -10
- data/docs/Entity.md +0 -9
- data/docs/ExtractEntitiesApi.md +0 -63
- data/docs/ExtractEntitiesRequest.md +0 -8
- data/docs/ExtractEntitiesResponse.md +0 -9
- data/docs/GetWordsRequest.md +0 -8
- data/docs/GetWordsResponse.md +0 -8
- data/docs/HateSpeechAnalysisRequest.md +0 -8
- data/docs/HateSpeechAnalysisResponse.md +0 -10
- data/docs/LanguageDetectionApi.md +0 -63
- data/docs/LanguageDetectionRequest.md +0 -8
- data/docs/LanguageDetectionResponse.md +0 -10
- data/docs/LanguageTranslationApi.md +0 -228
- data/docs/LanguageTranslationRequest.md +0 -8
- data/docs/LanguageTranslationResponse.md +0 -10
- data/docs/ParseApi.md +0 -63
- data/docs/ParseRequest.md +0 -8
- data/docs/ParseResponse.md +0 -8
- data/docs/PosRequest.md +0 -8
- data/docs/PosResponse.md +0 -8
- data/docs/PosSentence.md +0 -8
- data/docs/PosTaggedWord.md +0 -9
- data/docs/PosTaggerApi.md +0 -338
- data/docs/ProfanityAnalysisRequest.md +0 -8
- data/docs/ProfanityAnalysisResponse.md +0 -10
- data/docs/RephraseApi.md +0 -63
- data/docs/RephraseRequest.md +0 -9
- data/docs/RephraseResponse.md +0 -10
- data/docs/RephrasedSentence.md +0 -10
- data/docs/RephrasedSentenceOption.md +0 -9
- data/docs/SegmentationApi.md +0 -118
- data/docs/SentenceSegmentationRequest.md +0 -8
- data/docs/SentenceSegmentationResponse.md +0 -10
- data/docs/SentimentAnalysisRequest.md +0 -8
- data/docs/SentimentAnalysisResponse.md +0 -11
- data/docs/SimilarityAnalysisRequest.md +0 -9
- data/docs/SimilarityAnalysisResponse.md +0 -10
- data/docs/SpellcheckApi.md +0 -118
- data/docs/SubjectivityAnalysisRequest.md +0 -8
- data/docs/SubjectivityAnalysisResponse.md +0 -10
- data/docs/WordPosition.md +0 -11
- data/git_push.sh +0 -55
- data/lib/cloudmersive-nlp-api-client.rb +0 -85
- data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +0 -298
- data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +0 -243
- data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +0 -353
- data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +0 -78
- data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +0 -133
- data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +0 -133
- data/lib/cloudmersive-nlp-api-client/api_client.rb +0 -389
- data/lib/cloudmersive-nlp-api-client/api_error.rb +0 -38
- data/lib/cloudmersive-nlp-api-client/configuration.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_response.rb +0 -201
- data/lib/cloudmersive-nlp-api-client/models/check_word_request.rb +0 -188
- data/lib/cloudmersive-nlp-api-client/models/check_word_response.rb +0 -201
- data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence.rb +0 -211
- data/lib/cloudmersive-nlp-api-client/models/entity.rb +0 -197
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/extract_entities_response.rb +0 -200
- data/lib/cloudmersive-nlp-api-client/models/get_words_request.rb +0 -188
- data/lib/cloudmersive-nlp-api-client/models/get_words_response.rb +0 -191
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/language_detection_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/language_translation_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/language_translation_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/parse_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/parse_response.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +0 -191
- data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +0 -191
- data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +0 -199
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/rephrase_request.rb +0 -199
- data/lib/cloudmersive-nlp-api-client/models/rephrase_response.rb +0 -211
- data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence.rb +0 -211
- data/lib/cloudmersive-nlp-api-client/models/rephrased_sentence_option.rb +0 -199
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_request.rb +0 -188
- data/lib/cloudmersive-nlp-api-client/models/sentence_segmentation_response.rb +0 -208
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +0 -219
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +0 -199
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +0 -189
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +0 -209
- data/lib/cloudmersive-nlp-api-client/models/word_position.rb +0 -219
- data/lib/cloudmersive-nlp-api-client/version.rb +0 -15
- data/spec/api/analytics_api_spec.rb +0 -95
- data/spec/api/extract_entities_api_spec.rb +0 -47
- data/spec/api/language_detection_api_spec.rb +0 -47
- data/spec/api/language_translation_api_spec.rb +0 -83
- data/spec/api/parse_api_spec.rb +0 -47
- data/spec/api/pos_tagger_api_spec.rb +0 -107
- data/spec/api/rephrase_api_spec.rb +0 -47
- data/spec/api/segmentation_api_spec.rb +0 -59
- data/spec/api/spellcheck_api_spec.rb +0 -59
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/check_sentence_request_spec.rb +0 -42
- data/spec/models/check_sentence_response_spec.rb +0 -48
- data/spec/models/check_word_request_spec.rb +0 -42
- data/spec/models/check_word_response_spec.rb +0 -48
- data/spec/models/correct_word_in_sentence_spec.rb +0 -54
- data/spec/models/entity_spec.rb +0 -48
- data/spec/models/extract_entities_request_spec.rb +0 -42
- data/spec/models/extract_entities_response_spec.rb +0 -48
- data/spec/models/get_words_request_spec.rb +0 -42
- data/spec/models/get_words_response_spec.rb +0 -42
- data/spec/models/hate_speech_analysis_request_spec.rb +0 -42
- data/spec/models/hate_speech_analysis_response_spec.rb +0 -54
- data/spec/models/language_detection_request_spec.rb +0 -42
- data/spec/models/language_detection_response_spec.rb +0 -54
- data/spec/models/language_translation_request_spec.rb +0 -42
- data/spec/models/language_translation_response_spec.rb +0 -54
- data/spec/models/parse_request_spec.rb +0 -42
- data/spec/models/parse_response_spec.rb +0 -42
- data/spec/models/pos_request_spec.rb +0 -42
- data/spec/models/pos_response_spec.rb +0 -42
- data/spec/models/pos_sentence_spec.rb +0 -42
- data/spec/models/pos_tagged_word_spec.rb +0 -48
- data/spec/models/profanity_analysis_request_spec.rb +0 -42
- data/spec/models/profanity_analysis_response_spec.rb +0 -54
- data/spec/models/rephrase_request_spec.rb +0 -48
- data/spec/models/rephrase_response_spec.rb +0 -54
- data/spec/models/rephrased_sentence_option_spec.rb +0 -48
- data/spec/models/rephrased_sentence_spec.rb +0 -54
- data/spec/models/sentence_segmentation_request_spec.rb +0 -42
- data/spec/models/sentence_segmentation_response_spec.rb +0 -54
- data/spec/models/sentiment_analysis_request_spec.rb +0 -42
- data/spec/models/sentiment_analysis_response_spec.rb +0 -60
- data/spec/models/similarity_analysis_request_spec.rb +0 -48
- data/spec/models/similarity_analysis_response_spec.rb +0 -54
- data/spec/models/subjectivity_analysis_request_spec.rb +0 -42
- data/spec/models/subjectivity_analysis_response_spec.rb +0 -54
- data/spec/models/word_position_spec.rb +0 -60
- data/spec/spec_helper.rb +0 -111
data/docs/WordPosition.md
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# CloudmersiveNlpApiClient::WordPosition
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
Name | Type | Description | Notes
|
5
|
-
------------ | ------------- | ------------- | -------------
|
6
|
-
**word** | **String** | Word as a string | [optional]
|
7
|
-
**word_index** | **Integer** | Zero-based index of the word; first word has index 0, second word has index 1 and so on | [optional]
|
8
|
-
**start_position** | **Integer** | Zero-based character offset at which the word begins in the input string | [optional]
|
9
|
-
**end_position** | **Integer** | Zero-based character offset at which the word ends in the input string | [optional]
|
10
|
-
|
11
|
-
|
data/git_push.sh
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
#
|
3
|
-
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
-
#
|
5
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
-
#
|
7
|
-
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
-
|
9
|
-
git_user_id=$1
|
10
|
-
git_repo_id=$2
|
11
|
-
release_note=$3
|
12
|
-
|
13
|
-
if [ "$git_user_id" = "" ]; then
|
14
|
-
git_user_id="GIT_USER_ID"
|
15
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
-
fi
|
17
|
-
|
18
|
-
if [ "$git_repo_id" = "" ]; then
|
19
|
-
git_repo_id="GIT_REPO_ID"
|
20
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
-
fi
|
22
|
-
|
23
|
-
if [ "$release_note" = "" ]; then
|
24
|
-
release_note="Minor update"
|
25
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
-
fi
|
27
|
-
|
28
|
-
# Initialize the local directory as a Git repository
|
29
|
-
git init
|
30
|
-
|
31
|
-
# Adds the files in the local repository and stages them for commit.
|
32
|
-
git add .
|
33
|
-
|
34
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
-
git commit -m "$release_note"
|
36
|
-
|
37
|
-
# Sets the new remote
|
38
|
-
git_remote=`git remote`
|
39
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
-
|
41
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
43
|
-
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
-
else
|
45
|
-
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
-
fi
|
47
|
-
|
48
|
-
fi
|
49
|
-
|
50
|
-
git pull origin master
|
51
|
-
|
52
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
-
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
-
git push origin master 2>&1 | grep -v 'To https'
|
55
|
-
|
@@ -1,85 +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/hate_speech_analysis_request'
|
31
|
-
require 'cloudmersive-nlp-api-client/models/hate_speech_analysis_response'
|
32
|
-
require 'cloudmersive-nlp-api-client/models/language_detection_request'
|
33
|
-
require 'cloudmersive-nlp-api-client/models/language_detection_response'
|
34
|
-
require 'cloudmersive-nlp-api-client/models/language_translation_request'
|
35
|
-
require 'cloudmersive-nlp-api-client/models/language_translation_response'
|
36
|
-
require 'cloudmersive-nlp-api-client/models/parse_request'
|
37
|
-
require 'cloudmersive-nlp-api-client/models/parse_response'
|
38
|
-
require 'cloudmersive-nlp-api-client/models/pos_request'
|
39
|
-
require 'cloudmersive-nlp-api-client/models/pos_response'
|
40
|
-
require 'cloudmersive-nlp-api-client/models/pos_sentence'
|
41
|
-
require 'cloudmersive-nlp-api-client/models/pos_tagged_word'
|
42
|
-
require 'cloudmersive-nlp-api-client/models/profanity_analysis_request'
|
43
|
-
require 'cloudmersive-nlp-api-client/models/profanity_analysis_response'
|
44
|
-
require 'cloudmersive-nlp-api-client/models/rephrase_request'
|
45
|
-
require 'cloudmersive-nlp-api-client/models/rephrase_response'
|
46
|
-
require 'cloudmersive-nlp-api-client/models/rephrased_sentence'
|
47
|
-
require 'cloudmersive-nlp-api-client/models/rephrased_sentence_option'
|
48
|
-
require 'cloudmersive-nlp-api-client/models/sentence_segmentation_request'
|
49
|
-
require 'cloudmersive-nlp-api-client/models/sentence_segmentation_response'
|
50
|
-
require 'cloudmersive-nlp-api-client/models/sentiment_analysis_request'
|
51
|
-
require 'cloudmersive-nlp-api-client/models/sentiment_analysis_response'
|
52
|
-
require 'cloudmersive-nlp-api-client/models/similarity_analysis_request'
|
53
|
-
require 'cloudmersive-nlp-api-client/models/similarity_analysis_response'
|
54
|
-
require 'cloudmersive-nlp-api-client/models/subjectivity_analysis_request'
|
55
|
-
require 'cloudmersive-nlp-api-client/models/subjectivity_analysis_response'
|
56
|
-
require 'cloudmersive-nlp-api-client/models/word_position'
|
57
|
-
|
58
|
-
# APIs
|
59
|
-
require 'cloudmersive-nlp-api-client/api/analytics_api'
|
60
|
-
require 'cloudmersive-nlp-api-client/api/extract_entities_api'
|
61
|
-
require 'cloudmersive-nlp-api-client/api/language_detection_api'
|
62
|
-
require 'cloudmersive-nlp-api-client/api/language_translation_api'
|
63
|
-
require 'cloudmersive-nlp-api-client/api/parse_api'
|
64
|
-
require 'cloudmersive-nlp-api-client/api/pos_tagger_api'
|
65
|
-
require 'cloudmersive-nlp-api-client/api/rephrase_api'
|
66
|
-
require 'cloudmersive-nlp-api-client/api/segmentation_api'
|
67
|
-
require 'cloudmersive-nlp-api-client/api/spellcheck_api'
|
68
|
-
|
69
|
-
module CloudmersiveNlpApiClient
|
70
|
-
class << self
|
71
|
-
# Customize default settings for the SDK using block.
|
72
|
-
# CloudmersiveNlpApiClient.configure do |config|
|
73
|
-
# config.username = "xxx"
|
74
|
-
# config.password = "xxx"
|
75
|
-
# end
|
76
|
-
# If no block given, return the default Configuration object.
|
77
|
-
def configure
|
78
|
-
if block_given?
|
79
|
-
yield(Configuration.default)
|
80
|
-
else
|
81
|
-
Configuration.default
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
@@ -1,298 +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 Hate Speech Analysis and Detection on Text
|
24
|
-
# 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.
|
25
|
-
# @param input Input hate speech analysis request
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [HateSpeechAnalysisResponse]
|
28
|
-
def analytics_hate_speech(input, opts = {})
|
29
|
-
data, _status_code, _headers = analytics_hate_speech_with_http_info(input, opts)
|
30
|
-
return data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Perform Hate Speech Analysis and Detection on Text
|
34
|
-
# 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.
|
35
|
-
# @param input Input hate speech analysis request
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<(HateSpeechAnalysisResponse, Fixnum, Hash)>] HateSpeechAnalysisResponse data, response status code and response headers
|
38
|
-
def analytics_hate_speech_with_http_info(input, opts = {})
|
39
|
-
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_hate_speech ..."
|
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_hate_speech"
|
45
|
-
end
|
46
|
-
# resource path
|
47
|
-
local_var_path = "/nlp-v2/analytics/hate-speech"
|
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'])
|
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 => 'HateSpeechAnalysisResponse')
|
72
|
-
if @api_client.config.debugging
|
73
|
-
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_hate_speech\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
-
end
|
75
|
-
return data, status_code, headers
|
76
|
-
end
|
77
|
-
|
78
|
-
# Perform Profanity and Obscene Language Analysis and Detection on Text
|
79
|
-
# 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.
|
80
|
-
# @param input Input profanity analysis request
|
81
|
-
# @param [Hash] opts the optional parameters
|
82
|
-
# @return [ProfanityAnalysisResponse]
|
83
|
-
def analytics_profanity(input, opts = {})
|
84
|
-
data, _status_code, _headers = analytics_profanity_with_http_info(input, opts)
|
85
|
-
return data
|
86
|
-
end
|
87
|
-
|
88
|
-
# Perform Profanity and Obscene Language Analysis and Detection on Text
|
89
|
-
# 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.
|
90
|
-
# @param input Input profanity analysis request
|
91
|
-
# @param [Hash] opts the optional parameters
|
92
|
-
# @return [Array<(ProfanityAnalysisResponse, Fixnum, Hash)>] ProfanityAnalysisResponse data, response status code and response headers
|
93
|
-
def analytics_profanity_with_http_info(input, opts = {})
|
94
|
-
if @api_client.config.debugging
|
95
|
-
@api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_profanity ..."
|
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 AnalyticsApi.analytics_profanity"
|
100
|
-
end
|
101
|
-
# resource path
|
102
|
-
local_var_path = "/nlp-v2/analytics/profanity"
|
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'])
|
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 => 'ProfanityAnalysisResponse')
|
127
|
-
if @api_client.config.debugging
|
128
|
-
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_profanity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
-
end
|
130
|
-
return data, status_code, headers
|
131
|
-
end
|
132
|
-
|
133
|
-
# Perform Sentiment Analysis and Classification on Text
|
134
|
-
# 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.
|
135
|
-
# @param input Input sentiment analysis request
|
136
|
-
# @param [Hash] opts the optional parameters
|
137
|
-
# @return [SentimentAnalysisResponse]
|
138
|
-
def analytics_sentiment(input, opts = {})
|
139
|
-
data, _status_code, _headers = analytics_sentiment_with_http_info(input, opts)
|
140
|
-
return data
|
141
|
-
end
|
142
|
-
|
143
|
-
# Perform Sentiment Analysis and Classification on Text
|
144
|
-
# 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.
|
145
|
-
# @param input Input sentiment analysis request
|
146
|
-
# @param [Hash] opts the optional parameters
|
147
|
-
# @return [Array<(SentimentAnalysisResponse, Fixnum, Hash)>] SentimentAnalysisResponse data, response status code and response headers
|
148
|
-
def analytics_sentiment_with_http_info(input, opts = {})
|
149
|
-
if @api_client.config.debugging
|
150
|
-
@api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_sentiment ..."
|
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 AnalyticsApi.analytics_sentiment"
|
155
|
-
end
|
156
|
-
# resource path
|
157
|
-
local_var_path = "/nlp-v2/analytics/sentiment"
|
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'])
|
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 => 'SentimentAnalysisResponse')
|
182
|
-
if @api_client.config.debugging
|
183
|
-
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
184
|
-
end
|
185
|
-
return data, status_code, headers
|
186
|
-
end
|
187
|
-
|
188
|
-
# Perform Semantic Similarity Comparison of Two Strings
|
189
|
-
# 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.
|
190
|
-
# @param input Input similarity analysis request
|
191
|
-
# @param [Hash] opts the optional parameters
|
192
|
-
# @return [SimilarityAnalysisResponse]
|
193
|
-
def analytics_similarity(input, opts = {})
|
194
|
-
data, _status_code, _headers = analytics_similarity_with_http_info(input, opts)
|
195
|
-
return data
|
196
|
-
end
|
197
|
-
|
198
|
-
# Perform Semantic Similarity Comparison of Two Strings
|
199
|
-
# 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.
|
200
|
-
# @param input Input similarity analysis request
|
201
|
-
# @param [Hash] opts the optional parameters
|
202
|
-
# @return [Array<(SimilarityAnalysisResponse, Fixnum, Hash)>] SimilarityAnalysisResponse data, response status code and response headers
|
203
|
-
def analytics_similarity_with_http_info(input, opts = {})
|
204
|
-
if @api_client.config.debugging
|
205
|
-
@api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_similarity ..."
|
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 AnalyticsApi.analytics_similarity"
|
210
|
-
end
|
211
|
-
# resource path
|
212
|
-
local_var_path = "/nlp-v2/analytics/similarity"
|
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'])
|
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 => 'SimilarityAnalysisResponse')
|
237
|
-
if @api_client.config.debugging
|
238
|
-
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_similarity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
-
end
|
240
|
-
return data, status_code, headers
|
241
|
-
end
|
242
|
-
|
243
|
-
# Perform Subjectivity and Objectivity Analysis on Text
|
244
|
-
# 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.
|
245
|
-
# @param input Input subjectivity analysis request
|
246
|
-
# @param [Hash] opts the optional parameters
|
247
|
-
# @return [SubjectivityAnalysisResponse]
|
248
|
-
def analytics_subjectivity(input, opts = {})
|
249
|
-
data, _status_code, _headers = analytics_subjectivity_with_http_info(input, opts)
|
250
|
-
return data
|
251
|
-
end
|
252
|
-
|
253
|
-
# Perform Subjectivity and Objectivity Analysis on Text
|
254
|
-
# 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.
|
255
|
-
# @param input Input subjectivity analysis request
|
256
|
-
# @param [Hash] opts the optional parameters
|
257
|
-
# @return [Array<(SubjectivityAnalysisResponse, Fixnum, Hash)>] SubjectivityAnalysisResponse data, response status code and response headers
|
258
|
-
def analytics_subjectivity_with_http_info(input, opts = {})
|
259
|
-
if @api_client.config.debugging
|
260
|
-
@api_client.config.logger.debug "Calling API: AnalyticsApi.analytics_subjectivity ..."
|
261
|
-
end
|
262
|
-
# verify the required parameter 'input' is set
|
263
|
-
if @api_client.config.client_side_validation && input.nil?
|
264
|
-
fail ArgumentError, "Missing the required parameter 'input' when calling AnalyticsApi.analytics_subjectivity"
|
265
|
-
end
|
266
|
-
# resource path
|
267
|
-
local_var_path = "/nlp-v2/analytics/subjectivity"
|
268
|
-
|
269
|
-
# query parameters
|
270
|
-
query_params = {}
|
271
|
-
|
272
|
-
# header parameters
|
273
|
-
header_params = {}
|
274
|
-
# HTTP header 'Accept' (if needed)
|
275
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
276
|
-
# HTTP header 'Content-Type'
|
277
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
278
|
-
|
279
|
-
# form parameters
|
280
|
-
form_params = {}
|
281
|
-
|
282
|
-
# http body (model)
|
283
|
-
post_body = @api_client.object_to_http_body(input)
|
284
|
-
auth_names = ['Apikey']
|
285
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
286
|
-
:header_params => header_params,
|
287
|
-
:query_params => query_params,
|
288
|
-
:form_params => form_params,
|
289
|
-
:body => post_body,
|
290
|
-
:auth_names => auth_names,
|
291
|
-
:return_type => 'SubjectivityAnalysisResponse')
|
292
|
-
if @api_client.config.debugging
|
293
|
-
@api_client.config.logger.debug "API called: AnalyticsApi#analytics_subjectivity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
294
|
-
end
|
295
|
-
return data, status_code, headers
|
296
|
-
end
|
297
|
-
end
|
298
|
-
end
|