mindee 3.11.0 → 3.13.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +27 -0
- data/README.md +23 -23
- data/Rakefile +5 -0
- data/bin/mindee.rb +7 -1
- data/docs/bank_account_details_v2.md +5 -1
- data/docs/bank_check_v1.md +6 -2
- data/docs/bank_statement_fr_v1.md +3 -0
- data/docs/barcode_reader_v1.md +5 -1
- data/docs/bill_of_lading_v1.md +202 -0
- data/docs/carte_grise_v1.md +5 -1
- data/docs/carte_vitale_v1.md +5 -1
- data/docs/code_samples/bill_of_lading_v1_async.txt +19 -0
- data/docs/code_samples/energy_bill_fra_v1_async.txt +19 -0
- data/docs/code_samples/financial_document_v1_async.txt +19 -0
- data/docs/code_samples/invoices_v4_async.txt +19 -0
- data/docs/code_samples/nutrition_facts_v1_async.txt +19 -0
- data/docs/code_samples/payslip_fra_v2_async.txt +19 -0
- data/docs/code_samples/us_healthcare_cards_v1_async.txt +19 -0
- data/docs/cropper_v1.md +6 -2
- data/docs/custom_v1.md +5 -3
- data/docs/energy_bill_fra_v1.md +249 -0
- data/docs/eu_driver_license_v1.md +6 -2
- data/docs/expense_receipts_v5.md +38 -11
- data/docs/financial_document_v1.md +80 -23
- data/docs/generated_v1.md +3 -0
- data/docs/getting_started.md +3 -0
- data/docs/idcard_fr_v2.md +15 -2
- data/docs/international_id_v2.md +13 -1
- data/docs/invoice_splitter_v1.md +16 -13
- data/docs/invoices_v4.md +57 -23
- data/docs/license_plates_v1.md +5 -1
- data/docs/multi_receipts_detector_v1.md +5 -1
- data/docs/nutrition_facts_v1.md +295 -0
- data/docs/passport_v1.md +5 -1
- data/docs/payslip_fra_v2.md +218 -0
- data/docs/proof_of_address_v1.md +5 -1
- data/docs/resume_v1.md +24 -1
- data/docs/us_driver_license_v1.md +6 -2
- data/docs/us_healthcare_cards_v1.md +208 -0
- data/docs/us_mail_v2.md +5 -1
- data/docs/us_w9_v1.md +6 -2
- data/examples/auto_invoice_splitter_extraction.rb +43 -0
- data/lib/mindee/client.rb +20 -8
- data/lib/mindee/extraction/common/extracted_image.rb +73 -0
- data/lib/mindee/extraction/common/image_extractor.rb +189 -0
- data/lib/mindee/extraction/common.rb +4 -0
- data/lib/mindee/extraction/multi_receipts_extractor/multi_receipts_extractor.rb +26 -0
- data/lib/mindee/extraction/multi_receipts_extractor.rb +3 -0
- data/lib/mindee/extraction/pdf_extractor/extracted_pdf.rb +55 -0
- data/lib/mindee/extraction/pdf_extractor/pdf_extractor.rb +111 -0
- data/lib/mindee/extraction/pdf_extractor.rb +4 -0
- data/lib/mindee/extraction/tax_extractor/tax_extractor.rb +322 -0
- data/lib/mindee/extraction/tax_extractor.rb +1 -320
- data/lib/mindee/extraction.rb +3 -0
- data/lib/mindee/http/endpoint.rb +18 -6
- data/lib/mindee/input/sources.rb +8 -0
- data/lib/mindee/parsing/common/api_response.rb +1 -1
- data/lib/mindee/parsing/common/document.rb +31 -1
- data/lib/mindee/parsing/common/extras/cropper_extra.rb +29 -0
- data/lib/mindee/parsing/common/extras/extras.rb +50 -0
- data/lib/mindee/parsing/common/extras/full_text_ocr_extra.rb +32 -0
- data/lib/mindee/parsing/common/extras.rb +5 -0
- data/lib/mindee/parsing/common/page.rb +5 -0
- data/lib/mindee/parsing/standard/base_field.rb +1 -0
- data/lib/mindee/parsing/standard/company_registration_field.rb +17 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1.rb +39 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier.rb +52 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_item.rb +95 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_consignee.rb +58 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_document.rb +136 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb +58 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_page.rb +32 -0
- data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rb +58 -0
- data/lib/mindee/product/financial_document/financial_document_v1_document.rb +3 -1
- data/lib/mindee/product/financial_document/financial_document_v1_line_item.rb +22 -1
- data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb +4 -15
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1.rb +41 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_document.rb +235 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_consumer.rb +48 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb +48 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rb +97 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb +54 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_page.rb +34 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_subscription.rb +97 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contribution.rb +97 -0
- data/lib/mindee/product/fr/payslip/payslip_v2.rb +41 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_bank_account_detail.rb +54 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_document.rb +128 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_employee.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_employer.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_employment.rb +72 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_page.rb +34 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_pay_detail.rb +100 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb +66 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_pto.rb +56 -0
- data/lib/mindee/product/fr/payslip/payslip_v2_salary_detail.rb +81 -0
- data/lib/mindee/product/international_id/international_id_v2_document.rb +1 -1
- data/lib/mindee/product/international_id/international_id_v2_page.rb +1 -1
- data/lib/mindee/product/invoice/invoice_v4_document.rb +3 -1
- data/lib/mindee/product/invoice/invoice_v4_line_item.rb +22 -1
- data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb +1 -1
- data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb +1 -1
- data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb +1 -1
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1.rb +39 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_added_sugar.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_calorie.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_cholesterol.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_dietary_fiber.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_document.rb +173 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrient.rb +87 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_page.rb +32 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_protein.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_saturated_fat.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_serving_size.rb +46 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_sodium.rb +58 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_carbohydrate.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_fat.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_sugar.rb +52 -0
- data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_trans_fat.rb +52 -0
- data/lib/mindee/product/receipt/receipt_v5_document.rb +1 -1
- data/lib/mindee/product/receipt/receipt_v5_line_item.rb +11 -1
- data/lib/mindee/product/receipt/receipt_v5_page.rb +1 -1
- data/lib/mindee/product/resume/resume_v1_certificate.rb +11 -1
- data/lib/mindee/product/resume/resume_v1_education.rb +14 -1
- data/lib/mindee/product/resume/resume_v1_language.rb +9 -1
- data/lib/mindee/product/resume/resume_v1_professional_experience.rb +15 -1
- data/lib/mindee/product/resume/resume_v1_social_networks_url.rb +9 -1
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1.rb +41 -0
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rb +65 -0
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb +127 -0
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb +34 -0
- data/lib/mindee/product/us/us_mail/us_mail_v2_recipient_address.rb +14 -1
- data/lib/mindee/product/us/us_mail/us_mail_v2_sender_address.rb +5 -17
- data/lib/mindee/product.rb +6 -1
- data/lib/mindee/version.rb +1 -1
- data/mindee.gemspec +1 -0
- metadata +91 -3
- /data/lib/mindee/extraction/{ocr_extractor.rb → tax_extractor/ocr_extractor.rb} +0 -0
data/docs/idcard_fr_v2.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: FR Carte Nationale d'Identité OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-fr-carte-nationale-didentite-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [Carte Nationale d'Identité API](https://platform.mindee.com/mindee/idcard_fr).
|
5
8
|
|
@@ -27,6 +30,7 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
30
34
|
```
|
31
35
|
|
32
36
|
**Output (RST):**
|
@@ -98,7 +102,7 @@ A typical `Field` object will have the following attributes:
|
|
98
102
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
99
103
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
100
104
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
101
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
105
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
102
106
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
103
107
|
|
104
108
|
|
@@ -119,7 +123,7 @@ Aside from the basic `Field` attributes, the date field `DateField` also impleme
|
|
119
123
|
The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
|
120
124
|
|
121
125
|
## Page-Level Fields
|
122
|
-
Some fields are constrained to the page level, and so will not be retrievable
|
126
|
+
Some fields are constrained to the page level, and so will not be retrievable at document level.
|
123
127
|
|
124
128
|
# Attributes
|
125
129
|
The following fields are extracted for Carte Nationale d'Identité V2:
|
@@ -169,6 +173,11 @@ puts result.document.inference.prediction.document_number.value
|
|
169
173
|
## Document Sides
|
170
174
|
[📄](#page-level-fields "This field is only present on individual pages.")**document_side** ([ClassificationField](#classification-field)): The sides of the document which are visible.
|
171
175
|
|
176
|
+
#### Possible values include:
|
177
|
+
- RECTO
|
178
|
+
- VERSO
|
179
|
+
- RECTO & VERSO
|
180
|
+
|
172
181
|
```rb
|
173
182
|
for document_side_elem in result.document.document_side do
|
174
183
|
puts document_side_elem.value
|
@@ -178,6 +187,10 @@ end
|
|
178
187
|
## Document Type
|
179
188
|
[📄](#page-level-fields "This field is only present on individual pages.")**document_type** ([ClassificationField](#classification-field)): The document type or format.
|
180
189
|
|
190
|
+
#### Possible values include:
|
191
|
+
- NEW
|
192
|
+
- OLD
|
193
|
+
|
181
194
|
```rb
|
182
195
|
for document_type_elem in result.document.document_type do
|
183
196
|
puts document_type_elem.value
|
data/docs/international_id_v2.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: International ID OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-international-id-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [International ID API](https://platform.mindee.com/mindee/international_id).
|
5
8
|
|
@@ -27,6 +30,7 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
30
34
|
```
|
31
35
|
|
32
36
|
**Output (RST):**
|
@@ -76,7 +80,7 @@ A typical `Field` object will have the following attributes:
|
|
76
80
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
77
81
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
78
82
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
79
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
83
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
80
84
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
81
85
|
|
82
86
|
|
@@ -137,6 +141,14 @@ puts result.document.inference.prediction.document_number.value
|
|
137
141
|
## Document Type
|
138
142
|
**document_type** ([ClassificationField](#classification-field)): The type of personal identification document.
|
139
143
|
|
144
|
+
#### Possible values include:
|
145
|
+
- IDENTIFICATION_CARD
|
146
|
+
- PASSPORT
|
147
|
+
- DRIVER_LICENSE
|
148
|
+
- VISA
|
149
|
+
- RESIDENCY_CARD
|
150
|
+
- VOTER_REGISTRATION
|
151
|
+
|
140
152
|
```rb
|
141
153
|
puts result.document.inference.prediction.document_type.value
|
142
154
|
```
|
data/docs/invoice_splitter_v1.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Invoice Splitter API Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-invoice-splitter-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [Invoice Splitter API](https://platform.mindee.com/mindee/invoice_splitter).
|
5
8
|
|
@@ -33,30 +36,30 @@ puts result.document
|
|
33
36
|
########
|
34
37
|
Document
|
35
38
|
########
|
36
|
-
:Mindee ID:
|
37
|
-
:Filename: default_sample.
|
39
|
+
:Mindee ID: 15ad7a19-7b75-43d0-b0c6-9a641a12b49b
|
40
|
+
:Filename: default_sample.pdf
|
38
41
|
|
39
42
|
Inference
|
40
43
|
#########
|
41
|
-
:Product: mindee/
|
42
|
-
:Rotation applied:
|
44
|
+
:Product: mindee/invoice_splitter v1.1
|
45
|
+
:Rotation applied: No
|
43
46
|
|
44
47
|
Prediction
|
45
48
|
==========
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:Issuance Date: 2007-01-01
|
49
|
+
:Invoice Page Groups:
|
50
|
+
:Page indexes: 0
|
51
|
+
:Page indexes: 1
|
50
52
|
|
51
53
|
Page Predictions
|
52
54
|
================
|
53
55
|
|
54
56
|
Page 0
|
55
57
|
------
|
56
|
-
:
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
:Invoice Page Groups:
|
59
|
+
|
60
|
+
Page 1
|
61
|
+
------
|
62
|
+
:Invoice Page Groups:
|
60
63
|
```
|
61
64
|
|
62
65
|
# Field Types
|
@@ -77,7 +80,7 @@ The following fields are extracted for Invoice Splitter V1:
|
|
77
80
|
|
78
81
|
```rb
|
79
82
|
for invoice_page_groups_elem in result.document.inference.prediction.invoice_page_groups do
|
80
|
-
puts
|
83
|
+
puts invoice_page_groups_elem.page_indexes.join(', ')
|
81
84
|
end
|
82
85
|
```
|
83
86
|
|
data/docs/invoices_v4.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Invoice OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-invoice-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [Invoice API](https://platform.mindee.com/mindee/invoices).
|
5
8
|
|
@@ -27,6 +30,32 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
34
|
+
```
|
35
|
+
|
36
|
+
You can also call this product asynchronously:
|
37
|
+
|
38
|
+
```rb
|
39
|
+
require 'mindee'
|
40
|
+
|
41
|
+
# Init a new client
|
42
|
+
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
43
|
+
|
44
|
+
# Load a file from disk
|
45
|
+
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
46
|
+
|
47
|
+
# Parse the file
|
48
|
+
result = mindee_client.enqueue_and_parse(
|
49
|
+
input_source,
|
50
|
+
Mindee::Product::Invoice::InvoiceV4
|
51
|
+
)
|
52
|
+
|
53
|
+
# Print a full summary of the parsed data in RST format
|
54
|
+
puts result.document
|
55
|
+
|
56
|
+
# Print the document-level parsed data
|
57
|
+
# puts result.document.inference.prediction
|
58
|
+
|
30
59
|
```
|
31
60
|
|
32
61
|
**Output (RST):**
|
@@ -34,12 +63,12 @@ puts result.document
|
|
34
63
|
########
|
35
64
|
Document
|
36
65
|
########
|
37
|
-
:Mindee ID:
|
66
|
+
:Mindee ID: 372d9d08-59d8-4e1c-9622-06648c1c238b
|
38
67
|
:Filename: default_sample.jpg
|
39
68
|
|
40
69
|
Inference
|
41
70
|
#########
|
42
|
-
:Product: mindee/invoices v4.
|
71
|
+
:Product: mindee/invoices v4.7
|
43
72
|
:Rotation applied: Yes
|
44
73
|
|
45
74
|
Prediction
|
@@ -49,7 +78,7 @@ Prediction
|
|
49
78
|
:Reference Numbers: AD29094
|
50
79
|
:Purchase Date: 2018-09-25
|
51
80
|
:Due Date:
|
52
|
-
:Total Net:
|
81
|
+
:Total Net: 2145.00
|
53
82
|
:Total Amount: 2608.20
|
54
83
|
:Total Tax: 193.20
|
55
84
|
:Taxes:
|
@@ -73,15 +102,15 @@ Prediction
|
|
73
102
|
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
74
103
|
:Document Type: INVOICE
|
75
104
|
:Line Items:
|
76
|
-
|
77
|
-
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
|
78
|
-
|
79
|
-
| Platinum web hosting package Down... | | 1.00 | | | 65.00 | 65.00 |
|
80
|
-
|
81
|
-
| 2 page website design Includes ba... | | 3.00 | | | 2100.00 | 2100.00 |
|
82
|
-
|
83
|
-
| Mobile designs Includes responsiv... | | 1.00 | | | 250.00 | 250.00 |
|
84
|
-
|
105
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
106
|
+
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
|
107
|
+
+======================================+==============+==========+============+==============+==============+=================+============+
|
108
|
+
| Platinum web hosting package Down... | | 1.00 | | | 65.00 | | 65.00 |
|
109
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
110
|
+
| 2 page website design Includes ba... | | 3.00 | | | 2100.00 | | 2100.00 |
|
111
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
112
|
+
| Mobile designs Includes responsiv... | | 1.00 | | | 250.00 | 1 | 250.00 |
|
113
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
85
114
|
|
86
115
|
Page Predictions
|
87
116
|
================
|
@@ -93,7 +122,7 @@ Page 0
|
|
93
122
|
:Reference Numbers: AD29094
|
94
123
|
:Purchase Date: 2018-09-25
|
95
124
|
:Due Date:
|
96
|
-
:Total Net:
|
125
|
+
:Total Net: 2145.00
|
97
126
|
:Total Amount: 2608.20
|
98
127
|
:Total Tax: 193.20
|
99
128
|
:Taxes:
|
@@ -117,15 +146,15 @@ Page 0
|
|
117
146
|
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
118
147
|
:Document Type: INVOICE
|
119
148
|
:Line Items:
|
120
|
-
|
121
|
-
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
|
122
|
-
|
123
|
-
| Platinum web hosting package Down... | | 1.00 | | | 65.00 | 65.00 |
|
124
|
-
|
125
|
-
| 2 page website design Includes ba... | | 3.00 | | | 2100.00 | 2100.00 |
|
126
|
-
|
127
|
-
| Mobile designs Includes responsiv... | | 1.00 | | | 250.00 | 250.00 |
|
128
|
-
|
149
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
150
|
+
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
|
151
|
+
+======================================+==============+==========+============+==============+==============+=================+============+
|
152
|
+
| Platinum web hosting package Down... | | 1.00 | | | 65.00 | | 65.00 |
|
153
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
154
|
+
| 2 page website design Includes ba... | | 3.00 | | | 2100.00 | | 2100.00 |
|
155
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
156
|
+
| Mobile designs Includes responsiv... | | 1.00 | | | 250.00 | 1 | 250.00 |
|
157
|
+
+--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
|
129
158
|
```
|
130
159
|
|
131
160
|
# Field Types
|
@@ -140,7 +169,7 @@ A typical `Field` object will have the following attributes:
|
|
140
169
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
141
170
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
142
171
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
143
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
172
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
144
173
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
145
174
|
|
146
175
|
|
@@ -212,6 +241,7 @@ A `InvoiceV4LineItem` implements the following attributes:
|
|
212
241
|
* `tax_amount` (Float): The item tax amount.
|
213
242
|
* `tax_rate` (Float): The item tax rate in percentage.
|
214
243
|
* `total_amount` (Float): The item total amount.
|
244
|
+
* `unit_measure` (String): The item unit of measure.
|
215
245
|
* `unit_price` (Float): The item unit price.
|
216
246
|
|
217
247
|
# Attributes
|
@@ -264,6 +294,10 @@ puts result.document.inference.prediction.date.value
|
|
264
294
|
## Document Type
|
265
295
|
**document_type** ([ClassificationField](#classification-field)): One of: 'INVOICE', 'CREDIT NOTE'.
|
266
296
|
|
297
|
+
#### Possible values include:
|
298
|
+
- INVOICE
|
299
|
+
- CREDIT NOTE
|
300
|
+
|
267
301
|
```rb
|
268
302
|
puts result.document.inference.prediction.document_type.value
|
269
303
|
```
|
data/docs/license_plates_v1.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: EU License Plate OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-eu-license-plate-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [License Plate API](https://platform.mindee.com/mindee/license_plates).
|
5
8
|
|
@@ -27,6 +30,7 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
30
34
|
```
|
31
35
|
|
32
36
|
**Output (RST):**
|
@@ -66,7 +70,7 @@ A typical `Field` object will have the following attributes:
|
|
66
70
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
67
71
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
68
72
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
69
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
73
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
70
74
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
71
75
|
|
72
76
|
|
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Multi Receipts Detector OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-multi-receipts-detector-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [Multi Receipts Detector API](https://platform.mindee.com/mindee/multi_receipts_detector).
|
5
8
|
|
@@ -27,6 +30,7 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
30
34
|
```
|
31
35
|
|
32
36
|
**Output (RST):**
|
@@ -76,7 +80,7 @@ A typical `Field` object will have the following attributes:
|
|
76
80
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
77
81
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
78
82
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
79
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
83
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
80
84
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
81
85
|
|
82
86
|
|
@@ -0,0 +1,295 @@
|
|
1
|
+
---
|
2
|
+
title: Nutrition Facts Label OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-nutrition-facts-label-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
6
|
+
---
|
7
|
+
The Ruby OCR SDK supports the [Nutrition Facts Label API](https://platform.mindee.com/mindee/nutrition_facts).
|
8
|
+
|
9
|
+
The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/nutrition_facts/default_sample.jpg) can be used for testing purposes.
|
10
|
+

|
11
|
+
|
12
|
+
# Quick-Start
|
13
|
+
```rb
|
14
|
+
require 'mindee'
|
15
|
+
|
16
|
+
# Init a new client
|
17
|
+
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
18
|
+
|
19
|
+
# Load a file from disk
|
20
|
+
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
21
|
+
|
22
|
+
# Parse the file
|
23
|
+
result = mindee_client.enqueue_and_parse(
|
24
|
+
input_source,
|
25
|
+
Mindee::Product::NutritionFactsLabel::NutritionFactsLabelV1
|
26
|
+
)
|
27
|
+
|
28
|
+
# Print a full summary of the parsed data in RST format
|
29
|
+
puts result.document
|
30
|
+
|
31
|
+
# Print the document-level parsed data
|
32
|
+
# puts result.document.inference.prediction
|
33
|
+
|
34
|
+
```
|
35
|
+
# Field Types
|
36
|
+
## Standard Fields
|
37
|
+
These fields are generic and used in several products.
|
38
|
+
|
39
|
+
### Basic Field
|
40
|
+
Each prediction object contains a set of fields that inherit from the generic `Field` class.
|
41
|
+
A typical `Field` object will have the following attributes:
|
42
|
+
|
43
|
+
* **value** (`String`, `Float`, `Integer`, `Boolean`): corresponds to the field value. Can be `nil` if no value was extracted.
|
44
|
+
* **confidence** (Float, nil): the confidence score of the field prediction.
|
45
|
+
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
46
|
+
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
47
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
48
|
+
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
49
|
+
|
50
|
+
|
51
|
+
Aside from the previous attributes, all basic fields have access to a `to_s` method that can be used to print their value as a string.
|
52
|
+
|
53
|
+
|
54
|
+
### Amount Field
|
55
|
+
The amount field `AmountField` only has one constraint: its **value** is a `Float` (or `nil`).
|
56
|
+
|
57
|
+
## Specific Fields
|
58
|
+
Fields which are specific to this product; they are not used in any other product.
|
59
|
+
|
60
|
+
### Added Sugars Field
|
61
|
+
The amount of added sugars in the product.
|
62
|
+
|
63
|
+
A `NutritionFactsLabelV1AddedSugar` implements the following attributes:
|
64
|
+
|
65
|
+
* `daily_value` (Float): DVs are the recommended amounts of added sugars to consume or not to exceed each day.
|
66
|
+
* `per_100g` (Float): The amount of added sugars per 100g of the product.
|
67
|
+
* `per_serving` (Float): The amount of added sugars per serving of the product.
|
68
|
+
Fields which are specific to this product; they are not used in any other product.
|
69
|
+
|
70
|
+
### Calories Field
|
71
|
+
The amount of calories in the product.
|
72
|
+
|
73
|
+
A `NutritionFactsLabelV1Calorie` implements the following attributes:
|
74
|
+
|
75
|
+
* `daily_value` (Float): DVs are the recommended amounts of calories to consume or not to exceed each day.
|
76
|
+
* `per_100g` (Float): The amount of calories per 100g of the product.
|
77
|
+
* `per_serving` (Float): The amount of calories per serving of the product.
|
78
|
+
Fields which are specific to this product; they are not used in any other product.
|
79
|
+
|
80
|
+
### Cholesterol Field
|
81
|
+
The amount of cholesterol in the product.
|
82
|
+
|
83
|
+
A `NutritionFactsLabelV1Cholesterol` implements the following attributes:
|
84
|
+
|
85
|
+
* `daily_value` (Float): DVs are the recommended amounts of cholesterol to consume or not to exceed each day.
|
86
|
+
* `per_100g` (Float): The amount of cholesterol per 100g of the product.
|
87
|
+
* `per_serving` (Float): The amount of cholesterol per serving of the product.
|
88
|
+
Fields which are specific to this product; they are not used in any other product.
|
89
|
+
|
90
|
+
### Dietary Fiber Field
|
91
|
+
The amount of dietary fiber in the product.
|
92
|
+
|
93
|
+
A `NutritionFactsLabelV1DietaryFiber` implements the following attributes:
|
94
|
+
|
95
|
+
* `daily_value` (Float): DVs are the recommended amounts of dietary fiber to consume or not to exceed each day.
|
96
|
+
* `per_100g` (Float): The amount of dietary fiber per 100g of the product.
|
97
|
+
* `per_serving` (Float): The amount of dietary fiber per serving of the product.
|
98
|
+
Fields which are specific to this product; they are not used in any other product.
|
99
|
+
|
100
|
+
### nutrients Field
|
101
|
+
The amount of nutrients in the product.
|
102
|
+
|
103
|
+
A `NutritionFactsLabelV1Nutrient` implements the following attributes:
|
104
|
+
|
105
|
+
* `daily_value` (Float): DVs are the recommended amounts of nutrients to consume or not to exceed each day.
|
106
|
+
* `name` (String): The name of nutrients of the product.
|
107
|
+
* `per_100g` (Float): The amount of nutrients per 100g of the product.
|
108
|
+
* `per_serving` (Float): The amount of nutrients per serving of the product.
|
109
|
+
* `unit` (String): The unit of measurement for the amount of nutrients.
|
110
|
+
Fields which are specific to this product; they are not used in any other product.
|
111
|
+
|
112
|
+
### Protein Field
|
113
|
+
The amount of protein in the product.
|
114
|
+
|
115
|
+
A `NutritionFactsLabelV1Protein` implements the following attributes:
|
116
|
+
|
117
|
+
* `daily_value` (Float): DVs are the recommended amounts of protein to consume or not to exceed each day.
|
118
|
+
* `per_100g` (Float): The amount of protein per 100g of the product.
|
119
|
+
* `per_serving` (Float): The amount of protein per serving of the product.
|
120
|
+
Fields which are specific to this product; they are not used in any other product.
|
121
|
+
|
122
|
+
### Saturated Fat Field
|
123
|
+
The amount of saturated fat in the product.
|
124
|
+
|
125
|
+
A `NutritionFactsLabelV1SaturatedFat` implements the following attributes:
|
126
|
+
|
127
|
+
* `daily_value` (Float): DVs are the recommended amounts of saturated fat to consume or not to exceed each day.
|
128
|
+
* `per_100g` (Float): The amount of saturated fat per 100g of the product.
|
129
|
+
* `per_serving` (Float): The amount of saturated fat per serving of the product.
|
130
|
+
Fields which are specific to this product; they are not used in any other product.
|
131
|
+
|
132
|
+
### Serving Size Field
|
133
|
+
The size of a single serving of the product.
|
134
|
+
|
135
|
+
A `NutritionFactsLabelV1ServingSize` implements the following attributes:
|
136
|
+
|
137
|
+
* `amount` (Float): The amount of a single serving.
|
138
|
+
* `unit` (String): The unit for the amount of a single serving.
|
139
|
+
Fields which are specific to this product; they are not used in any other product.
|
140
|
+
|
141
|
+
### sodium Field
|
142
|
+
The amount of sodium in the product.
|
143
|
+
|
144
|
+
A `NutritionFactsLabelV1Sodium` implements the following attributes:
|
145
|
+
|
146
|
+
* `daily_value` (Float): DVs are the recommended amounts of sodium to consume or not to exceed each day.
|
147
|
+
* `per_100g` (Float): The amount of sodium per 100g of the product.
|
148
|
+
* `per_serving` (Float): The amount of sodium per serving of the product.
|
149
|
+
* `unit` (String): The unit of measurement for the amount of sodium.
|
150
|
+
Fields which are specific to this product; they are not used in any other product.
|
151
|
+
|
152
|
+
### Total Carbohydrate Field
|
153
|
+
The total amount of carbohydrates in the product.
|
154
|
+
|
155
|
+
A `NutritionFactsLabelV1TotalCarbohydrate` implements the following attributes:
|
156
|
+
|
157
|
+
* `daily_value` (Float): DVs are the recommended amounts of total carbohydrates to consume or not to exceed each day.
|
158
|
+
* `per_100g` (Float): The amount of total carbohydrates per 100g of the product.
|
159
|
+
* `per_serving` (Float): The amount of total carbohydrates per serving of the product.
|
160
|
+
Fields which are specific to this product; they are not used in any other product.
|
161
|
+
|
162
|
+
### Total Fat Field
|
163
|
+
The total amount of fat in the product.
|
164
|
+
|
165
|
+
A `NutritionFactsLabelV1TotalFat` implements the following attributes:
|
166
|
+
|
167
|
+
* `daily_value` (Float): DVs are the recommended amounts of total fat to consume or not to exceed each day.
|
168
|
+
* `per_100g` (Float): The amount of total fat per 100g of the product.
|
169
|
+
* `per_serving` (Float): The amount of total fat per serving of the product.
|
170
|
+
Fields which are specific to this product; they are not used in any other product.
|
171
|
+
|
172
|
+
### Total Sugars Field
|
173
|
+
The total amount of sugars in the product.
|
174
|
+
|
175
|
+
A `NutritionFactsLabelV1TotalSugar` implements the following attributes:
|
176
|
+
|
177
|
+
* `daily_value` (Float): DVs are the recommended amounts of total sugars to consume or not to exceed each day.
|
178
|
+
* `per_100g` (Float): The amount of total sugars per 100g of the product.
|
179
|
+
* `per_serving` (Float): The amount of total sugars per serving of the product.
|
180
|
+
Fields which are specific to this product; they are not used in any other product.
|
181
|
+
|
182
|
+
### Trans Fat Field
|
183
|
+
The amount of trans fat in the product.
|
184
|
+
|
185
|
+
A `NutritionFactsLabelV1TransFat` implements the following attributes:
|
186
|
+
|
187
|
+
* `daily_value` (Float): DVs are the recommended amounts of trans fat to consume or not to exceed each day.
|
188
|
+
* `per_100g` (Float): The amount of trans fat per 100g of the product.
|
189
|
+
* `per_serving` (Float): The amount of trans fat per serving of the product.
|
190
|
+
|
191
|
+
# Attributes
|
192
|
+
The following fields are extracted for Nutrition Facts Label V1:
|
193
|
+
|
194
|
+
## Added Sugars
|
195
|
+
**added_sugars** ([NutritionFactsLabelV1AddedSugar](#added-sugars-field)): The amount of added sugars in the product.
|
196
|
+
|
197
|
+
```rb
|
198
|
+
puts result.document.inference.prediction.added_sugars.value
|
199
|
+
```
|
200
|
+
|
201
|
+
## Calories
|
202
|
+
**calories** ([NutritionFactsLabelV1Calorie](#calories-field)): The amount of calories in the product.
|
203
|
+
|
204
|
+
```rb
|
205
|
+
puts result.document.inference.prediction.calories.value
|
206
|
+
```
|
207
|
+
|
208
|
+
## Cholesterol
|
209
|
+
**cholesterol** ([NutritionFactsLabelV1Cholesterol](#cholesterol-field)): The amount of cholesterol in the product.
|
210
|
+
|
211
|
+
```rb
|
212
|
+
puts result.document.inference.prediction.cholesterol.value
|
213
|
+
```
|
214
|
+
|
215
|
+
## Dietary Fiber
|
216
|
+
**dietary_fiber** ([NutritionFactsLabelV1DietaryFiber](#dietary-fiber-field)): The amount of dietary fiber in the product.
|
217
|
+
|
218
|
+
```rb
|
219
|
+
puts result.document.inference.prediction.dietary_fiber.value
|
220
|
+
```
|
221
|
+
|
222
|
+
## nutrients
|
223
|
+
**nutrients** (Array<[NutritionFactsLabelV1Nutrient](#nutrients-field)>): The amount of nutrients in the product.
|
224
|
+
|
225
|
+
```rb
|
226
|
+
for nutrients_elem in result.document.inference.prediction.nutrients do
|
227
|
+
puts nutrients_elem.value
|
228
|
+
end
|
229
|
+
```
|
230
|
+
|
231
|
+
## Protein
|
232
|
+
**protein** ([NutritionFactsLabelV1Protein](#protein-field)): The amount of protein in the product.
|
233
|
+
|
234
|
+
```rb
|
235
|
+
puts result.document.inference.prediction.protein.value
|
236
|
+
```
|
237
|
+
|
238
|
+
## Saturated Fat
|
239
|
+
**saturated_fat** ([NutritionFactsLabelV1SaturatedFat](#saturated-fat-field)): The amount of saturated fat in the product.
|
240
|
+
|
241
|
+
```rb
|
242
|
+
puts result.document.inference.prediction.saturated_fat.value
|
243
|
+
```
|
244
|
+
|
245
|
+
## Serving per Box
|
246
|
+
**serving_per_box** ([AmountField](#amount-field)): The number of servings in each box of the product.
|
247
|
+
|
248
|
+
```rb
|
249
|
+
puts result.document.inference.prediction.serving_per_box.value
|
250
|
+
```
|
251
|
+
|
252
|
+
## Serving Size
|
253
|
+
**serving_size** ([NutritionFactsLabelV1ServingSize](#serving-size-field)): The size of a single serving of the product.
|
254
|
+
|
255
|
+
```rb
|
256
|
+
puts result.document.inference.prediction.serving_size.value
|
257
|
+
```
|
258
|
+
|
259
|
+
## sodium
|
260
|
+
**sodium** ([NutritionFactsLabelV1Sodium](#sodium-field)): The amount of sodium in the product.
|
261
|
+
|
262
|
+
```rb
|
263
|
+
puts result.document.inference.prediction.sodium.value
|
264
|
+
```
|
265
|
+
|
266
|
+
## Total Carbohydrate
|
267
|
+
**total_carbohydrate** ([NutritionFactsLabelV1TotalCarbohydrate](#total-carbohydrate-field)): The total amount of carbohydrates in the product.
|
268
|
+
|
269
|
+
```rb
|
270
|
+
puts result.document.inference.prediction.total_carbohydrate.value
|
271
|
+
```
|
272
|
+
|
273
|
+
## Total Fat
|
274
|
+
**total_fat** ([NutritionFactsLabelV1TotalFat](#total-fat-field)): The total amount of fat in the product.
|
275
|
+
|
276
|
+
```rb
|
277
|
+
puts result.document.inference.prediction.total_fat.value
|
278
|
+
```
|
279
|
+
|
280
|
+
## Total Sugars
|
281
|
+
**total_sugars** ([NutritionFactsLabelV1TotalSugar](#total-sugars-field)): The total amount of sugars in the product.
|
282
|
+
|
283
|
+
```rb
|
284
|
+
puts result.document.inference.prediction.total_sugars.value
|
285
|
+
```
|
286
|
+
|
287
|
+
## Trans Fat
|
288
|
+
**trans_fat** ([NutritionFactsLabelV1TransFat](#trans-fat-field)): The amount of trans fat in the product.
|
289
|
+
|
290
|
+
```rb
|
291
|
+
puts result.document.inference.prediction.trans_fat.value
|
292
|
+
```
|
293
|
+
|
294
|
+
# Questions?
|
295
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/passport_v1.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
title: Passport OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-passport-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
3
6
|
---
|
4
7
|
The Ruby OCR SDK supports the [Passport API](https://platform.mindee.com/mindee/passport).
|
5
8
|
|
@@ -27,6 +30,7 @@ puts result.document
|
|
27
30
|
|
28
31
|
# Print the document-level parsed data
|
29
32
|
# puts result.document.inference.prediction
|
33
|
+
|
30
34
|
```
|
31
35
|
|
32
36
|
**Output (RST):**
|
@@ -86,7 +90,7 @@ A typical `Field` object will have the following attributes:
|
|
86
90
|
* **confidence** (Float, nil): the confidence score of the field prediction.
|
87
91
|
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
88
92
|
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
89
|
-
* **page_id** (`Integer`, `nil`): the ID of the page,
|
93
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
90
94
|
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
91
95
|
|
92
96
|
|