azure_cognitiveservices_textanalytics 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_cognitiveservices_textanalytics.rb +6 -0
  4. data/lib/module_definition.rb +7 -0
  5. data/lib/profiles/latest/modules/textanalytics_profile_module.rb +117 -0
  6. data/lib/profiles/latest/textanalytics_latest_profile_client.rb +38 -0
  7. data/lib/profiles/latest/textanalytics_module_definition.rb +8 -0
  8. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics.rb +42 -0
  9. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/azure_regions.rb +26 -0
  10. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/batch_input.rb +56 -0
  11. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/detected_language.rb +72 -0
  12. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/error_record.rb +58 -0
  13. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/error_response.rb +81 -0
  14. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/input.rb +58 -0
  15. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/internal_error.rb +70 -0
  16. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/key_phrase_batch_result.rb +78 -0
  17. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/key_phrase_batch_result_item.rb +70 -0
  18. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/language_batch_result.rb +78 -0
  19. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/language_batch_result_item.rb +69 -0
  20. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/multi_language_batch_input.rb +56 -0
  21. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/multi_language_input.rb +70 -0
  22. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/sentiment_batch_result.rb +78 -0
  23. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/models/sentiment_batch_result_item.rb +63 -0
  24. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/module_definition.rb +9 -0
  25. data/lib/v2.0/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb +468 -0
  26. data/lib/version.rb +7 -0
  27. metadata +145 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f341f103dec2eebc55f252e138e7b0d0016fa602
4
+ data.tar.gz: 03dcb7704cf0049aa71b6c010ef15ef5e5b6ec32
5
+ SHA512:
6
+ metadata.gz: 3f6575a4527069599ec6e810ab6be8adeee10af1c190373b3ccbf08ca4f92885ed05a1edb21b186bf2b1f0df3b483107fd20c55ee9e8b490d45391c62f20acfc
7
+ data.tar.gz: 1d4275f9c30ea4669e1d357b0d46fd836aeee27c90659f6b8ee0bc10e4a1c511b39a1b8b219ba0fc3cac3be2f83518de56b00872d2cb4478a62304de7f59f5a3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'v2.0/generated/azure_cognitiveservices_textanalytics'
6
+ require 'profiles/latest/textanalytics_latest_profile_client'
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::CognitiveServices end
7
+ module Azure::CognitiveServices::TextAnalytics end
@@ -0,0 +1,117 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'azure_cognitiveservices_textanalytics'
6
+
7
+ module Azure::TextAnalytics::Profiles::Latest
8
+
9
+ module Models
10
+ Input = Azure::CognitiveServices::TextAnalytics::V2_0::Models::Input
11
+ MultiLanguageInput = Azure::CognitiveServices::TextAnalytics::V2_0::Models::MultiLanguageInput
12
+ BatchInput = Azure::CognitiveServices::TextAnalytics::V2_0::Models::BatchInput
13
+ KeyPhraseBatchResultItem = Azure::CognitiveServices::TextAnalytics::V2_0::Models::KeyPhraseBatchResultItem
14
+ DetectedLanguage = Azure::CognitiveServices::TextAnalytics::V2_0::Models::DetectedLanguage
15
+ KeyPhraseBatchResult = Azure::CognitiveServices::TextAnalytics::V2_0::Models::KeyPhraseBatchResult
16
+ LanguageBatchResultItem = Azure::CognitiveServices::TextAnalytics::V2_0::Models::LanguageBatchResultItem
17
+ ErrorResponse = Azure::CognitiveServices::TextAnalytics::V2_0::Models::ErrorResponse
18
+ LanguageBatchResult = Azure::CognitiveServices::TextAnalytics::V2_0::Models::LanguageBatchResult
19
+ ErrorRecord = Azure::CognitiveServices::TextAnalytics::V2_0::Models::ErrorRecord
20
+ SentimentBatchResultItem = Azure::CognitiveServices::TextAnalytics::V2_0::Models::SentimentBatchResultItem
21
+ MultiLanguageBatchInput = Azure::CognitiveServices::TextAnalytics::V2_0::Models::MultiLanguageBatchInput
22
+ SentimentBatchResult = Azure::CognitiveServices::TextAnalytics::V2_0::Models::SentimentBatchResult
23
+ InternalError = Azure::CognitiveServices::TextAnalytics::V2_0::Models::InternalError
24
+ AzureRegions = Azure::CognitiveServices::TextAnalytics::V2_0::Models::AzureRegions
25
+ end
26
+
27
+ #
28
+ # TextAnalyticsDataClass
29
+ #
30
+ class TextAnalyticsDataClass
31
+ attr_reader :configurable, :base_url, :options, :model_classes
32
+
33
+ def initialize(options = {})
34
+ if options.is_a?(Hash) && options.length == 0
35
+ @options = setup_default_options
36
+ else
37
+ @options = options
38
+ end
39
+
40
+ reset!(options)
41
+
42
+ @configurable = self
43
+ @base_url = options[:base_url].nil? ? nil:options[:base_url]
44
+ @options = options[:options].nil? ? nil:options[:options]
45
+
46
+ @client_0 = Azure::CognitiveServices::TextAnalytics::V2_0::TextAnalyticsClient.new(configurable.credentials, options)
47
+ if(@client_0.respond_to?(:subscription_id))
48
+ @client_0.subscription_id = configurable.subscription_id
49
+ end
50
+ add_telemetry(@client_0)
51
+
52
+ @model_classes = ModelClasses.new
53
+ end
54
+
55
+ def add_telemetry(client)
56
+ profile_information = 'Profiles/Latest/TextAnalytics'
57
+ client.add_user_agent_information(profile_information)
58
+ end
59
+
60
+ def method_missing(method, *args)
61
+ if @client_0.respond_to?method
62
+ @client_0.send(method, *args)
63
+ else
64
+ super
65
+ end
66
+ end
67
+
68
+ end
69
+
70
+ class ModelClasses
71
+ def input
72
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::Input
73
+ end
74
+ def multi_language_input
75
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::MultiLanguageInput
76
+ end
77
+ def batch_input
78
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::BatchInput
79
+ end
80
+ def key_phrase_batch_result_item
81
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::KeyPhraseBatchResultItem
82
+ end
83
+ def detected_language
84
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::DetectedLanguage
85
+ end
86
+ def key_phrase_batch_result
87
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::KeyPhraseBatchResult
88
+ end
89
+ def language_batch_result_item
90
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::LanguageBatchResultItem
91
+ end
92
+ def error_response
93
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::ErrorResponse
94
+ end
95
+ def language_batch_result
96
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::LanguageBatchResult
97
+ end
98
+ def error_record
99
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::ErrorRecord
100
+ end
101
+ def sentiment_batch_result_item
102
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::SentimentBatchResultItem
103
+ end
104
+ def multi_language_batch_input
105
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::MultiLanguageBatchInput
106
+ end
107
+ def sentiment_batch_result
108
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::SentimentBatchResult
109
+ end
110
+ def internal_error
111
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::InternalError
112
+ end
113
+ def azure_regions
114
+ Azure::CognitiveServices::TextAnalytics::V2_0::Models::AzureRegions
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,38 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'profiles/latest/textanalytics_module_definition'
6
+ require 'profiles/latest/modules/textanalytics_profile_module'
7
+
8
+ module Azure::TextAnalytics::Profiles::Latest
9
+ #
10
+ # Client class for the Latest profile SDK.
11
+ #
12
+ class Client < TextAnalyticsDataClass
13
+ include MsRestAzure::Common::Configurable
14
+
15
+ #
16
+ # Initializes a new instance of the Client class.
17
+ # @param options [Hash] hash of client options.
18
+ # options = {
19
+ # tenant_id: 'YOUR TENANT ID',
20
+ # client_id: 'YOUR CLIENT ID',
21
+ # client_secret: 'YOUR CLIENT SECRET',
22
+ # subscription_id: 'YOUR SUBSCRIPTION ID',
23
+ # credentials: credentials,
24
+ # active_directory_settings: active_directory_settings,
25
+ # base_url: 'YOUR BASE URL',
26
+ # options: options
27
+ # }
28
+ # 'credentials' are optional and if not passed in the hash, will be obtained
29
+ # from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
30
+ #
31
+ # Also, base_url, active_directory_settings & options are optional.
32
+ #
33
+ def initialize(options = {})
34
+ super(options)
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::TextAnalytics end
7
+ module Azure::TextAnalytics::Profiles end
8
+ module Azure::TextAnalytics::Profiles::Latest end
@@ -0,0 +1,42 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require 'v2.0/generated/azure_cognitiveservices_textanalytics/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::CognitiveServices::TextAnalytics::V2_0
23
+ autoload :TextAnalyticsClient, 'v2.0/generated/azure_cognitiveservices_textanalytics/text_analytics_client.rb'
24
+
25
+ module Models
26
+ autoload :Input, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/input.rb'
27
+ autoload :MultiLanguageInput, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/multi_language_input.rb'
28
+ autoload :BatchInput, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/batch_input.rb'
29
+ autoload :KeyPhraseBatchResultItem, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/key_phrase_batch_result_item.rb'
30
+ autoload :DetectedLanguage, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/detected_language.rb'
31
+ autoload :KeyPhraseBatchResult, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/key_phrase_batch_result.rb'
32
+ autoload :LanguageBatchResultItem, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/language_batch_result_item.rb'
33
+ autoload :ErrorResponse, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/error_response.rb'
34
+ autoload :LanguageBatchResult, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/language_batch_result.rb'
35
+ autoload :ErrorRecord, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/error_record.rb'
36
+ autoload :SentimentBatchResultItem, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/sentiment_batch_result_item.rb'
37
+ autoload :MultiLanguageBatchInput, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/multi_language_batch_input.rb'
38
+ autoload :SentimentBatchResult, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/sentiment_batch_result.rb'
39
+ autoload :InternalError, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/internal_error.rb'
40
+ autoload :AzureRegions, 'v2.0/generated/azure_cognitiveservices_textanalytics/models/azure_regions.rb'
41
+ end
42
+ end
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::TextAnalytics::V2_0
7
+ module Models
8
+ #
9
+ # Defines values for AzureRegions
10
+ #
11
+ module AzureRegions
12
+ Westus = "westus"
13
+ Westeurope = "westeurope"
14
+ Southeastasia = "southeastasia"
15
+ Eastus2 = "eastus2"
16
+ Westcentralus = "westcentralus"
17
+ Westus2 = "westus2"
18
+ Eastus = "eastus"
19
+ Southcentralus = "southcentralus"
20
+ Northeurope = "northeurope"
21
+ Eastasia = "eastasia"
22
+ Australiaeast = "australiaeast"
23
+ Brazilsouth = "brazilsouth"
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::TextAnalytics::V2_0
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class BatchInput
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<Input>]
17
+ attr_accessor :documents
18
+
19
+
20
+ #
21
+ # Mapper for BatchInput class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'BatchInput',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'BatchInput',
32
+ model_properties: {
33
+ documents: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'documents',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'InputElementType',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'Input'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,72 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::TextAnalytics::V2_0
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class DetectedLanguage
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Long name of a detected language (e.g. English,
17
+ # French).
18
+ attr_accessor :name
19
+
20
+ # @return [String] A two letter representation of the detected language
21
+ # according to the ISO 639-1 standard (e.g. en, fr).
22
+ attr_accessor :iso6391name
23
+
24
+ # @return [Float] A confidence score between 0 and 1. Scores close to 1
25
+ # indicate 100% certainty that the identified language is true.
26
+ attr_accessor :score
27
+
28
+
29
+ #
30
+ # Mapper for DetectedLanguage class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ client_side_validation: true,
36
+ required: false,
37
+ serialized_name: 'DetectedLanguage',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'DetectedLanguage',
41
+ model_properties: {
42
+ name: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ iso6391name: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ serialized_name: 'iso6391Name',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ score: {
59
+ client_side_validation: true,
60
+ required: false,
61
+ serialized_name: 'score',
62
+ type: {
63
+ name: 'Double'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::TextAnalytics::V2_0
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class ErrorRecord
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Input document unique identifier the error refers to.
17
+ attr_accessor :id
18
+
19
+ # @return [String] Error message.
20
+ attr_accessor :message
21
+
22
+
23
+ #
24
+ # Mapper for ErrorRecord class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'ErrorRecord',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'ErrorRecord',
35
+ model_properties: {
36
+ id: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ message: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'message',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end