azure_cognitiveservices_computervision 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/1.0/generated/azure_cognitiveservices_computervision.rb +19 -17
- data/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +220 -132
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/azure_regions.rb +4 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb +1 -1
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb +78 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb +6 -16
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb +3 -2
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/{language1.rb → gender.rb} +4 -4
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +5 -7
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb +1 -1
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb +1 -1
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb +1 -1
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb +78 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb +57 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb +2 -3
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb +1 -1
- data/lib/2.0/generated/azure_cognitiveservices_computervision.rb +65 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +2257 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb +83 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/category.rb +69 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb +77 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb +69 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb +78 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/color_info.rb +98 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb +75 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error_codes.rb +27 -0
- data/lib/{1.0/generated/azure_cognitiveservices_computervision/models/domain_models.rb → 2.0/generated/azure_cognitiveservices_computervision/models/details.rb} +3 -3
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb +70 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/face_description.rb +71 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb +79 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/gender.rb +16 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +167 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb +57 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_description.rb +99 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb +76 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb +68 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb +68 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_type.rb +57 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/image_url.rb +47 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb +78 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/landmarks_model.rb +57 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/line.rb +86 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb +56 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/model_description.rb +65 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb +41 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb +72 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb +72 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb +103 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb +62 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb +56 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb +79 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb +62 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb +18 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/text_recognition_mode.rb +16 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb +21 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/models/word.rb +66 -0
- data/lib/2.0/generated/azure_cognitiveservices_computervision/module_definition.rb +9 -0
- data/lib/azure_cognitiveservices_computervision.rb +1 -0
- data/lib/profiles/latest/modules/computervision_profile_module.rb +103 -95
- data/lib/version.rb +1 -1
- metadata +49 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b6287b86cebf89e52fe95c33e35e5c4d5104cce
|
4
|
+
data.tar.gz: dab9dfe166056f6e805867ee1fb39fed0152a0b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a589f7bfa3f0ebd8f76a688057012b1411548a790ddd34d84d87552600a84eca94f87f19f857a71f8ad74785c10f2182f261166ddf32a9a3642f3e3bf3c4a82a
|
7
|
+
data.tar.gz: c70540d274ba150005fce3f10e9761e67fd3b0ace9b5a1a53ba0a8243beb91e0801d6112f0992246cc7968c7cf4e0fcae4a2b369d38a5f5f3b646161a7483b22
|
@@ -23,41 +23,43 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
23
23
|
autoload :ComputerVisionClient, '1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb'
|
24
24
|
|
25
25
|
module Models
|
26
|
-
autoload :ImageDescriptionDetails, '1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb'
|
27
|
-
autoload :Word, '1.0/generated/azure_cognitiveservices_computervision/models/word.rb'
|
28
26
|
autoload :FaceDescription, '1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb'
|
29
|
-
autoload :RecognitionResult, '1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb'
|
30
27
|
autoload :ImageAnalysis, '1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb'
|
31
|
-
autoload :
|
28
|
+
autoload :Line, '1.0/generated/azure_cognitiveservices_computervision/models/line.rb'
|
32
29
|
autoload :OcrWord, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb'
|
33
|
-
autoload :
|
30
|
+
autoload :TextOperationResult, '1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb'
|
34
31
|
autoload :OcrLine, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb'
|
35
|
-
autoload :
|
32
|
+
autoload :CelebritiesModel, '1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb'
|
36
33
|
autoload :OcrRegion, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb'
|
37
|
-
autoload :
|
34
|
+
autoload :Category, '1.0/generated/azure_cognitiveservices_computervision/models/category.rb'
|
38
35
|
autoload :OcrResult, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb'
|
39
|
-
autoload :
|
36
|
+
autoload :ColorInfo, '1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb'
|
40
37
|
autoload :ModelDescription, '1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb'
|
41
|
-
autoload :
|
38
|
+
autoload :ImageTag, '1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb'
|
42
39
|
autoload :ListModelsResult, '1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb'
|
43
|
-
autoload :
|
40
|
+
autoload :ImageMetadata, '1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb'
|
44
41
|
autoload :DomainModelResults, '1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb'
|
45
|
-
autoload :
|
42
|
+
autoload :Word, '1.0/generated/azure_cognitiveservices_computervision/models/word.rb'
|
43
|
+
autoload :CelebrityResults, '1.0/generated/azure_cognitiveservices_computervision/models/celebrity_results.rb'
|
44
|
+
autoload :FaceRectangle, '1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb'
|
45
|
+
autoload :LandmarkResultsLandmarksItem, '1.0/generated/azure_cognitiveservices_computervision/models/landmark_results_landmarks_item.rb'
|
46
|
+
autoload :AdultInfo, '1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb'
|
47
|
+
autoload :LandmarkResults, '1.0/generated/azure_cognitiveservices_computervision/models/landmark_results.rb'
|
48
|
+
autoload :ImageCaption, '1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb'
|
46
49
|
autoload :ImageDescription, '1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb'
|
47
|
-
autoload :
|
50
|
+
autoload :RecognitionResult, '1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb'
|
48
51
|
autoload :TagResult, '1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb'
|
49
|
-
autoload :
|
52
|
+
autoload :ImageType, '1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb'
|
50
53
|
autoload :ComputerVisionError, '1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb'
|
51
|
-
autoload :
|
54
|
+
autoload :CategoryDetail, '1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb'
|
52
55
|
autoload :ImageUrl, '1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb'
|
53
|
-
autoload :
|
56
|
+
autoload :ImageDescriptionDetails, '1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb'
|
54
57
|
autoload :TextOperationStatusCodes, '1.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb'
|
58
|
+
autoload :Gender, '1.0/generated/azure_cognitiveservices_computervision/models/gender.rb'
|
55
59
|
autoload :ComputerVisionErrorCodes, '1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error_codes.rb'
|
56
60
|
autoload :VisualFeatureTypes, '1.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb'
|
57
61
|
autoload :OcrLanguages, '1.0/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb'
|
58
62
|
autoload :AzureRegions, '1.0/generated/azure_cognitiveservices_computervision/models/azure_regions.rb'
|
59
63
|
autoload :Details, '1.0/generated/azure_cognitiveservices_computervision/models/details.rb'
|
60
|
-
autoload :Language1, '1.0/generated/azure_cognitiveservices_computervision/models/language1.rb'
|
61
|
-
autoload :DomainModels, '1.0/generated/azure_cognitiveservices_computervision/models/domain_models.rb'
|
62
64
|
end
|
63
65
|
end
|
@@ -15,28 +15,25 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
15
15
|
attr_reader :base_url
|
16
16
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
|
-
attr_reader :
|
18
|
+
attr_reader :credentials
|
19
19
|
|
20
20
|
# @return [AzureRegions] Supported Azure regions for Cognitive Services
|
21
21
|
# endpoints. Possible values include: 'westus', 'westeurope',
|
22
22
|
# 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus',
|
23
23
|
# 'southcentralus', 'northeurope', 'eastasia', 'australiaeast',
|
24
|
-
# 'brazilsouth'
|
24
|
+
# 'brazilsouth', 'canadacentral', 'centralindia', 'uksouth', 'japaneast'
|
25
25
|
attr_accessor :azure_region
|
26
26
|
|
27
|
-
# @return
|
28
|
-
# subscription.
|
29
|
-
attr_accessor :credentials
|
30
|
-
|
31
|
-
# @return [String] Gets or sets the preferred language for the response.
|
27
|
+
# @return [String] The preferred language for the response.
|
32
28
|
attr_accessor :accept_language
|
33
29
|
|
34
|
-
# @return [Integer]
|
35
|
-
#
|
30
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
31
|
+
# Operations. Default value is 30.
|
36
32
|
attr_accessor :long_running_operation_retry_timeout
|
37
33
|
|
38
|
-
# @return [Boolean]
|
39
|
-
#
|
34
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
35
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
36
|
+
# generated and included in each request. Default is true.
|
40
37
|
attr_accessor :generate_client_request_id
|
41
38
|
|
42
39
|
#
|
@@ -216,7 +213,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
216
213
|
# to allow you to choose which features to return. By default, image
|
217
214
|
# categories are returned in the response.
|
218
215
|
#
|
219
|
-
# @param url [String]
|
216
|
+
# @param url [String] Publicly reachable URL of an image
|
220
217
|
# @param visual_features [Array<VisualFeatureTypes>] A string indicating what
|
221
218
|
# visual feature types to return. Multiple values should be comma-separated.
|
222
219
|
# Valid visual feature types include:Categories - categorizes image content
|
@@ -232,11 +229,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
232
229
|
# details to return. Multiple values should be comma-separated. Valid visual
|
233
230
|
# feature types include:Celebrities - identifies celebrities if detected in the
|
234
231
|
# image.
|
235
|
-
# @param language [
|
236
|
-
# service will return recognition results in specified language. If this
|
232
|
+
# @param language [Enum] The desired language for output generation. If this
|
237
233
|
# parameter is not specified, the default value is "en".Supported
|
238
|
-
# languages:en - English, Default.
|
239
|
-
# include: 'en', '
|
234
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
235
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
236
|
+
# 'ja', 'pt', 'zh'
|
240
237
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
241
238
|
# will be added to the HTTP request.
|
242
239
|
#
|
@@ -254,7 +251,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
254
251
|
# to allow you to choose which features to return. By default, image
|
255
252
|
# categories are returned in the response.
|
256
253
|
#
|
257
|
-
# @param url [String]
|
254
|
+
# @param url [String] Publicly reachable URL of an image
|
258
255
|
# @param visual_features [Array<VisualFeatureTypes>] A string indicating what
|
259
256
|
# visual feature types to return. Multiple values should be comma-separated.
|
260
257
|
# Valid visual feature types include:Categories - categorizes image content
|
@@ -270,11 +267,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
270
267
|
# details to return. Multiple values should be comma-separated. Valid visual
|
271
268
|
# feature types include:Celebrities - identifies celebrities if detected in the
|
272
269
|
# image.
|
273
|
-
# @param language [
|
274
|
-
# service will return recognition results in specified language. If this
|
270
|
+
# @param language [Enum] The desired language for output generation. If this
|
275
271
|
# parameter is not specified, the default value is "en".Supported
|
276
|
-
# languages:en - English, Default.
|
277
|
-
# include: 'en', '
|
272
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
273
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
274
|
+
# 'ja', 'pt', 'zh'
|
278
275
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
279
276
|
# will be added to the HTTP request.
|
280
277
|
#
|
@@ -291,7 +288,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
291
288
|
# to allow you to choose which features to return. By default, image
|
292
289
|
# categories are returned in the response.
|
293
290
|
#
|
294
|
-
# @param url [String]
|
291
|
+
# @param url [String] Publicly reachable URL of an image
|
295
292
|
# @param visual_features [Array<VisualFeatureTypes>] A string indicating what
|
296
293
|
# visual feature types to return. Multiple values should be comma-separated.
|
297
294
|
# Valid visual feature types include:Categories - categorizes image content
|
@@ -307,11 +304,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
307
304
|
# details to return. Multiple values should be comma-separated. Valid visual
|
308
305
|
# feature types include:Celebrities - identifies celebrities if detected in the
|
309
306
|
# image.
|
310
|
-
# @param language [
|
311
|
-
# service will return recognition results in specified language. If this
|
307
|
+
# @param language [Enum] The desired language for output generation. If this
|
312
308
|
# parameter is not specified, the default value is "en".Supported
|
313
|
-
# languages:en - English, Default.
|
314
|
-
# include: 'en', '
|
309
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
310
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
311
|
+
# 'ja', 'pt', 'zh'
|
315
312
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
316
313
|
# to the HTTP request.
|
317
314
|
#
|
@@ -392,7 +389,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
392
389
|
# Recommended minimum of 50.
|
393
390
|
# @param height [Integer] Height of the thumbnail. It must be between 1 and
|
394
391
|
# 1024. Recommended minimum of 50.
|
395
|
-
# @param url [String]
|
392
|
+
# @param url [String] Publicly reachable URL of an image
|
396
393
|
# @param smart_cropping [Boolean] Boolean flag for enabling smart cropping.
|
397
394
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
398
395
|
# will be added to the HTTP request.
|
@@ -417,7 +414,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
417
414
|
# Recommended minimum of 50.
|
418
415
|
# @param height [Integer] Height of the thumbnail. It must be between 1 and
|
419
416
|
# 1024. Recommended minimum of 50.
|
420
|
-
# @param url [String]
|
417
|
+
# @param url [String] Publicly reachable URL of an image
|
421
418
|
# @param smart_cropping [Boolean] Boolean flag for enabling smart cropping.
|
422
419
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
423
420
|
# will be added to the HTTP request.
|
@@ -441,7 +438,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
441
438
|
# Recommended minimum of 50.
|
442
439
|
# @param height [Integer] Height of the thumbnail. It must be between 1 and
|
443
440
|
# 1024. Recommended minimum of 50.
|
444
|
-
# @param url [String]
|
441
|
+
# @param url [String] Publicly reachable URL of an image
|
445
442
|
# @param smart_cropping [Boolean] Boolean flag for enabling smart cropping.
|
446
443
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
447
444
|
# to the HTTP request.
|
@@ -535,7 +532,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
535
532
|
# the image. With detectOrientation=true the OCR service tries to detect the
|
536
533
|
# image orientation and correct it before further processing (e.g. if it's
|
537
534
|
# upside-down).
|
538
|
-
# @param url [String]
|
535
|
+
# @param url [String] Publicly reachable URL of an image
|
539
536
|
# @param language [OcrLanguages] The BCP-47 language code of the text to be
|
540
537
|
# detected in the image. The default value is 'unk'. Possible values include:
|
541
538
|
# 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el',
|
@@ -563,7 +560,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
563
560
|
# the image. With detectOrientation=true the OCR service tries to detect the
|
564
561
|
# image orientation and correct it before further processing (e.g. if it's
|
565
562
|
# upside-down).
|
566
|
-
# @param url [String]
|
563
|
+
# @param url [String] Publicly reachable URL of an image
|
567
564
|
# @param language [OcrLanguages] The BCP-47 language code of the text to be
|
568
565
|
# detected in the image. The default value is 'unk'. Possible values include:
|
569
566
|
# 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el',
|
@@ -590,7 +587,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
590
587
|
# the image. With detectOrientation=true the OCR service tries to detect the
|
591
588
|
# image orientation and correct it before further processing (e.g. if it's
|
592
589
|
# upside-down).
|
593
|
-
# @param url [String]
|
590
|
+
# @param url [String] Publicly reachable URL of an image
|
594
591
|
# @param language [OcrLanguages] The BCP-47 language code of the text to be
|
595
592
|
# detected in the image. The default value is 'unk'. Possible values include:
|
596
593
|
# 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el',
|
@@ -674,16 +671,21 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
674
671
|
# will be returned in JSON. If the request failed, the response will contain
|
675
672
|
# an error code and a message to help understand what went wrong.
|
676
673
|
#
|
677
|
-
# @param url [String]
|
674
|
+
# @param url [String] Publicly reachable URL of an image
|
678
675
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
679
676
|
# returned. The default is 1.
|
677
|
+
# @param language [Enum] The desired language for output generation. If this
|
678
|
+
# parameter is not specified, the default value is "en".Supported
|
679
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
680
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
681
|
+
# 'ja', 'pt', 'zh'
|
680
682
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
681
683
|
# will be added to the HTTP request.
|
682
684
|
#
|
683
685
|
# @return [ImageDescription] operation results.
|
684
686
|
#
|
685
|
-
def describe_image(url, max_candidates:'1', custom_headers:nil)
|
686
|
-
response = describe_image_async(url, max_candidates:max_candidates, custom_headers:custom_headers).value!
|
687
|
+
def describe_image(url, max_candidates:'1', language:nil, custom_headers:nil)
|
688
|
+
response = describe_image_async(url, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
|
687
689
|
response.body unless response.nil?
|
688
690
|
end
|
689
691
|
|
@@ -697,16 +699,21 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
697
699
|
# will be returned in JSON. If the request failed, the response will contain
|
698
700
|
# an error code and a message to help understand what went wrong.
|
699
701
|
#
|
700
|
-
# @param url [String]
|
702
|
+
# @param url [String] Publicly reachable URL of an image
|
701
703
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
702
704
|
# returned. The default is 1.
|
705
|
+
# @param language [Enum] The desired language for output generation. If this
|
706
|
+
# parameter is not specified, the default value is "en".Supported
|
707
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
708
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
709
|
+
# 'ja', 'pt', 'zh'
|
703
710
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
704
711
|
# will be added to the HTTP request.
|
705
712
|
#
|
706
713
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
707
714
|
#
|
708
|
-
def describe_image_with_http_info(url, max_candidates:'1', custom_headers:nil)
|
709
|
-
describe_image_async(url, max_candidates:max_candidates, custom_headers:custom_headers).value!
|
715
|
+
def describe_image_with_http_info(url, max_candidates:'1', language:nil, custom_headers:nil)
|
716
|
+
describe_image_async(url, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
|
710
717
|
end
|
711
718
|
|
712
719
|
#
|
@@ -719,15 +726,20 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
719
726
|
# will be returned in JSON. If the request failed, the response will contain
|
720
727
|
# an error code and a message to help understand what went wrong.
|
721
728
|
#
|
722
|
-
# @param url [String]
|
729
|
+
# @param url [String] Publicly reachable URL of an image
|
723
730
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
724
731
|
# returned. The default is 1.
|
732
|
+
# @param language [Enum] The desired language for output generation. If this
|
733
|
+
# parameter is not specified, the default value is "en".Supported
|
734
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
735
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
736
|
+
# 'ja', 'pt', 'zh'
|
725
737
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
726
738
|
# to the HTTP request.
|
727
739
|
#
|
728
740
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
729
741
|
#
|
730
|
-
def describe_image_async(url, max_candidates:'1', custom_headers:nil)
|
742
|
+
def describe_image_async(url, max_candidates:'1', language:nil, custom_headers:nil)
|
731
743
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
732
744
|
fail ArgumentError, 'url is nil' if url.nil?
|
733
745
|
|
@@ -755,7 +767,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
755
767
|
|
756
768
|
options = {
|
757
769
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
758
|
-
query_params: {'maxCandidates' => max_candidates},
|
770
|
+
query_params: {'maxCandidates' => max_candidates,'language' => language},
|
759
771
|
body: request_content,
|
760
772
|
headers: request_headers.merge(custom_headers || {}),
|
761
773
|
base_url: request_url
|
@@ -795,17 +807,22 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
795
807
|
# on objects, living beings, scenery or actions found in images. Unlike
|
796
808
|
# categories, tags are not organized according to a hierarchical classification
|
797
809
|
# system, but correspond to image content. Tags may contain hints to avoid
|
798
|
-
# ambiguity or provide context, for example the tag
|
799
|
-
# by the hint
|
810
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
811
|
+
# by the hint 'musical instrument'. All tags are in English.
|
800
812
|
#
|
801
|
-
# @param url [String]
|
813
|
+
# @param url [String] Publicly reachable URL of an image
|
814
|
+
# @param language [Enum] The desired language for output generation. If this
|
815
|
+
# parameter is not specified, the default value is "en".Supported
|
816
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
817
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
818
|
+
# 'ja', 'pt', 'zh'
|
802
819
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
803
820
|
# will be added to the HTTP request.
|
804
821
|
#
|
805
822
|
# @return [TagResult] operation results.
|
806
823
|
#
|
807
|
-
def tag_image(url, custom_headers:nil)
|
808
|
-
response = tag_image_async(url, custom_headers:custom_headers).value!
|
824
|
+
def tag_image(url, language:nil, custom_headers:nil)
|
825
|
+
response = tag_image_async(url, language:language, custom_headers:custom_headers).value!
|
809
826
|
response.body unless response.nil?
|
810
827
|
end
|
811
828
|
|
@@ -815,17 +832,22 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
815
832
|
# on objects, living beings, scenery or actions found in images. Unlike
|
816
833
|
# categories, tags are not organized according to a hierarchical classification
|
817
834
|
# system, but correspond to image content. Tags may contain hints to avoid
|
818
|
-
# ambiguity or provide context, for example the tag
|
819
|
-
# by the hint
|
835
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
836
|
+
# by the hint 'musical instrument'. All tags are in English.
|
820
837
|
#
|
821
|
-
# @param url [String]
|
838
|
+
# @param url [String] Publicly reachable URL of an image
|
839
|
+
# @param language [Enum] The desired language for output generation. If this
|
840
|
+
# parameter is not specified, the default value is "en".Supported
|
841
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
842
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
843
|
+
# 'ja', 'pt', 'zh'
|
822
844
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
823
845
|
# will be added to the HTTP request.
|
824
846
|
#
|
825
847
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
826
848
|
#
|
827
|
-
def tag_image_with_http_info(url, custom_headers:nil)
|
828
|
-
tag_image_async(url, custom_headers:custom_headers).value!
|
849
|
+
def tag_image_with_http_info(url, language:nil, custom_headers:nil)
|
850
|
+
tag_image_async(url, language:language, custom_headers:custom_headers).value!
|
829
851
|
end
|
830
852
|
|
831
853
|
#
|
@@ -834,16 +856,21 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
834
856
|
# on objects, living beings, scenery or actions found in images. Unlike
|
835
857
|
# categories, tags are not organized according to a hierarchical classification
|
836
858
|
# system, but correspond to image content. Tags may contain hints to avoid
|
837
|
-
# ambiguity or provide context, for example the tag
|
838
|
-
# by the hint
|
859
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
860
|
+
# by the hint 'musical instrument'. All tags are in English.
|
839
861
|
#
|
840
|
-
# @param url [String]
|
862
|
+
# @param url [String] Publicly reachable URL of an image
|
863
|
+
# @param language [Enum] The desired language for output generation. If this
|
864
|
+
# parameter is not specified, the default value is "en".Supported
|
865
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
866
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
867
|
+
# 'ja', 'pt', 'zh'
|
841
868
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
842
869
|
# to the HTTP request.
|
843
870
|
#
|
844
871
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
845
872
|
#
|
846
|
-
def tag_image_async(url, custom_headers:nil)
|
873
|
+
def tag_image_async(url, language:nil, custom_headers:nil)
|
847
874
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
848
875
|
fail ArgumentError, 'url is nil' if url.nil?
|
849
876
|
|
@@ -871,6 +898,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
871
898
|
|
872
899
|
options = {
|
873
900
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
901
|
+
query_params: {'language' => language},
|
874
902
|
body: request_content,
|
875
903
|
headers: request_headers.merge(custom_headers || {}),
|
876
904
|
base_url: request_url
|
@@ -914,16 +942,20 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
914
942
|
# failed, the response will contain an error code and a message to help
|
915
943
|
# understand what went wrong.
|
916
944
|
#
|
917
|
-
# @param model [
|
918
|
-
#
|
919
|
-
# @param
|
945
|
+
# @param model [String] The domain-specific content to recognize.
|
946
|
+
# @param url [String] Publicly reachable URL of an image
|
947
|
+
# @param language [Enum] The desired language for output generation. If this
|
948
|
+
# parameter is not specified, the default value is "en".Supported
|
949
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
950
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
951
|
+
# 'ja', 'pt', 'zh'
|
920
952
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
921
953
|
# will be added to the HTTP request.
|
922
954
|
#
|
923
955
|
# @return [DomainModelResults] operation results.
|
924
956
|
#
|
925
|
-
def analyze_image_by_domain(model, url, custom_headers:nil)
|
926
|
-
response = analyze_image_by_domain_async(model, url, custom_headers:custom_headers).value!
|
957
|
+
def analyze_image_by_domain(model, url, language:nil, custom_headers:nil)
|
958
|
+
response = analyze_image_by_domain_async(model, url, language:language, custom_headers:custom_headers).value!
|
927
959
|
response.body unless response.nil?
|
928
960
|
end
|
929
961
|
|
@@ -937,16 +969,20 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
937
969
|
# failed, the response will contain an error code and a message to help
|
938
970
|
# understand what went wrong.
|
939
971
|
#
|
940
|
-
# @param model [
|
941
|
-
#
|
942
|
-
# @param
|
972
|
+
# @param model [String] The domain-specific content to recognize.
|
973
|
+
# @param url [String] Publicly reachable URL of an image
|
974
|
+
# @param language [Enum] The desired language for output generation. If this
|
975
|
+
# parameter is not specified, the default value is "en".Supported
|
976
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
977
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
978
|
+
# 'ja', 'pt', 'zh'
|
943
979
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
944
980
|
# will be added to the HTTP request.
|
945
981
|
#
|
946
982
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
947
983
|
#
|
948
|
-
def analyze_image_by_domain_with_http_info(model, url, custom_headers:nil)
|
949
|
-
analyze_image_by_domain_async(model, url, custom_headers:custom_headers).value!
|
984
|
+
def analyze_image_by_domain_with_http_info(model, url, language:nil, custom_headers:nil)
|
985
|
+
analyze_image_by_domain_async(model, url, language:language, custom_headers:custom_headers).value!
|
950
986
|
end
|
951
987
|
|
952
988
|
#
|
@@ -959,15 +995,19 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
959
995
|
# failed, the response will contain an error code and a message to help
|
960
996
|
# understand what went wrong.
|
961
997
|
#
|
962
|
-
# @param model [
|
963
|
-
#
|
964
|
-
# @param
|
998
|
+
# @param model [String] The domain-specific content to recognize.
|
999
|
+
# @param url [String] Publicly reachable URL of an image
|
1000
|
+
# @param language [Enum] The desired language for output generation. If this
|
1001
|
+
# parameter is not specified, the default value is "en".Supported
|
1002
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1003
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1004
|
+
# 'ja', 'pt', 'zh'
|
965
1005
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
966
1006
|
# to the HTTP request.
|
967
1007
|
#
|
968
1008
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
969
1009
|
#
|
970
|
-
def analyze_image_by_domain_async(model, url, custom_headers:nil)
|
1010
|
+
def analyze_image_by_domain_async(model, url, language:nil, custom_headers:nil)
|
971
1011
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
972
1012
|
fail ArgumentError, 'model is nil' if model.nil?
|
973
1013
|
fail ArgumentError, 'url is nil' if url.nil?
|
@@ -997,6 +1037,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
997
1037
|
options = {
|
998
1038
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
999
1039
|
path_params: {'model' => model},
|
1040
|
+
query_params: {'language' => language},
|
1000
1041
|
body: request_content,
|
1001
1042
|
headers: request_headers.merge(custom_headers || {}),
|
1002
1043
|
base_url: request_url
|
@@ -1032,13 +1073,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1032
1073
|
|
1033
1074
|
#
|
1034
1075
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
1035
|
-
# response contains a field called
|
1036
|
-
#
|
1076
|
+
# response contains a field called 'Operation-Location'. The
|
1077
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
1037
1078
|
# Handwritten Text Operation Result operation.
|
1038
1079
|
#
|
1039
|
-
# @param url [String]
|
1040
|
-
# @param detect_handwriting [Boolean] If
|
1041
|
-
# recognition is performed. If this parameter is set to
|
1080
|
+
# @param url [String] Publicly reachable URL of an image
|
1081
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
1082
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
1042
1083
|
# specified, printed text recognition is performed.
|
1043
1084
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1044
1085
|
# will be added to the HTTP request.
|
@@ -1051,13 +1092,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1051
1092
|
|
1052
1093
|
#
|
1053
1094
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
1054
|
-
# response contains a field called
|
1055
|
-
#
|
1095
|
+
# response contains a field called 'Operation-Location'. The
|
1096
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
1056
1097
|
# Handwritten Text Operation Result operation.
|
1057
1098
|
#
|
1058
|
-
# @param url [String]
|
1059
|
-
# @param detect_handwriting [Boolean] If
|
1060
|
-
# recognition is performed. If this parameter is set to
|
1099
|
+
# @param url [String] Publicly reachable URL of an image
|
1100
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
1101
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
1061
1102
|
# specified, printed text recognition is performed.
|
1062
1103
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1063
1104
|
# will be added to the HTTP request.
|
@@ -1070,13 +1111,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1070
1111
|
|
1071
1112
|
#
|
1072
1113
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
1073
|
-
# response contains a field called
|
1074
|
-
#
|
1114
|
+
# response contains a field called 'Operation-Location'. The
|
1115
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
1075
1116
|
# Handwritten Text Operation Result operation.
|
1076
1117
|
#
|
1077
|
-
# @param url [String]
|
1078
|
-
# @param detect_handwriting [Boolean] If
|
1079
|
-
# recognition is performed. If this parameter is set to
|
1118
|
+
# @param url [String] Publicly reachable URL of an image
|
1119
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
1120
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
1080
1121
|
# specified, printed text recognition is performed.
|
1081
1122
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1082
1123
|
# to the HTTP request.
|
@@ -1251,11 +1292,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1251
1292
|
# return. Multiple values should be comma-separated. Valid visual feature types
|
1252
1293
|
# include:Celebrities - identifies celebrities if detected in the image.
|
1253
1294
|
# Possible values include: 'Celebrities', 'Landmarks'
|
1254
|
-
# @param language [Enum]
|
1255
|
-
# service will return recognition results in specified language. If this
|
1295
|
+
# @param language [Enum] The desired language for output generation. If this
|
1256
1296
|
# parameter is not specified, the default value is "en".Supported
|
1257
|
-
# languages:en - English, Default.
|
1258
|
-
# include: 'en', '
|
1297
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1298
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1299
|
+
# 'ja', 'pt', 'zh'
|
1259
1300
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1260
1301
|
# will be added to the HTTP request.
|
1261
1302
|
#
|
@@ -1286,11 +1327,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1286
1327
|
# return. Multiple values should be comma-separated. Valid visual feature types
|
1287
1328
|
# include:Celebrities - identifies celebrities if detected in the image.
|
1288
1329
|
# Possible values include: 'Celebrities', 'Landmarks'
|
1289
|
-
# @param language [Enum]
|
1290
|
-
# service will return recognition results in specified language. If this
|
1330
|
+
# @param language [Enum] The desired language for output generation. If this
|
1291
1331
|
# parameter is not specified, the default value is "en".Supported
|
1292
|
-
# languages:en - English, Default.
|
1293
|
-
# include: 'en', '
|
1332
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1333
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1334
|
+
# 'ja', 'pt', 'zh'
|
1294
1335
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1295
1336
|
# will be added to the HTTP request.
|
1296
1337
|
#
|
@@ -1320,11 +1361,11 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1320
1361
|
# return. Multiple values should be comma-separated. Valid visual feature types
|
1321
1362
|
# include:Celebrities - identifies celebrities if detected in the image.
|
1322
1363
|
# Possible values include: 'Celebrities', 'Landmarks'
|
1323
|
-
# @param language [Enum]
|
1324
|
-
# service will return recognition results in specified language. If this
|
1364
|
+
# @param language [Enum] The desired language for output generation. If this
|
1325
1365
|
# parameter is not specified, the default value is "en".Supported
|
1326
|
-
# languages:en - English, Default.
|
1327
|
-
# include: 'en', '
|
1366
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1367
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1368
|
+
# 'ja', 'pt', 'zh'
|
1328
1369
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1329
1370
|
# to the HTTP request.
|
1330
1371
|
#
|
@@ -1512,7 +1553,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1512
1553
|
response_content = http_response.body
|
1513
1554
|
unless status_code == 200
|
1514
1555
|
error_model = JSON.load(response_content)
|
1515
|
-
fail
|
1556
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1516
1557
|
end
|
1517
1558
|
|
1518
1559
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -1696,13 +1737,18 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1696
1737
|
# @param image An image stream.
|
1697
1738
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
1698
1739
|
# returned. The default is 1.
|
1740
|
+
# @param language [Enum] The desired language for output generation. If this
|
1741
|
+
# parameter is not specified, the default value is "en".Supported
|
1742
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1743
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1744
|
+
# 'ja', 'pt', 'zh'
|
1699
1745
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1700
1746
|
# will be added to the HTTP request.
|
1701
1747
|
#
|
1702
1748
|
# @return [ImageDescription] operation results.
|
1703
1749
|
#
|
1704
|
-
def describe_image_in_stream(image, max_candidates:'1', custom_headers:nil)
|
1705
|
-
response = describe_image_in_stream_async(image, max_candidates:max_candidates, custom_headers:custom_headers).value!
|
1750
|
+
def describe_image_in_stream(image, max_candidates:'1', language:nil, custom_headers:nil)
|
1751
|
+
response = describe_image_in_stream_async(image, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
|
1706
1752
|
response.body unless response.nil?
|
1707
1753
|
end
|
1708
1754
|
|
@@ -1719,13 +1765,18 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1719
1765
|
# @param image An image stream.
|
1720
1766
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
1721
1767
|
# returned. The default is 1.
|
1768
|
+
# @param language [Enum] The desired language for output generation. If this
|
1769
|
+
# parameter is not specified, the default value is "en".Supported
|
1770
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1771
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1772
|
+
# 'ja', 'pt', 'zh'
|
1722
1773
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1723
1774
|
# will be added to the HTTP request.
|
1724
1775
|
#
|
1725
1776
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1726
1777
|
#
|
1727
|
-
def describe_image_in_stream_with_http_info(image, max_candidates:'1', custom_headers:nil)
|
1728
|
-
describe_image_in_stream_async(image, max_candidates:max_candidates, custom_headers:custom_headers).value!
|
1778
|
+
def describe_image_in_stream_with_http_info(image, max_candidates:'1', language:nil, custom_headers:nil)
|
1779
|
+
describe_image_in_stream_async(image, max_candidates:max_candidates, language:language, custom_headers:custom_headers).value!
|
1729
1780
|
end
|
1730
1781
|
|
1731
1782
|
#
|
@@ -1741,12 +1792,17 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1741
1792
|
# @param image An image stream.
|
1742
1793
|
# @param max_candidates [String] Maximum number of candidate descriptions to be
|
1743
1794
|
# returned. The default is 1.
|
1795
|
+
# @param language [Enum] The desired language for output generation. If this
|
1796
|
+
# parameter is not specified, the default value is "en".Supported
|
1797
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1798
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1799
|
+
# 'ja', 'pt', 'zh'
|
1744
1800
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1745
1801
|
# to the HTTP request.
|
1746
1802
|
#
|
1747
1803
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1748
1804
|
#
|
1749
|
-
def describe_image_in_stream_async(image, max_candidates:'1', custom_headers:nil)
|
1805
|
+
def describe_image_in_stream_async(image, max_candidates:'1', language:nil, custom_headers:nil)
|
1750
1806
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
1751
1807
|
fail ArgumentError, 'image is nil' if image.nil?
|
1752
1808
|
|
@@ -1776,7 +1832,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1776
1832
|
|
1777
1833
|
options = {
|
1778
1834
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1779
|
-
query_params: {'maxCandidates' => max_candidates},
|
1835
|
+
query_params: {'maxCandidates' => max_candidates,'language' => language},
|
1780
1836
|
body: request_content,
|
1781
1837
|
headers: request_headers.merge(custom_headers || {}),
|
1782
1838
|
base_url: request_url
|
@@ -1816,17 +1872,22 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1816
1872
|
# on objects, living beings, scenery or actions found in images. Unlike
|
1817
1873
|
# categories, tags are not organized according to a hierarchical classification
|
1818
1874
|
# system, but correspond to image content. Tags may contain hints to avoid
|
1819
|
-
# ambiguity or provide context, for example the tag
|
1820
|
-
# by the hint
|
1875
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
1876
|
+
# by the hint 'musical instrument'. All tags are in English.
|
1821
1877
|
#
|
1822
1878
|
# @param image An image stream.
|
1879
|
+
# @param language [Enum] The desired language for output generation. If this
|
1880
|
+
# parameter is not specified, the default value is "en".Supported
|
1881
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1882
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1883
|
+
# 'ja', 'pt', 'zh'
|
1823
1884
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1824
1885
|
# will be added to the HTTP request.
|
1825
1886
|
#
|
1826
1887
|
# @return [TagResult] operation results.
|
1827
1888
|
#
|
1828
|
-
def tag_image_in_stream(image, custom_headers:nil)
|
1829
|
-
response = tag_image_in_stream_async(image, custom_headers:custom_headers).value!
|
1889
|
+
def tag_image_in_stream(image, language:nil, custom_headers:nil)
|
1890
|
+
response = tag_image_in_stream_async(image, language:language, custom_headers:custom_headers).value!
|
1830
1891
|
response.body unless response.nil?
|
1831
1892
|
end
|
1832
1893
|
|
@@ -1836,17 +1897,22 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1836
1897
|
# on objects, living beings, scenery or actions found in images. Unlike
|
1837
1898
|
# categories, tags are not organized according to a hierarchical classification
|
1838
1899
|
# system, but correspond to image content. Tags may contain hints to avoid
|
1839
|
-
# ambiguity or provide context, for example the tag
|
1840
|
-
# by the hint
|
1900
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
1901
|
+
# by the hint 'musical instrument'. All tags are in English.
|
1841
1902
|
#
|
1842
1903
|
# @param image An image stream.
|
1904
|
+
# @param language [Enum] The desired language for output generation. If this
|
1905
|
+
# parameter is not specified, the default value is "en".Supported
|
1906
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1907
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1908
|
+
# 'ja', 'pt', 'zh'
|
1843
1909
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1844
1910
|
# will be added to the HTTP request.
|
1845
1911
|
#
|
1846
1912
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1847
1913
|
#
|
1848
|
-
def tag_image_in_stream_with_http_info(image, custom_headers:nil)
|
1849
|
-
tag_image_in_stream_async(image, custom_headers:custom_headers).value!
|
1914
|
+
def tag_image_in_stream_with_http_info(image, language:nil, custom_headers:nil)
|
1915
|
+
tag_image_in_stream_async(image, language:language, custom_headers:custom_headers).value!
|
1850
1916
|
end
|
1851
1917
|
|
1852
1918
|
#
|
@@ -1855,16 +1921,21 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1855
1921
|
# on objects, living beings, scenery or actions found in images. Unlike
|
1856
1922
|
# categories, tags are not organized according to a hierarchical classification
|
1857
1923
|
# system, but correspond to image content. Tags may contain hints to avoid
|
1858
|
-
# ambiguity or provide context, for example the tag
|
1859
|
-
# by the hint
|
1924
|
+
# ambiguity or provide context, for example the tag 'cello' may be accompanied
|
1925
|
+
# by the hint 'musical instrument'. All tags are in English.
|
1860
1926
|
#
|
1861
1927
|
# @param image An image stream.
|
1928
|
+
# @param language [Enum] The desired language for output generation. If this
|
1929
|
+
# parameter is not specified, the default value is "en".Supported
|
1930
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
1931
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
1932
|
+
# 'ja', 'pt', 'zh'
|
1862
1933
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1863
1934
|
# to the HTTP request.
|
1864
1935
|
#
|
1865
1936
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1866
1937
|
#
|
1867
|
-
def tag_image_in_stream_async(image, custom_headers:nil)
|
1938
|
+
def tag_image_in_stream_async(image, language:nil, custom_headers:nil)
|
1868
1939
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
1869
1940
|
fail ArgumentError, 'image is nil' if image.nil?
|
1870
1941
|
|
@@ -1894,6 +1965,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1894
1965
|
|
1895
1966
|
options = {
|
1896
1967
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1968
|
+
query_params: {'language' => language},
|
1897
1969
|
body: request_content,
|
1898
1970
|
headers: request_headers.merge(custom_headers || {}),
|
1899
1971
|
base_url: request_url
|
@@ -1939,13 +2011,18 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1939
2011
|
#
|
1940
2012
|
# @param model [String] The domain-specific content to recognize.
|
1941
2013
|
# @param image An image stream.
|
2014
|
+
# @param language [Enum] The desired language for output generation. If this
|
2015
|
+
# parameter is not specified, the default value is "en".Supported
|
2016
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
2017
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
2018
|
+
# 'ja', 'pt', 'zh'
|
1942
2019
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1943
2020
|
# will be added to the HTTP request.
|
1944
2021
|
#
|
1945
2022
|
# @return [DomainModelResults] operation results.
|
1946
2023
|
#
|
1947
|
-
def analyze_image_by_domain_in_stream(model, image, custom_headers:nil)
|
1948
|
-
response = analyze_image_by_domain_in_stream_async(model, image, custom_headers:custom_headers).value!
|
2024
|
+
def analyze_image_by_domain_in_stream(model, image, language:nil, custom_headers:nil)
|
2025
|
+
response = analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value!
|
1949
2026
|
response.body unless response.nil?
|
1950
2027
|
end
|
1951
2028
|
|
@@ -1961,13 +2038,18 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1961
2038
|
#
|
1962
2039
|
# @param model [String] The domain-specific content to recognize.
|
1963
2040
|
# @param image An image stream.
|
2041
|
+
# @param language [Enum] The desired language for output generation. If this
|
2042
|
+
# parameter is not specified, the default value is "en".Supported
|
2043
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
2044
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
2045
|
+
# 'ja', 'pt', 'zh'
|
1964
2046
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1965
2047
|
# will be added to the HTTP request.
|
1966
2048
|
#
|
1967
2049
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1968
2050
|
#
|
1969
|
-
def analyze_image_by_domain_in_stream_with_http_info(model, image, custom_headers:nil)
|
1970
|
-
analyze_image_by_domain_in_stream_async(model, image, custom_headers:custom_headers).value!
|
2051
|
+
def analyze_image_by_domain_in_stream_with_http_info(model, image, language:nil, custom_headers:nil)
|
2052
|
+
analyze_image_by_domain_in_stream_async(model, image, language:language, custom_headers:custom_headers).value!
|
1971
2053
|
end
|
1972
2054
|
|
1973
2055
|
#
|
@@ -1982,12 +2064,17 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
1982
2064
|
#
|
1983
2065
|
# @param model [String] The domain-specific content to recognize.
|
1984
2066
|
# @param image An image stream.
|
2067
|
+
# @param language [Enum] The desired language for output generation. If this
|
2068
|
+
# parameter is not specified, the default value is "en".Supported
|
2069
|
+
# languages:en - English, Default. es - Spanish, ja - Japanese, pt -
|
2070
|
+
# Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es',
|
2071
|
+
# 'ja', 'pt', 'zh'
|
1985
2072
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1986
2073
|
# to the HTTP request.
|
1987
2074
|
#
|
1988
2075
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1989
2076
|
#
|
1990
|
-
def analyze_image_by_domain_in_stream_async(model, image, custom_headers:nil)
|
2077
|
+
def analyze_image_by_domain_in_stream_async(model, image, language:nil, custom_headers:nil)
|
1991
2078
|
fail ArgumentError, 'azure_region is nil' if azure_region.nil?
|
1992
2079
|
fail ArgumentError, 'model is nil' if model.nil?
|
1993
2080
|
fail ArgumentError, 'image is nil' if image.nil?
|
@@ -2019,6 +2106,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
2019
2106
|
options = {
|
2020
2107
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
2021
2108
|
path_params: {'model' => model},
|
2109
|
+
query_params: {'language' => language},
|
2022
2110
|
body: request_content,
|
2023
2111
|
headers: request_headers.merge(custom_headers || {}),
|
2024
2112
|
base_url: request_url
|
@@ -2054,13 +2142,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
2054
2142
|
|
2055
2143
|
#
|
2056
2144
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
2057
|
-
# response contains a field called
|
2058
|
-
#
|
2145
|
+
# response contains a field called 'Operation-Location'. The
|
2146
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
2059
2147
|
# Handwritten Text Operation Result operation.
|
2060
2148
|
#
|
2061
2149
|
# @param image An image stream.
|
2062
|
-
# @param detect_handwriting [Boolean] If
|
2063
|
-
# recognition is performed. If this parameter is set to
|
2150
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
2151
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
2064
2152
|
# specified, printed text recognition is performed.
|
2065
2153
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2066
2154
|
# will be added to the HTTP request.
|
@@ -2073,13 +2161,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
2073
2161
|
|
2074
2162
|
#
|
2075
2163
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
2076
|
-
# response contains a field called
|
2077
|
-
#
|
2164
|
+
# response contains a field called 'Operation-Location'. The
|
2165
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
2078
2166
|
# Handwritten Text Operation Result operation.
|
2079
2167
|
#
|
2080
2168
|
# @param image An image stream.
|
2081
|
-
# @param detect_handwriting [Boolean] If
|
2082
|
-
# recognition is performed. If this parameter is set to
|
2169
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
2170
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
2083
2171
|
# specified, printed text recognition is performed.
|
2084
2172
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2085
2173
|
# will be added to the HTTP request.
|
@@ -2092,13 +2180,13 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
2092
2180
|
|
2093
2181
|
#
|
2094
2182
|
# Recognize Text operation. When you use the Recognize Text interface, the
|
2095
|
-
# response contains a field called
|
2096
|
-
#
|
2183
|
+
# response contains a field called 'Operation-Location'. The
|
2184
|
+
# 'Operation-Location' field contains the URL that you must use for your Get
|
2097
2185
|
# Handwritten Text Operation Result operation.
|
2098
2186
|
#
|
2099
2187
|
# @param image An image stream.
|
2100
|
-
# @param detect_handwriting [Boolean] If
|
2101
|
-
# recognition is performed. If this parameter is set to
|
2188
|
+
# @param detect_handwriting [Boolean] If 'true' is specified, handwriting
|
2189
|
+
# recognition is performed. If this parameter is set to 'false' or is not
|
2102
2190
|
# specified, printed text recognition is performed.
|
2103
2191
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2104
2192
|
# to the HTTP request.
|
@@ -2166,7 +2254,7 @@ module Azure::CognitiveServices::ComputerVision::V1_0
|
|
2166
2254
|
#
|
2167
2255
|
def add_telemetry
|
2168
2256
|
sdk_information = 'azure_cognitiveservices_computervision'
|
2169
|
-
sdk_information = "#{sdk_information}/0.
|
2257
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
2170
2258
|
add_user_agent_information(sdk_information)
|
2171
2259
|
end
|
2172
2260
|
end
|