cloudmersive-nlp-api-client 2.0.4 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +25 -10
- data/docs/AnalyticsApi.md +283 -0
- data/docs/ExtractEntitiesApi.md +1 -1
- data/docs/HateSpeechAnalysisRequest.md +8 -0
- data/docs/HateSpeechAnalysisResponse.md +10 -0
- data/docs/LanguageDetectionApi.md +1 -1
- data/docs/LanguageTranslationApi.md +4 -4
- data/docs/ParseApi.md +1 -1
- data/docs/PosTaggerApi.md +6 -6
- data/docs/ProfanityAnalysisRequest.md +8 -0
- data/docs/ProfanityAnalysisResponse.md +10 -0
- data/docs/RephraseApi.md +6 -6
- data/docs/SegmentationApi.md +2 -2
- data/docs/SentimentAnalysisRequest.md +8 -0
- data/docs/SentimentAnalysisResponse.md +11 -0
- data/docs/SimilarityAnalysisRequest.md +9 -0
- data/docs/SimilarityAnalysisResponse.md +10 -0
- data/docs/SpellcheckApi.md +2 -2
- data/docs/SubjectivityAnalysisRequest.md +8 -0
- data/docs/SubjectivityAnalysisResponse.md +10 -0
- data/lib/cloudmersive-nlp-api-client.rb +11 -0
- data/lib/cloudmersive-nlp-api-client/api/analytics_api.rb +298 -0
- data/lib/cloudmersive-nlp-api-client/api/extract_entities_api.rb +1 -1
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +1 -1
- data/lib/cloudmersive-nlp-api-client/api/language_translation_api.rb +4 -4
- data/lib/cloudmersive-nlp-api-client/api/parse_api.rb +1 -1
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_api.rb +6 -6
- data/lib/cloudmersive-nlp-api-client/api/rephrase_api.rb +7 -7
- data/lib/cloudmersive-nlp-api-client/api/segmentation_api.rb +2 -2
- data/lib/cloudmersive-nlp-api-client/api/spellcheck_api.rb +2 -2
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/hate_speech_analysis_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/profanity_analysis_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/sentiment_analysis_response.rb +219 -0
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_request.rb +199 -0
- data/lib/cloudmersive-nlp-api-client/models/similarity_analysis_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/subjectivity_analysis_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/version.rb +1 -1
- data/spec/api/analytics_api_spec.rb +95 -0
- data/spec/api/rephrase_api_spec.rb +2 -2
- data/spec/models/hate_speech_analysis_request_spec.rb +42 -0
- data/spec/models/hate_speech_analysis_response_spec.rb +54 -0
- data/spec/models/profanity_analysis_request_spec.rb +42 -0
- data/spec/models/profanity_analysis_response_spec.rb +54 -0
- data/spec/models/sentiment_analysis_request_spec.rb +42 -0
- data/spec/models/sentiment_analysis_response_spec.rb +60 -0
- data/spec/models/similarity_analysis_request_spec.rb +48 -0
- data/spec/models/similarity_analysis_response_spec.rb +54 -0
- data/spec/models/subjectivity_analysis_request_spec.rb +42 -0
- data/spec/models/subjectivity_analysis_response_spec.rb +54 -0
- metadata +35 -2
    
        data/docs/ParseApi.md
    CHANGED
    
    | @@ -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 | 
| 60 | 
            +
             - **Accept**: application/json
         | 
| 61 61 |  | 
| 62 62 |  | 
| 63 63 |  | 
    
        data/docs/PosTaggerApi.md
    CHANGED
    
    | @@ -62,7 +62,7 @@ Name | Type | Description  | Notes | |
| 62 62 | 
             
            ### HTTP request headers
         | 
| 63 63 |  | 
| 64 64 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 65 | 
            -
             - **Accept**: application/json | 
| 65 | 
            +
             - **Accept**: application/json
         | 
| 66 66 |  | 
| 67 67 |  | 
| 68 68 |  | 
| @@ -116,7 +116,7 @@ Name | Type | Description  | Notes | |
| 116 116 | 
             
            ### HTTP request headers
         | 
| 117 117 |  | 
| 118 118 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 119 | 
            -
             - **Accept**: application/json | 
| 119 | 
            +
             - **Accept**: application/json
         | 
| 120 120 |  | 
| 121 121 |  | 
| 122 122 |  | 
| @@ -170,7 +170,7 @@ Name | Type | Description  | Notes | |
| 170 170 | 
             
            ### HTTP request headers
         | 
| 171 171 |  | 
| 172 172 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 173 | 
            -
             - **Accept**: application/json | 
| 173 | 
            +
             - **Accept**: application/json
         | 
| 174 174 |  | 
| 175 175 |  | 
| 176 176 |  | 
| @@ -224,7 +224,7 @@ Name | Type | Description  | Notes | |
| 224 224 | 
             
            ### HTTP request headers
         | 
| 225 225 |  | 
| 226 226 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 227 | 
            -
             - **Accept**: application/json | 
| 227 | 
            +
             - **Accept**: application/json
         | 
| 228 228 |  | 
| 229 229 |  | 
| 230 230 |  | 
| @@ -278,7 +278,7 @@ Name | Type | Description  | Notes | |
| 278 278 | 
             
            ### HTTP request headers
         | 
| 279 279 |  | 
| 280 280 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 281 | 
            -
             - **Accept**: application/json | 
| 281 | 
            +
             - **Accept**: application/json
         | 
| 282 282 |  | 
| 283 283 |  | 
| 284 284 |  | 
| @@ -332,7 +332,7 @@ Name | Type | Description  | Notes | |
| 332 332 | 
             
            ### HTTP request headers
         | 
| 333 333 |  | 
| 334 334 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 335 | 
            -
             - **Accept**: application/json | 
| 335 | 
            +
             - **Accept**: application/json
         | 
| 336 336 |  | 
| 337 337 |  | 
| 338 338 |  | 
| @@ -0,0 +1,10 @@ | |
| 1 | 
            +
            # CloudmersiveNlpApiClient::ProfanityAnalysisResponse
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Properties
         | 
| 4 | 
            +
            Name | Type | Description | Notes
         | 
| 5 | 
            +
            ------------ | ------------- | ------------- | -------------
         | 
| 6 | 
            +
            **successful** | **BOOLEAN** | True if the profanity detection operation was successful, false otherwise | [optional] 
         | 
| 7 | 
            +
            **profanity_score_result** | **Float** | Profanity classification score between 0.0 and 1.0 where scores closer to zero have a low probability of being profane or contain obscene language, while scores close to 1.0 have a high probability of being profane or containing obscene language.  Values above 0.8 have a very high probability of being profane. | [optional] 
         | 
| 8 | 
            +
            **sentence_count** | **Integer** | Number of sentences in input text | [optional] 
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
    
        data/docs/RephraseApi.md
    CHANGED
    
    | @@ -4,11 +4,11 @@ All URIs are relative to *https://api.cloudmersive.com* | |
| 4 4 |  | 
| 5 5 | 
             
            Method | HTTP request | Description
         | 
| 6 6 | 
             
            ------------- | ------------- | -------------
         | 
| 7 | 
            -
            [** | 
| 7 | 
            +
            [**rephrase_english_rephrase_sentence_by_sentence**](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
         | 
| 8 8 |  | 
| 9 9 |  | 
| 10 | 
            -
            # ** | 
| 11 | 
            -
            > RephraseResponse  | 
| 10 | 
            +
            # **rephrase_english_rephrase_sentence_by_sentence**
         | 
| 11 | 
            +
            > RephraseResponse rephrase_english_rephrase_sentence_by_sentence(input)
         | 
| 12 12 |  | 
| 13 13 | 
             
            Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
         | 
| 14 14 |  | 
| @@ -33,10 +33,10 @@ input = CloudmersiveNlpApiClient::RephraseRequest.new # RephraseRequest | Input | |
| 33 33 |  | 
| 34 34 | 
             
            begin
         | 
| 35 35 | 
             
              #Rephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
         | 
| 36 | 
            -
              result = api_instance. | 
| 36 | 
            +
              result = api_instance.rephrase_english_rephrase_sentence_by_sentence(input)
         | 
| 37 37 | 
             
              p result
         | 
| 38 38 | 
             
            rescue CloudmersiveNlpApiClient::ApiError => e
         | 
| 39 | 
            -
              puts "Exception when calling RephraseApi-> | 
| 39 | 
            +
              puts "Exception when calling RephraseApi->rephrase_english_rephrase_sentence_by_sentence: #{e}"
         | 
| 40 40 | 
             
            end
         | 
| 41 41 | 
             
            ```
         | 
| 42 42 |  | 
| @@ -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 | 
| 60 | 
            +
             - **Accept**: application/json
         | 
| 61 61 |  | 
| 62 62 |  | 
| 63 63 |  | 
    
        data/docs/SegmentationApi.md
    CHANGED
    
    | @@ -58,7 +58,7 @@ Name | Type | Description  | Notes | |
| 58 58 | 
             
            ### HTTP request headers
         | 
| 59 59 |  | 
| 60 60 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 61 | 
            -
             - **Accept**: application/json | 
| 61 | 
            +
             - **Accept**: application/json
         | 
| 62 62 |  | 
| 63 63 |  | 
| 64 64 |  | 
| @@ -112,7 +112,7 @@ Name | Type | Description  | Notes | |
| 112 112 | 
             
            ### HTTP request headers
         | 
| 113 113 |  | 
| 114 114 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 115 | 
            -
             - **Accept**: application/json | 
| 115 | 
            +
             - **Accept**: application/json
         | 
| 116 116 |  | 
| 117 117 |  | 
| 118 118 |  | 
| @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            # CloudmersiveNlpApiClient::SentimentAnalysisResponse
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Properties
         | 
| 4 | 
            +
            Name | Type | Description | Notes
         | 
| 5 | 
            +
            ------------ | ------------- | ------------- | -------------
         | 
| 6 | 
            +
            **successful** | **BOOLEAN** | True if the sentiment analysis operation was successful, false otherwise | [optional] 
         | 
| 7 | 
            +
            **sentiment_classification_result** | **String** | Classification of input text into a sentiment classification; possible values are \"Positive\", \"Negative\" or \"Neutral\" | [optional] 
         | 
| 8 | 
            +
            **sentiment_score_result** | **Float** | Sentiment classification score between -1.0 and +1.0 where scores less than 0 are negative sentiment, scores greater than 0 are positive sentiment and scores close to 0 are neutral.  The greater the value deviates from 0.0 the stronger the sentiment, with +1.0 and -1.0 being maximum positive and negative sentiment, respectively. | [optional] 
         | 
| 9 | 
            +
            **sentence_count** | **Integer** | Number of sentences in input text | [optional] 
         | 
| 10 | 
            +
             | 
| 11 | 
            +
             | 
| @@ -0,0 +1,9 @@ | |
| 1 | 
            +
            # CloudmersiveNlpApiClient::SimilarityAnalysisRequest
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Properties
         | 
| 4 | 
            +
            Name | Type | Description | Notes
         | 
| 5 | 
            +
            ------------ | ------------- | ------------- | -------------
         | 
| 6 | 
            +
            **text_to_analyze1** | **String** | First text to analyze | [optional] 
         | 
| 7 | 
            +
            **text_to_analyze2** | **String** | Second text to analyze | [optional] 
         | 
| 8 | 
            +
             | 
| 9 | 
            +
             | 
| @@ -0,0 +1,10 @@ | |
| 1 | 
            +
            # CloudmersiveNlpApiClient::SimilarityAnalysisResponse
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Properties
         | 
| 4 | 
            +
            Name | Type | Description | Notes
         | 
| 5 | 
            +
            ------------ | ------------- | ------------- | -------------
         | 
| 6 | 
            +
            **successful** | **BOOLEAN** | True if the similarity analysis operation was successful, false otherwise | [optional] 
         | 
| 7 | 
            +
            **similarity_score_result** | **Float** | Similarity score between 0.0 and 1.0 where scores closer to zero have a low probability of semantic similarity, while scores close to 1.0 have a high probability of semantic similarity. | [optional] 
         | 
| 8 | 
            +
            **sentence_count** | **Integer** | Number of sentences in input text | [optional] 
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
    
        data/docs/SpellcheckApi.md
    CHANGED
    
    | @@ -58,7 +58,7 @@ Name | Type | Description  | Notes | |
| 58 58 | 
             
            ### HTTP request headers
         | 
| 59 59 |  | 
| 60 60 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 61 | 
            -
             - **Accept**: application/json | 
| 61 | 
            +
             - **Accept**: application/json
         | 
| 62 62 |  | 
| 63 63 |  | 
| 64 64 |  | 
| @@ -112,7 +112,7 @@ Name | Type | Description  | Notes | |
| 112 112 | 
             
            ### HTTP request headers
         | 
| 113 113 |  | 
| 114 114 | 
             
             - **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
         | 
| 115 | 
            -
             - **Accept**: application/json | 
| 115 | 
            +
             - **Accept**: application/json
         | 
| 116 116 |  | 
| 117 117 |  | 
| 118 118 |  | 
| @@ -0,0 +1,10 @@ | |
| 1 | 
            +
            # CloudmersiveNlpApiClient::SubjectivityAnalysisResponse
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Properties
         | 
| 4 | 
            +
            Name | Type | Description | Notes
         | 
| 5 | 
            +
            ------------ | ------------- | ------------- | -------------
         | 
| 6 | 
            +
            **successful** | **BOOLEAN** | True if the subjectivity analysis operation was successful, false otherwise | [optional] 
         | 
| 7 | 
            +
            **subjectivity_score_result** | **Float** | Subjectivity vs. objectivity classification score between 0.0 and 1.0 where scores closer to zero have a high probability of objectivity, while scores close to 1.0 have a high probability of subjectivity. | [optional] 
         | 
| 8 | 
            +
            **sentence_count** | **Integer** | Number of sentences in input text | [optional] 
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
| @@ -27,6 +27,8 @@ require 'cloudmersive-nlp-api-client/models/extract_entities_request' | |
| 27 27 | 
             
            require 'cloudmersive-nlp-api-client/models/extract_entities_response'
         | 
| 28 28 | 
             
            require 'cloudmersive-nlp-api-client/models/get_words_request'
         | 
| 29 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'
         | 
| 30 32 | 
             
            require 'cloudmersive-nlp-api-client/models/language_detection_request'
         | 
| 31 33 | 
             
            require 'cloudmersive-nlp-api-client/models/language_detection_response'
         | 
| 32 34 | 
             
            require 'cloudmersive-nlp-api-client/models/language_translation_request'
         | 
| @@ -37,15 +39,24 @@ require 'cloudmersive-nlp-api-client/models/pos_request' | |
| 37 39 | 
             
            require 'cloudmersive-nlp-api-client/models/pos_response'
         | 
| 38 40 | 
             
            require 'cloudmersive-nlp-api-client/models/pos_sentence'
         | 
| 39 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'
         | 
| 40 44 | 
             
            require 'cloudmersive-nlp-api-client/models/rephrase_request'
         | 
| 41 45 | 
             
            require 'cloudmersive-nlp-api-client/models/rephrase_response'
         | 
| 42 46 | 
             
            require 'cloudmersive-nlp-api-client/models/rephrased_sentence'
         | 
| 43 47 | 
             
            require 'cloudmersive-nlp-api-client/models/rephrased_sentence_option'
         | 
| 44 48 | 
             
            require 'cloudmersive-nlp-api-client/models/sentence_segmentation_request'
         | 
| 45 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'
         | 
| 46 56 | 
             
            require 'cloudmersive-nlp-api-client/models/word_position'
         | 
| 47 57 |  | 
| 48 58 | 
             
            # APIs
         | 
| 59 | 
            +
            require 'cloudmersive-nlp-api-client/api/analytics_api'
         | 
| 49 60 | 
             
            require 'cloudmersive-nlp-api-client/api/extract_entities_api'
         | 
| 50 61 | 
             
            require 'cloudmersive-nlp-api-client/api/language_detection_api'
         | 
| 51 62 | 
             
            require 'cloudmersive-nlp-api-client/api/language_translation_api'
         | 
| @@ -0,0 +1,298 @@ | |
| 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
         |