cloudmersive-documentai-api-client 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +140 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-documentai-api-client.gemspec +45 -0
  6. data/docs/AdvancedExtractClassificationRequest.md +10 -0
  7. data/docs/AdvancedExtractFieldsRequest.md +10 -0
  8. data/docs/AnalyzeApi.md +64 -0
  9. data/docs/DocumentAdvancedClassificationResult.md +9 -0
  10. data/docs/DocumentCategories.md +9 -0
  11. data/docs/DocumentClassificationResult.md +9 -0
  12. data/docs/DocumentPolicyRequest.md +9 -0
  13. data/docs/DocumentPolicyResult.md +10 -0
  14. data/docs/ExtractApi.md +534 -0
  15. data/docs/ExtractBarcodesAiResponse.md +9 -0
  16. data/docs/ExtractDocumentBatchJobResult.md +9 -0
  17. data/docs/ExtractDocumentJobStatusResult.md +15 -0
  18. data/docs/ExtractFieldsAndTablesResponse.md +10 -0
  19. data/docs/ExtractFieldsResponse.md +9 -0
  20. data/docs/ExtractTablesResponse.md +9 -0
  21. data/docs/ExtractTextResponse.md +9 -0
  22. data/docs/ExtractedBarcodeItem.md +9 -0
  23. data/docs/ExtractedTextPage.md +9 -0
  24. data/docs/FieldToExtract.md +11 -0
  25. data/docs/FieldValue.md +9 -0
  26. data/docs/PolicyRule.md +10 -0
  27. data/docs/PolicyRuleViolation.md +10 -0
  28. data/docs/RunBatchJobApi.md +298 -0
  29. data/docs/SummarizeDocumentResponse.md +9 -0
  30. data/docs/TableResult.md +9 -0
  31. data/docs/TableResultCell.md +9 -0
  32. data/docs/TableResultRow.md +8 -0
  33. data/git_push.sh +55 -0
  34. data/lib/cloudmersive-documentai-api-client/api/analyze_api.rb +73 -0
  35. data/lib/cloudmersive-documentai-api-client/api/extract_api.rb +513 -0
  36. data/lib/cloudmersive-documentai-api-client/api/run_batch_job_api.rb +290 -0
  37. data/lib/cloudmersive-documentai-api-client/api_client.rb +391 -0
  38. data/lib/cloudmersive-documentai-api-client/api_error.rb +38 -0
  39. data/lib/cloudmersive-documentai-api-client/configuration.rb +209 -0
  40. data/lib/cloudmersive-documentai-api-client/models/advanced_extract_classification_request.rb +223 -0
  41. data/lib/cloudmersive-documentai-api-client/models/advanced_extract_fields_request.rb +223 -0
  42. data/lib/cloudmersive-documentai-api-client/models/document_advanced_classification_result.rb +196 -0
  43. data/lib/cloudmersive-documentai-api-client/models/document_categories.rb +196 -0
  44. data/lib/cloudmersive-documentai-api-client/models/document_classification_result.rb +196 -0
  45. data/lib/cloudmersive-documentai-api-client/models/document_policy_request.rb +213 -0
  46. data/lib/cloudmersive-documentai-api-client/models/document_policy_result.rb +208 -0
  47. data/lib/cloudmersive-documentai-api-client/models/extract_barcodes_ai_response.rb +198 -0
  48. data/lib/cloudmersive-documentai-api-client/models/extract_document_batch_job_result.rb +196 -0
  49. data/lib/cloudmersive-documentai-api-client/models/extract_document_job_status_result.rb +252 -0
  50. data/lib/cloudmersive-documentai-api-client/models/extract_fields_and_tables_response.rb +210 -0
  51. data/lib/cloudmersive-documentai-api-client/models/extract_fields_response.rb +198 -0
  52. data/lib/cloudmersive-documentai-api-client/models/extract_tables_response.rb +198 -0
  53. data/lib/cloudmersive-documentai-api-client/models/extract_text_response.rb +198 -0
  54. data/lib/cloudmersive-documentai-api-client/models/extracted_barcode_item.rb +196 -0
  55. data/lib/cloudmersive-documentai-api-client/models/extracted_text_page.rb +196 -0
  56. data/lib/cloudmersive-documentai-api-client/models/field_to_extract.rb +216 -0
  57. data/lib/cloudmersive-documentai-api-client/models/field_value.rb +196 -0
  58. data/lib/cloudmersive-documentai-api-client/models/policy_rule.rb +205 -0
  59. data/lib/cloudmersive-documentai-api-client/models/policy_rule_violation.rb +206 -0
  60. data/lib/cloudmersive-documentai-api-client/models/summarize_document_response.rb +196 -0
  61. data/lib/cloudmersive-documentai-api-client/models/table_result.rb +198 -0
  62. data/lib/cloudmersive-documentai-api-client/models/table_result_cell.rb +196 -0
  63. data/lib/cloudmersive-documentai-api-client/models/table_result_row.rb +188 -0
  64. data/lib/cloudmersive-documentai-api-client/version.rb +15 -0
  65. data/lib/cloudmersive-documentai-api-client.rb +66 -0
  66. data/spec/api/analyze_api_spec.rb +47 -0
  67. data/spec/api/extract_api_spec.rb +154 -0
  68. data/spec/api/run_batch_job_api_spec.rb +100 -0
  69. data/spec/api_client_spec.rb +243 -0
  70. data/spec/configuration_spec.rb +42 -0
  71. data/spec/models/advanced_extract_classification_request_spec.rb +53 -0
  72. data/spec/models/advanced_extract_fields_request_spec.rb +53 -0
  73. data/spec/models/document_advanced_classification_result_spec.rb +47 -0
  74. data/spec/models/document_categories_spec.rb +47 -0
  75. data/spec/models/document_classification_result_spec.rb +47 -0
  76. data/spec/models/document_policy_request_spec.rb +47 -0
  77. data/spec/models/document_policy_result_spec.rb +53 -0
  78. data/spec/models/extract_barcodes_ai_response_spec.rb +47 -0
  79. data/spec/models/extract_document_batch_job_result_spec.rb +47 -0
  80. data/spec/models/extract_document_job_status_result_spec.rb +83 -0
  81. data/spec/models/extract_fields_and_tables_response_spec.rb +53 -0
  82. data/spec/models/extract_fields_response_spec.rb +47 -0
  83. data/spec/models/extract_tables_response_spec.rb +47 -0
  84. data/spec/models/extract_text_response_spec.rb +47 -0
  85. data/spec/models/extracted_barcode_item_spec.rb +47 -0
  86. data/spec/models/extracted_text_page_spec.rb +47 -0
  87. data/spec/models/field_to_extract_spec.rb +59 -0
  88. data/spec/models/field_value_spec.rb +47 -0
  89. data/spec/models/policy_rule_spec.rb +53 -0
  90. data/spec/models/policy_rule_violation_spec.rb +53 -0
  91. data/spec/models/summarize_document_response_spec.rb +47 -0
  92. data/spec/models/table_result_cell_spec.rb +47 -0
  93. data/spec/models/table_result_row_spec.rb +41 -0
  94. data/spec/models/table_result_spec.rb +47 -0
  95. data/spec/spec_helper.rb +111 -0
  96. metadata +319 -0
@@ -0,0 +1,534 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractApi
2
+
3
+ All URIs are relative to *https://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**extract_all_fields_and_tables**](ExtractApi.md#extract_all_fields_and_tables) | **POST** /document-ai/document/extract/all | Extract All Fields and Tables of Data from a Document using AI
8
+ [**extract_barcodes**](ExtractApi.md#extract_barcodes) | **POST** /document-ai/document/extract/barcodes | Extract Barcodes of from a Document using AI
9
+ [**extract_classification**](ExtractApi.md#extract_classification) | **POST** /document-ai/document/extract/classify | Extract Classification or Category from a Document using AI
10
+ [**extract_classification_advanced**](ExtractApi.md#extract_classification_advanced) | **POST** /document-ai/document/extract/classify/advanced | Extract Classification or Category from a Document using Advanced AI
11
+ [**extract_fields**](ExtractApi.md#extract_fields) | **POST** /document-ai/document/extract/fields | Extract Field Values from a Document using AI
12
+ [**extract_fields_advanced**](ExtractApi.md#extract_fields_advanced) | **POST** /document-ai/document/extract/fields/advanced | Extract Field Values from a Document using Advanced AI
13
+ [**extract_summary**](ExtractApi.md#extract_summary) | **POST** /document-ai/document/extract/summary | Extract Summary from a Document using AI
14
+ [**extract_tables**](ExtractApi.md#extract_tables) | **POST** /document-ai/document/extract/tables | Extract Tables of Data from a Document using AI
15
+ [**extract_text**](ExtractApi.md#extract_text) | **POST** /document-ai/document/extract/text | Extract Text from a Document using AI
16
+
17
+
18
+ # **extract_all_fields_and_tables**
19
+ > ExtractFieldsAndTablesResponse extract_all_fields_and_tables(opts)
20
+
21
+ Extract All Fields and Tables of Data from a Document using AI
22
+
23
+ Extract all Fields and Tables, comprised of rows and columns of data, from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG.
24
+
25
+ ### Example
26
+ ```ruby
27
+ # load the gem
28
+ require 'cloudmersive-documentai-api-client'
29
+ # setup authorization
30
+ CloudmersiveDocumentaiApiClient.configure do |config|
31
+ # Configure API key authorization: Apikey
32
+ config.api_key['Apikey'] = 'YOUR API KEY'
33
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
+ #config.api_key_prefix['Apikey'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
38
+
39
+ opts = {
40
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
41
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
42
+ }
43
+
44
+ begin
45
+ #Extract All Fields and Tables of Data from a Document using AI
46
+ result = api_instance.extract_all_fields_and_tables(opts)
47
+ p result
48
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
49
+ puts "Exception when calling ExtractApi->extract_all_fields_and_tables: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
58
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
59
+
60
+ ### Return type
61
+
62
+ [**ExtractFieldsAndTablesResponse**](ExtractFieldsAndTablesResponse.md)
63
+
64
+ ### Authorization
65
+
66
+ [Apikey](../README.md#Apikey)
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: multipart/form-data
71
+ - **Accept**: text/plain, application/json, text/json
72
+
73
+
74
+
75
+ # **extract_barcodes**
76
+ > ExtractBarcodesAiResponse extract_barcodes(opts)
77
+
78
+ Extract Barcodes of from a Document using AI
79
+
80
+ Extract all barcodes from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG.
81
+
82
+ ### Example
83
+ ```ruby
84
+ # load the gem
85
+ require 'cloudmersive-documentai-api-client'
86
+ # setup authorization
87
+ CloudmersiveDocumentaiApiClient.configure do |config|
88
+ # Configure API key authorization: Apikey
89
+ config.api_key['Apikey'] = 'YOUR API KEY'
90
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
91
+ #config.api_key_prefix['Apikey'] = 'Bearer'
92
+ end
93
+
94
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
95
+
96
+ opts = {
97
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
98
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
99
+ }
100
+
101
+ begin
102
+ #Extract Barcodes of from a Document using AI
103
+ result = api_instance.extract_barcodes(opts)
104
+ p result
105
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
106
+ puts "Exception when calling ExtractApi->extract_barcodes: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
115
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
116
+
117
+ ### Return type
118
+
119
+ [**ExtractBarcodesAiResponse**](ExtractBarcodesAiResponse.md)
120
+
121
+ ### Authorization
122
+
123
+ [Apikey](../README.md#Apikey)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: multipart/form-data
128
+ - **Accept**: text/plain, application/json, text/json
129
+
130
+
131
+
132
+ # **extract_classification**
133
+ > DocumentClassificationResult extract_classification(opts)
134
+
135
+ Extract Classification or Category from a Document using AI
136
+
137
+ Extract Classification or Category (e.g. Invoice, Receipt, Tax Form, or Form 1040, Form 1040 EZ, etc.) from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG.
138
+
139
+ ### Example
140
+ ```ruby
141
+ # load the gem
142
+ require 'cloudmersive-documentai-api-client'
143
+ # setup authorization
144
+ CloudmersiveDocumentaiApiClient.configure do |config|
145
+ # Configure API key authorization: Apikey
146
+ config.api_key['Apikey'] = 'YOUR API KEY'
147
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
148
+ #config.api_key_prefix['Apikey'] = 'Bearer'
149
+ end
150
+
151
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
152
+
153
+ opts = {
154
+ categories: 'categories_example', # String | Desired classification to extract
155
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
156
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
157
+ }
158
+
159
+ begin
160
+ #Extract Classification or Category from a Document using AI
161
+ result = api_instance.extract_classification(opts)
162
+ p result
163
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
164
+ puts "Exception when calling ExtractApi->extract_classification: #{e}"
165
+ end
166
+ ```
167
+
168
+ ### Parameters
169
+
170
+ Name | Type | Description | Notes
171
+ ------------- | ------------- | ------------- | -------------
172
+ **categories** | **String**| Desired classification to extract | [optional]
173
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
174
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
175
+
176
+ ### Return type
177
+
178
+ [**DocumentClassificationResult**](DocumentClassificationResult.md)
179
+
180
+ ### Authorization
181
+
182
+ [Apikey](../README.md#Apikey)
183
+
184
+ ### HTTP request headers
185
+
186
+ - **Content-Type**: multipart/form-data
187
+ - **Accept**: text/plain, application/json, text/json
188
+
189
+
190
+
191
+ # **extract_classification_advanced**
192
+ > DocumentAdvancedClassificationResult extract_classification_advanced(opts)
193
+
194
+ Extract Classification or Category from a Document using Advanced AI
195
+
196
+ Extract Classification or Category (e.g. Invoice, Receipt, Tax Form, or Form 1040, Form 1040 EZ, etc.) from a document using Advanced AI. Input document formats supported include DOCX, PDF, PNG and JPG.
197
+
198
+ ### Example
199
+ ```ruby
200
+ # load the gem
201
+ require 'cloudmersive-documentai-api-client'
202
+ # setup authorization
203
+ CloudmersiveDocumentaiApiClient.configure do |config|
204
+ # Configure API key authorization: Apikey
205
+ config.api_key['Apikey'] = 'YOUR API KEY'
206
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
207
+ #config.api_key_prefix['Apikey'] = 'Bearer'
208
+ end
209
+
210
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
211
+
212
+ opts = {
213
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
214
+ body: CloudmersiveDocumentaiApiClient::AdvancedExtractClassificationRequest.new # AdvancedExtractClassificationRequest | Input request to perform the classification on
215
+ }
216
+
217
+ begin
218
+ #Extract Classification or Category from a Document using Advanced AI
219
+ result = api_instance.extract_classification_advanced(opts)
220
+ p result
221
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
222
+ puts "Exception when calling ExtractApi->extract_classification_advanced: #{e}"
223
+ end
224
+ ```
225
+
226
+ ### Parameters
227
+
228
+ Name | Type | Description | Notes
229
+ ------------- | ------------- | ------------- | -------------
230
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
231
+ **body** | [**AdvancedExtractClassificationRequest**](AdvancedExtractClassificationRequest.md)| Input request to perform the classification on | [optional]
232
+
233
+ ### Return type
234
+
235
+ [**DocumentAdvancedClassificationResult**](DocumentAdvancedClassificationResult.md)
236
+
237
+ ### Authorization
238
+
239
+ [Apikey](../README.md#Apikey)
240
+
241
+ ### HTTP request headers
242
+
243
+ - **Content-Type**: application/json, text/json, application/*+json
244
+ - **Accept**: text/plain, application/json, text/json
245
+
246
+
247
+
248
+ # **extract_fields**
249
+ > ExtractFieldsResponse extract_fields(opts)
250
+
251
+ Extract Field Values from a Document using AI
252
+
253
+ Extract Field Values (e.g. Invoice Number, Invoice Date, Business Card Phone Number, etc.) from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG.
254
+
255
+ ### Example
256
+ ```ruby
257
+ # load the gem
258
+ require 'cloudmersive-documentai-api-client'
259
+ # setup authorization
260
+ CloudmersiveDocumentaiApiClient.configure do |config|
261
+ # Configure API key authorization: Apikey
262
+ config.api_key['Apikey'] = 'YOUR API KEY'
263
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
264
+ #config.api_key_prefix['Apikey'] = 'Bearer'
265
+ end
266
+
267
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
268
+
269
+ opts = {
270
+ field_names: 'field_names_example', # String | Desired fields to extract, comma separated
271
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
272
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
273
+ }
274
+
275
+ begin
276
+ #Extract Field Values from a Document using AI
277
+ result = api_instance.extract_fields(opts)
278
+ p result
279
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
280
+ puts "Exception when calling ExtractApi->extract_fields: #{e}"
281
+ end
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+ Name | Type | Description | Notes
287
+ ------------- | ------------- | ------------- | -------------
288
+ **field_names** | **String**| Desired fields to extract, comma separated | [optional]
289
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
290
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
291
+
292
+ ### Return type
293
+
294
+ [**ExtractFieldsResponse**](ExtractFieldsResponse.md)
295
+
296
+ ### Authorization
297
+
298
+ [Apikey](../README.md#Apikey)
299
+
300
+ ### HTTP request headers
301
+
302
+ - **Content-Type**: multipart/form-data
303
+ - **Accept**: text/plain, application/json, text/json
304
+
305
+
306
+
307
+ # **extract_fields_advanced**
308
+ > ExtractFieldsResponse extract_fields_advanced(opts)
309
+
310
+ Extract Field Values from a Document using Advanced AI
311
+
312
+ Extract Field Values (e.g. Invoice Number, Invoice Date, Business Card Phone Number, etc.) from a document using Advanced AI. Input document formats supported include DOCX, PDF, PNG and JPG.
313
+
314
+ ### Example
315
+ ```ruby
316
+ # load the gem
317
+ require 'cloudmersive-documentai-api-client'
318
+ # setup authorization
319
+ CloudmersiveDocumentaiApiClient.configure do |config|
320
+ # Configure API key authorization: Apikey
321
+ config.api_key['Apikey'] = 'YOUR API KEY'
322
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
323
+ #config.api_key_prefix['Apikey'] = 'Bearer'
324
+ end
325
+
326
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
327
+
328
+ opts = {
329
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
330
+ body: CloudmersiveDocumentaiApiClient::AdvancedExtractFieldsRequest.new # AdvancedExtractFieldsRequest | Input request, including document file as byte array, and information on which fields to extract
331
+ }
332
+
333
+ begin
334
+ #Extract Field Values from a Document using Advanced AI
335
+ result = api_instance.extract_fields_advanced(opts)
336
+ p result
337
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
338
+ puts "Exception when calling ExtractApi->extract_fields_advanced: #{e}"
339
+ end
340
+ ```
341
+
342
+ ### Parameters
343
+
344
+ Name | Type | Description | Notes
345
+ ------------- | ------------- | ------------- | -------------
346
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
347
+ **body** | [**AdvancedExtractFieldsRequest**](AdvancedExtractFieldsRequest.md)| Input request, including document file as byte array, and information on which fields to extract | [optional]
348
+
349
+ ### Return type
350
+
351
+ [**ExtractFieldsResponse**](ExtractFieldsResponse.md)
352
+
353
+ ### Authorization
354
+
355
+ [Apikey](../README.md#Apikey)
356
+
357
+ ### HTTP request headers
358
+
359
+ - **Content-Type**: application/json, text/json, application/*+json
360
+ - **Accept**: text/plain, application/json, text/json
361
+
362
+
363
+
364
+ # **extract_summary**
365
+ > SummarizeDocumentResponse extract_summary(opts)
366
+
367
+ Extract Summary from a Document using AI
368
+
369
+ Creates a 1 paragraph summary of the input document using Artificial Intelligence. Input document formats supported include DOCX, PDF, PNG and JPG.
370
+
371
+ ### Example
372
+ ```ruby
373
+ # load the gem
374
+ require 'cloudmersive-documentai-api-client'
375
+ # setup authorization
376
+ CloudmersiveDocumentaiApiClient.configure do |config|
377
+ # Configure API key authorization: Apikey
378
+ config.api_key['Apikey'] = 'YOUR API KEY'
379
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
380
+ #config.api_key_prefix['Apikey'] = 'Bearer'
381
+ end
382
+
383
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
384
+
385
+ opts = {
386
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
387
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
388
+ }
389
+
390
+ begin
391
+ #Extract Summary from a Document using AI
392
+ result = api_instance.extract_summary(opts)
393
+ p result
394
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
395
+ puts "Exception when calling ExtractApi->extract_summary: #{e}"
396
+ end
397
+ ```
398
+
399
+ ### Parameters
400
+
401
+ Name | Type | Description | Notes
402
+ ------------- | ------------- | ------------- | -------------
403
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
404
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
405
+
406
+ ### Return type
407
+
408
+ [**SummarizeDocumentResponse**](SummarizeDocumentResponse.md)
409
+
410
+ ### Authorization
411
+
412
+ [Apikey](../README.md#Apikey)
413
+
414
+ ### HTTP request headers
415
+
416
+ - **Content-Type**: multipart/form-data
417
+ - **Accept**: text/plain, application/json, text/json
418
+
419
+
420
+
421
+ # **extract_tables**
422
+ > ExtractTablesResponse extract_tables(opts)
423
+
424
+ Extract Tables of Data from a Document using AI
425
+
426
+ Extract Tables, comprised of rows and columns of data, from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG.
427
+
428
+ ### Example
429
+ ```ruby
430
+ # load the gem
431
+ require 'cloudmersive-documentai-api-client'
432
+ # setup authorization
433
+ CloudmersiveDocumentaiApiClient.configure do |config|
434
+ # Configure API key authorization: Apikey
435
+ config.api_key['Apikey'] = 'YOUR API KEY'
436
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
437
+ #config.api_key_prefix['Apikey'] = 'Bearer'
438
+ end
439
+
440
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
441
+
442
+ opts = {
443
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
444
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
445
+ }
446
+
447
+ begin
448
+ #Extract Tables of Data from a Document using AI
449
+ result = api_instance.extract_tables(opts)
450
+ p result
451
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
452
+ puts "Exception when calling ExtractApi->extract_tables: #{e}"
453
+ end
454
+ ```
455
+
456
+ ### Parameters
457
+
458
+ Name | Type | Description | Notes
459
+ ------------- | ------------- | ------------- | -------------
460
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
461
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
462
+
463
+ ### Return type
464
+
465
+ [**ExtractTablesResponse**](ExtractTablesResponse.md)
466
+
467
+ ### Authorization
468
+
469
+ [Apikey](../README.md#Apikey)
470
+
471
+ ### HTTP request headers
472
+
473
+ - **Content-Type**: multipart/form-data
474
+ - **Accept**: text/plain, application/json, text/json
475
+
476
+
477
+
478
+ # **extract_text**
479
+ > ExtractTextResponse extract_text(opts)
480
+
481
+ Extract Text from a Document using AI
482
+
483
+ Extract raw text from a document using AI. Input document formats supported include DOCX, PDF, PNG and JPG. Supports a wide range of languages.
484
+
485
+ ### Example
486
+ ```ruby
487
+ # load the gem
488
+ require 'cloudmersive-documentai-api-client'
489
+ # setup authorization
490
+ CloudmersiveDocumentaiApiClient.configure do |config|
491
+ # Configure API key authorization: Apikey
492
+ config.api_key['Apikey'] = 'YOUR API KEY'
493
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
494
+ #config.api_key_prefix['Apikey'] = 'Bearer'
495
+ end
496
+
497
+ api_instance = CloudmersiveDocumentaiApiClient::ExtractApi.new
498
+
499
+ opts = {
500
+ recognition_mode: 'recognition_mode_example', # String | Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images
501
+ input_file: File.new('/path/to/file.txt') # File | Input document, or photos of a document, to extract data from
502
+ }
503
+
504
+ begin
505
+ #Extract Text from a Document using AI
506
+ result = api_instance.extract_text(opts)
507
+ p result
508
+ rescue CloudmersiveDocumentaiApiClient::ApiError => e
509
+ puts "Exception when calling ExtractApi->extract_text: #{e}"
510
+ end
511
+ ```
512
+
513
+ ### Parameters
514
+
515
+ Name | Type | Description | Notes
516
+ ------------- | ------------- | ------------- | -------------
517
+ **recognition_mode** | **String**| Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images | [optional]
518
+ **input_file** | **File**| Input document, or photos of a document, to extract data from | [optional]
519
+
520
+ ### Return type
521
+
522
+ [**ExtractTextResponse**](ExtractTextResponse.md)
523
+
524
+ ### Authorization
525
+
526
+ [Apikey](../README.md#Apikey)
527
+
528
+ ### HTTP request headers
529
+
530
+ - **Content-Type**: multipart/form-data
531
+ - **Accept**: text/plain, application/json, text/json
532
+
533
+
534
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractBarcodesAiResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **barcode_results** | [**Array<ExtractedBarcodeItem>**](ExtractedBarcodeItem.md) | Table value results from the extraction operation | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractDocumentBatchJobResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **async_job_id** | **String** | When creating a job, an Async Job ID is returned. Use the GetAsyncJobStatus API to check on the status of this job using the AsyncJobID and get the result when it finishes | [optional]
8
+
9
+
@@ -0,0 +1,15 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractDocumentJobStatusResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation to check the status of the job was successful, false otherwise | [optional]
7
+ **async_job_status** | **String** | Returns the job status of the Async Job, if applicable. Possible states are STARTED and COMPLETED | [optional]
8
+ **async_job_id** | **String** | Job ID | [optional]
9
+ **extract_text_result** | [**ExtractTextResponse**](ExtractTextResponse.md) | | [optional]
10
+ **extract_fields_and_tables_result** | [**ExtractFieldsAndTablesResponse**](ExtractFieldsAndTablesResponse.md) | | [optional]
11
+ **extract_fields_result** | [**ExtractFieldsResponse**](ExtractFieldsResponse.md) | | [optional]
12
+ **extract_classification_result** | [**DocumentClassificationResult**](DocumentClassificationResult.md) | | [optional]
13
+ **error_message** | **String** | Error message (if any) | [optional]
14
+
15
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractFieldsAndTablesResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **field_results** | [**Array<FieldValue>**](FieldValue.md) | Field value results from the extraction operation | [optional]
8
+ **table_results** | [**Array<TableResult>**](TableResult.md) | Table value results from the extraction operation | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractFieldsResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **results** | [**Array<FieldValue>**](FieldValue.md) | Field value results from the extraction operation | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractTablesResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **table_results** | [**Array<TableResult>**](TableResult.md) | Table value results from the extraction operation | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractTextResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **page_results** | [**Array<ExtractedTextPage>**](ExtractedTextPage.md) | Page results from the extraction operation | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractedBarcodeItem
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **barcode_type** | **String** | Type of the barcode identified, possible values are: AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E, All_1D, UPC_EAN_EXTENSION, MSI, PLESSEY, IMB, UNKNOWN | [optional]
7
+ **barcode_value** | **String** | Value of the barcode as a string | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::ExtractedTextPage
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **page_number** | **Integer** | Page number index, 1-based | [optional]
7
+ **text_result** | **String** | Text content of the page | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveDocumentaiApiClient::FieldToExtract
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **field_name** | **String** | Name of the field to extract | [optional]
7
+ **field_optional** | **BOOLEAN** | Optional: True if the field is optional, false if required (default) | [optional]
8
+ **field_description** | **String** | Optional but recommended: Description of the field - use this to describe what the field is, how it is formatted, what is unique about it, etc. | [optional]
9
+ **field_example** | **String** | Optional: Example label or value of the field | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveDocumentaiApiClient::FieldValue
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **field_name** | **String** | Name of the field (note that spaces will be replaced with underscore) | [optional]
7
+ **field_string_value** | **String** | String value of the field that was extractged from the document | [optional]
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveDocumentaiApiClient::PolicyRule
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **rule_id** | **String** | | [optional]
7
+ **rule_type** | **String** | Possible values are ALLOW and DENY | [optional]
8
+ **rule_description** | **String** | Description of the rule in natural language, e.g. Do not allow documents that contain offensive language | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveDocumentaiApiClient::PolicyRuleViolation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **rule_id** | **String** | ID of the rule; if no ID was supplied, the ID is the 1-based index of the rule | [optional]
7
+ **rule_violation_risk_score** | **Float** | Risk score between 0.0 and 1.0 where values above 0.5 are increasing levels of risk | [optional]
8
+ **rule_violation_rationale** | **String** | AI natural language rationale for why this policy was violated | [optional]
9
+
10
+