cloudmersive-ocr-api-client 1.3.9 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,5 +11,5 @@ Swagger Codegen version: unset
11
11
  =end
12
12
 
13
13
  module CloudmersiveOcrApiClient
14
- VERSION = "1.3.9"
14
+ VERSION = "1.4.0"
15
15
  end
@@ -72,11 +72,28 @@ describe 'ImageOcrApi' do
72
72
  end
73
73
  end
74
74
 
75
+ # unit tests for image_ocr_photo_recognize_form
76
+ # Recognize a photo of a form, extract key fields and business information
77
+ # Analyzes a photograph of a form as input, and outputs key business fields and information. Customzie data to be extracted by defining fields for the form.
78
+ # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [String] :form_template_definition Form field definitions
81
+ # @option opts [String] :recognition_mode Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
82
+ # @option opts [String] :language Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
83
+ # @return [FormRecognitionResult]
84
+ describe 'image_ocr_photo_recognize_form test' do
85
+ it "should work" do
86
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ end
88
+ end
89
+
75
90
  # unit tests for image_ocr_photo_recognize_receipt
76
91
  # Recognize a photo of a receipt, extract key business information
77
92
  # Analyzes a photograph of a receipt as input, and outputs key business information such as the name of the business, the address of the business, the phone number of the business, the total of the receipt, the date of the receipt, and more.
78
93
  # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
79
94
  # @param [Hash] opts the optional parameters
95
+ # @option opts [String] :form_template_definition Form field definitions
96
+ # @option opts [String] :recognition_mode Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
80
97
  # @option opts [String] :language Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
81
98
  # @return [ReceiptRecognitionResult]
82
99
  describe 'image_ocr_photo_recognize_receipt test' do
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #ocrapi
3
+
4
+ #The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveOcrApiClient::FieldResult
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'FieldResult' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveOcrApiClient::FieldResult.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of FieldResult' do
31
+ it 'should create an instance of FieldResult' do
32
+ expect(@instance).to be_instance_of(CloudmersiveOcrApiClient::FieldResult)
33
+ end
34
+ end
35
+ describe 'test attribute "target_field"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "field_values"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #ocrapi
3
+
4
+ #The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveOcrApiClient::FormDefinitionTemplate
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'FormDefinitionTemplate' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveOcrApiClient::FormDefinitionTemplate.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of FormDefinitionTemplate' do
31
+ it 'should create an instance of FormDefinitionTemplate' do
32
+ expect(@instance).to be_instance_of(CloudmersiveOcrApiClient::FormDefinitionTemplate)
33
+ end
34
+ end
35
+ describe 'test attribute "field_definitions"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
42
+
@@ -0,0 +1,114 @@
1
+ =begin
2
+ #ocrapi
3
+
4
+ #The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveOcrApiClient::FormFieldDefinition
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'FormFieldDefinition' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveOcrApiClient::FormFieldDefinition.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of FormFieldDefinition' do
31
+ it 'should create an instance of FormFieldDefinition' do
32
+ expect(@instance).to be_instance_of(CloudmersiveOcrApiClient::FormFieldDefinition)
33
+ end
34
+ end
35
+ describe 'test attribute "field_id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "left_anchor"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "top_anchor"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "anchor_mode"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "data_type"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "target_digit_count"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ describe 'test attribute "minimum_character_count"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ describe 'test attribute "allow_numeric_digits"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ describe 'test attribute "vertical_alignment_type"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "horizontal_alignment_type"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ describe 'test attribute "target_field_width_relative"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "target_field_height_relative"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ describe 'test attribute "ignore"' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
+ end
111
+ end
112
+
113
+ end
114
+
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #ocrapi
3
+
4
+ #The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveOcrApiClient::FormRecognitionResult
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'FormRecognitionResult' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveOcrApiClient::FormRecognitionResult.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of FormRecognitionResult' do
31
+ it 'should create an instance of FormRecognitionResult' do
32
+ expect(@instance).to be_instance_of(CloudmersiveOcrApiClient::FormRecognitionResult)
33
+ end
34
+ end
35
+ describe 'test attribute "successful"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "field_value_extraction_result"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #ocrapi
3
+
4
+ #The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveOcrApiClient::ReceiptLineItem
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'ReceiptLineItem' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveOcrApiClient::ReceiptLineItem.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of ReceiptLineItem' do
31
+ it 'should create an instance of ReceiptLineItem' do
32
+ expect(@instance).to be_instance_of(CloudmersiveOcrApiClient::ReceiptLineItem)
33
+ end
34
+ end
35
+ describe 'test attribute "item_description"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "item_price"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
48
+
@@ -50,6 +50,12 @@ describe 'ReceiptRecognitionResult' do
50
50
  end
51
51
  end
52
52
 
53
+ describe 'test attribute "business_website"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
53
59
  describe 'test attribute "address_string"' do
54
60
  it 'should work' do
55
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -62,6 +68,12 @@ describe 'ReceiptRecognitionResult' do
62
68
  end
63
69
  end
64
70
 
71
+ describe 'test attribute "receipt_items"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
65
77
  describe 'test attribute "receipt_total"' do
66
78
  it 'should work' do
67
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-ocr-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.9
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-21 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -202,6 +202,10 @@ files:
202
202
  - "./Rakefile"
203
203
  - "./cloudmersive-ocr-api-client.gemspec"
204
204
  - "./docs/BusinessCardRecognitionResult.md"
205
+ - "./docs/FieldResult.md"
206
+ - "./docs/FormDefinitionTemplate.md"
207
+ - "./docs/FormFieldDefinition.md"
208
+ - "./docs/FormRecognitionResult.md"
205
209
  - "./docs/GetPageAngleResult.md"
206
210
  - "./docs/ImageOcrApi.md"
207
211
  - "./docs/ImageToLinesWithLocationResult.md"
@@ -219,6 +223,7 @@ files:
219
223
  - "./docs/PdfToWordsWithLocationResult.md"
220
224
  - "./docs/PhotoToWordsWithLocationResult.md"
221
225
  - "./docs/PreprocessingApi.md"
226
+ - "./docs/ReceiptLineItem.md"
222
227
  - "./docs/ReceiptRecognitionResult.md"
223
228
  - "./docs/ReceiptsApi.md"
224
229
  - "./git_push.sh"
@@ -231,6 +236,10 @@ files:
231
236
  - "./lib/cloudmersive-ocr-api-client/api_error.rb"
232
237
  - "./lib/cloudmersive-ocr-api-client/configuration.rb"
233
238
  - "./lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb"
239
+ - "./lib/cloudmersive-ocr-api-client/models/field_result.rb"
240
+ - "./lib/cloudmersive-ocr-api-client/models/form_definition_template.rb"
241
+ - "./lib/cloudmersive-ocr-api-client/models/form_field_definition.rb"
242
+ - "./lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb"
234
243
  - "./lib/cloudmersive-ocr-api-client/models/get_page_angle_result.rb"
235
244
  - "./lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb"
236
245
  - "./lib/cloudmersive-ocr-api-client/models/image_to_text_response.rb"
@@ -245,6 +254,7 @@ files:
245
254
  - "./lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb"
246
255
  - "./lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb"
247
256
  - "./lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb"
257
+ - "./lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb"
248
258
  - "./lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb"
249
259
  - "./lib/cloudmersive-ocr-api-client/version.rb"
250
260
  - "./spec/api/image_ocr_api_spec.rb"
@@ -254,6 +264,10 @@ files:
254
264
  - "./spec/api_client_spec.rb"
255
265
  - "./spec/configuration_spec.rb"
256
266
  - "./spec/models/business_card_recognition_result_spec.rb"
267
+ - "./spec/models/field_result_spec.rb"
268
+ - "./spec/models/form_definition_template_spec.rb"
269
+ - "./spec/models/form_field_definition_spec.rb"
270
+ - "./spec/models/form_recognition_result_spec.rb"
257
271
  - "./spec/models/get_page_angle_result_spec.rb"
258
272
  - "./spec/models/image_to_lines_with_location_result_spec.rb"
259
273
  - "./spec/models/image_to_text_response_spec.rb"
@@ -268,6 +282,7 @@ files:
268
282
  - "./spec/models/pdf_to_text_response_spec.rb"
269
283
  - "./spec/models/pdf_to_words_with_location_result_spec.rb"
270
284
  - "./spec/models/photo_to_words_with_location_result_spec.rb"
285
+ - "./spec/models/receipt_line_item_spec.rb"
271
286
  - "./spec/models/receipt_recognition_result_spec.rb"
272
287
  - "./spec/spec_helper.rb"
273
288
  homepage: https://www.cloudmersive.com/ocr-api