mindee 4.0.0 → 4.1.2
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/CHANGELOG.md +18 -0
- data/bin/cli_products.rb +172 -0
- data/bin/mindee.rb +6 -121
- data/docs/advanced_file_operations.md +7 -9
- data/docs/code_samples/invoice_splitter_v1_async.txt +2 -1
- data/docs/code_samples/{license_plates_v1.txt → us_mail_v2_async.txt} +1 -1
- data/docs/code_samples/workflow_execution.txt +28 -0
- data/docs/getting_started.md +1 -1
- data/docs/global_products/barcode_reader_v1.md +1 -1
- data/docs/global_products/bill_of_lading_v1.md +1 -1
- data/docs/global_products/business_card_v1.md +1 -1
- data/docs/global_products/cropper_v1.md +1 -1
- data/docs/global_products/delivery_notes_v1.md +2 -2
- data/docs/global_products/driver_license_v1.md +1 -1
- data/docs/global_products/expense_receipts_v5.md +26 -25
- data/docs/global_products/financial_document_v1.md +34 -33
- data/docs/global_products/international_id_v2.md +7 -7
- data/docs/global_products/invoice_splitter_v1.md +53 -33
- data/docs/global_products/invoices_v4.md +19 -19
- data/docs/global_products/multi_receipts_detector_v1.md +1 -1
- data/docs/global_products/nutrition_facts_v1.md +1 -1
- data/docs/global_products/passport_v1.md +1 -1
- data/docs/global_products/resume_v1.md +4 -4
- data/docs/global_products/universal.md +1 -1
- data/docs/global_products.md +1 -1
- data/docs/loading_a_document.md +87 -73
- data/docs/localized_products/bank_account_details_v2.md +1 -1
- data/docs/localized_products/bank_check_v1.md +1 -1
- data/docs/localized_products/bank_statement_fr_v2.md +1 -1
- data/docs/localized_products/carte_grise_v1.md +1 -1
- data/docs/localized_products/energy_bill_fra_v1.md +11 -3
- data/docs/localized_products/french_healthcard_v1.md +1 -1
- data/docs/localized_products/idcard_fr_v2.md +6 -6
- data/docs/localized_products/ind_passport_v1.md +5 -5
- data/docs/localized_products/payslip_fra_v3.md +1 -1
- data/docs/localized_products/us_healthcare_cards_v1.md +2 -2
- data/docs/localized_products/us_mail_v3.md +1 -1
- data/docs/localized_products/us_w9_v1.md +1 -1
- data/docs/localized_products.md +1 -1
- data/lib/mindee/client.rb +6 -8
- data/lib/mindee/geometry/polygon.rb +1 -1
- data/lib/mindee/http/workflow_endpoint.rb +23 -23
- data/lib/mindee/pdf/pdf_extractor.rb +3 -3
- data/lib/mindee/product/delivery_note/delivery_note_v1_document.rb +1 -1
- data/lib/mindee/product/delivery_note/delivery_note_v1_page.rb +1 -1
- data/lib/mindee/product/financial_document/financial_document_v1_document.rb +15 -14
- data/lib/mindee/product/financial_document/financial_document_v1_line_item.rb +1 -1
- data/lib/mindee/product/financial_document/financial_document_v1_line_items.rb +1 -1
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_document.rb +5 -1
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rb +18 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rb +4 -0
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb +2 -2
- data/lib/mindee/product/fr/energy_bill/energy_bill_v1_page.rb +1 -1
- data/lib/mindee/product/invoice/invoice_v4_document.rb +14 -14
- data/lib/mindee/product/invoice/invoice_v4_line_item.rb +2 -2
- data/lib/mindee/product/invoice/invoice_v4_line_items.rb +1 -1
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1.rb +2 -2
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb +38 -42
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rb +55 -0
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb +48 -0
- data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_page.rb +9 -5
- data/lib/mindee/product/receipt/receipt_v5_document.rb +8 -8
- data/lib/mindee/product/receipt/receipt_v5_line_item.rb +1 -1
- data/lib/mindee/product/receipt/receipt_v5_line_items.rb +1 -1
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb +1 -1
- data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb +1 -1
- data/lib/mindee/product/{eu/license_plate/license_plate_v1.rb → us/us_mail/us_mail_v2.rb} +13 -13
- data/lib/mindee/product/us/us_mail/us_mail_v2_document.rb +105 -0
- data/lib/mindee/product/{eu/license_plate/license_plate_v1_page.rb → us/us_mail/us_mail_v2_page.rb} +8 -8
- data/lib/mindee/product/us/us_mail/us_mail_v2_recipient_address.rb +105 -0
- data/lib/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rb +63 -0
- data/lib/mindee/product/us/us_mail/us_mail_v2_sender_address.rb +66 -0
- data/lib/mindee/product.rb +5 -5
- data/lib/mindee/version.rb +1 -1
- data/mindee.gemspec +11 -11
- data/sig/custom/net_http.rbs +5 -0
- data/sig/mindee/client.rbs +1 -0
- data/sig/mindee/http/workflow_endpoint.rbs +8 -2
- data/sig/mindee/pdf/pdf_extractor.rbs +1 -1
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_items.rbs +1 -1
- data/sig/mindee/product/financial_document/financial_document_v1_line_items.rbs +1 -1
- data/sig/mindee/product/fr/bank_statement/bank_statement_v2_transactions.rbs +1 -1
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rbs +2 -0
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rbs +1 -1
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_subscriptions.rbs +1 -1
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contributions.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v2_salary_details.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v3_paid_time_offs.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v3_salary_details.rbs +1 -1
- data/sig/mindee/product/invoice/invoice_v4_line_items.rbs +1 -1
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1.rbs +1 -4
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_document.rbs +5 -9
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rbs +14 -0
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rbs +13 -0
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_page.rbs +2 -0
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrients.rbs +1 -1
- data/sig/mindee/product/receipt/receipt_v5_line_items.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_certificates.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_educations.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_languages.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_professional_experiences.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_social_networks_urls.rbs +1 -1
- data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rbs +1 -1
- data/sig/mindee/product/us/us_mail/us_mail_v2.rbs +13 -0
- data/sig/mindee/product/us/us_mail/us_mail_v2_document.rbs +20 -0
- data/sig/mindee/product/{eu/license_plate/license_plate_v1_page.rbs → us/us_mail/us_mail_v2_page.rbs} +5 -5
- data/sig/mindee/product/us/us_mail/us_mail_v2_recipient_address.rbs +22 -0
- data/sig/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rbs +15 -0
- data/sig/mindee/product/us/us_mail/us_mail_v2_sender_address.rbs +18 -0
- data/sig/mindee/product/us/us_mail/us_mail_v3_recipient_addresses.rbs +1 -1
- metadata +39 -28
- data/docs/localized_products/license_plates_v1.md +0 -112
- data/lib/mindee/product/eu/license_plate/license_plate_v1_document.rb +0 -37
- data/sig/mindee/product/eu/license_plate/license_plate_v1.rbs +0 -13
- data/sig/mindee/product/eu/license_plate/license_plate_v1_document.rbs +0 -15
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mindee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindee, SA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1
|
19
|
+
version: '0.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1
|
26
|
+
version: '0.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: marcel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mini_magick
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,28 +64,28 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 4.0
|
67
|
+
version: '4.0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 4.0
|
74
|
+
version: '4.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: pdf-reader
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
81
|
+
version: '2.14'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
88
|
+
version: '2.14'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: prism
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 13.2
|
109
|
+
version: '13.2'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 13.2
|
116
|
+
version: '13.2'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rbs
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,56 +134,56 @@ dependencies:
|
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 3.13
|
137
|
+
version: '3.13'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: 3.13
|
144
|
+
version: '3.13'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: rubocop
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 1.70
|
151
|
+
version: '1.70'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 1.70
|
158
|
+
version: '1.70'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: steep
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 1.7
|
165
|
+
version: '1.7'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 1.7
|
172
|
+
version: '1.7'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: yard
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: 0.9
|
179
|
+
version: '0.9'
|
180
180
|
type: :development
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: 0.9
|
186
|
+
version: '0.9'
|
187
187
|
description: Quickly and easily connect to Mindee's API services using Ruby.
|
188
188
|
email:
|
189
189
|
- opensource@mindee.co
|
@@ -206,6 +206,7 @@ files:
|
|
206
206
|
- README.md
|
207
207
|
- Rakefile
|
208
208
|
- Steepfile
|
209
|
+
- bin/cli_products.rb
|
209
210
|
- bin/console
|
210
211
|
- bin/mindee.rb
|
211
212
|
- docs/advanced_file_operations.md
|
@@ -235,7 +236,6 @@ files:
|
|
235
236
|
- docs/code_samples/invoice_splitter_v1_async.txt
|
236
237
|
- docs/code_samples/invoices_v4.txt
|
237
238
|
- docs/code_samples/invoices_v4_async.txt
|
238
|
-
- docs/code_samples/license_plates_v1.txt
|
239
239
|
- docs/code_samples/multi_receipts_detector_v1.txt
|
240
240
|
- docs/code_samples/nutrition_facts_v1_async.txt
|
241
241
|
- docs/code_samples/passport_v1.txt
|
@@ -243,8 +243,10 @@ files:
|
|
243
243
|
- docs/code_samples/payslip_fra_v3_async.txt
|
244
244
|
- docs/code_samples/resume_v1_async.txt
|
245
245
|
- docs/code_samples/us_healthcare_cards_v1_async.txt
|
246
|
+
- docs/code_samples/us_mail_v2_async.txt
|
246
247
|
- docs/code_samples/us_mail_v3_async.txt
|
247
248
|
- docs/code_samples/us_w9_v1.txt
|
249
|
+
- docs/code_samples/workflow_execution.txt
|
248
250
|
- docs/getting_started.md
|
249
251
|
- docs/global_products.md
|
250
252
|
- docs/global_products/barcode_reader_v1.md
|
@@ -273,7 +275,6 @@ files:
|
|
273
275
|
- docs/localized_products/french_healthcard_v1.md
|
274
276
|
- docs/localized_products/idcard_fr_v2.md
|
275
277
|
- docs/localized_products/ind_passport_v1.md
|
276
|
-
- docs/localized_products/license_plates_v1.md
|
277
278
|
- docs/localized_products/payslip_fra_v3.md
|
278
279
|
- docs/localized_products/us_healthcare_cards_v1.md
|
279
280
|
- docs/localized_products/us_mail_v3.md
|
@@ -387,9 +388,6 @@ files:
|
|
387
388
|
- lib/mindee/product/driver_license/driver_license_v1.rb
|
388
389
|
- lib/mindee/product/driver_license/driver_license_v1_document.rb
|
389
390
|
- lib/mindee/product/driver_license/driver_license_v1_page.rb
|
390
|
-
- lib/mindee/product/eu/license_plate/license_plate_v1.rb
|
391
|
-
- lib/mindee/product/eu/license_plate/license_plate_v1_document.rb
|
392
|
-
- lib/mindee/product/eu/license_plate/license_plate_v1_page.rb
|
393
391
|
- lib/mindee/product/financial_document/financial_document_v1.rb
|
394
392
|
- lib/mindee/product/financial_document/financial_document_v1_document.rb
|
395
393
|
- lib/mindee/product/financial_document/financial_document_v1_line_item.rb
|
@@ -469,6 +467,8 @@ files:
|
|
469
467
|
- lib/mindee/product/invoice/invoice_v4_page.rb
|
470
468
|
- lib/mindee/product/invoice_splitter/invoice_splitter_v1.rb
|
471
469
|
- lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb
|
470
|
+
- lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rb
|
471
|
+
- lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb
|
472
472
|
- lib/mindee/product/invoice_splitter/invoice_splitter_v1_page.rb
|
473
473
|
- lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rb
|
474
474
|
- lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb
|
@@ -523,6 +523,12 @@ files:
|
|
523
523
|
- lib/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rb
|
524
524
|
- lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb
|
525
525
|
- lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb
|
526
|
+
- lib/mindee/product/us/us_mail/us_mail_v2.rb
|
527
|
+
- lib/mindee/product/us/us_mail/us_mail_v2_document.rb
|
528
|
+
- lib/mindee/product/us/us_mail/us_mail_v2_page.rb
|
529
|
+
- lib/mindee/product/us/us_mail/us_mail_v2_recipient_address.rb
|
530
|
+
- lib/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rb
|
531
|
+
- lib/mindee/product/us/us_mail/us_mail_v2_sender_address.rb
|
526
532
|
- lib/mindee/product/us/us_mail/us_mail_v3.rb
|
527
533
|
- lib/mindee/product/us/us_mail/us_mail_v3_document.rb
|
528
534
|
- lib/mindee/product/us/us_mail/us_mail_v3_page.rb
|
@@ -627,9 +633,6 @@ files:
|
|
627
633
|
- sig/mindee/product/driver_license/driver_license_v1.rbs
|
628
634
|
- sig/mindee/product/driver_license/driver_license_v1_document.rbs
|
629
635
|
- sig/mindee/product/driver_license/driver_license_v1_page.rbs
|
630
|
-
- sig/mindee/product/eu/license_plate/license_plate_v1.rbs
|
631
|
-
- sig/mindee/product/eu/license_plate/license_plate_v1_document.rbs
|
632
|
-
- sig/mindee/product/eu/license_plate/license_plate_v1_page.rbs
|
633
636
|
- sig/mindee/product/financial_document/financial_document_v1.rbs
|
634
637
|
- sig/mindee/product/financial_document/financial_document_v1_document.rbs
|
635
638
|
- sig/mindee/product/financial_document/financial_document_v1_line_item.rbs
|
@@ -709,6 +712,8 @@ files:
|
|
709
712
|
- sig/mindee/product/invoice/invoice_v4_page.rbs
|
710
713
|
- sig/mindee/product/invoice_splitter/invoice_splitter_v1.rbs
|
711
714
|
- sig/mindee/product/invoice_splitter/invoice_splitter_v1_document.rbs
|
715
|
+
- sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rbs
|
716
|
+
- sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rbs
|
712
717
|
- sig/mindee/product/invoice_splitter/invoice_splitter_v1_page.rbs
|
713
718
|
- sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rbs
|
714
719
|
- sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rbs
|
@@ -763,6 +768,12 @@ files:
|
|
763
768
|
- sig/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rbs
|
764
769
|
- sig/mindee/product/us/healthcare_card/healthcare_card_v1_document.rbs
|
765
770
|
- sig/mindee/product/us/healthcare_card/healthcare_card_v1_page.rbs
|
771
|
+
- sig/mindee/product/us/us_mail/us_mail_v2.rbs
|
772
|
+
- sig/mindee/product/us/us_mail/us_mail_v2_document.rbs
|
773
|
+
- sig/mindee/product/us/us_mail/us_mail_v2_page.rbs
|
774
|
+
- sig/mindee/product/us/us_mail/us_mail_v2_recipient_address.rbs
|
775
|
+
- sig/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rbs
|
776
|
+
- sig/mindee/product/us/us_mail/us_mail_v2_sender_address.rbs
|
766
777
|
- sig/mindee/product/us/us_mail/us_mail_v3.rbs
|
767
778
|
- sig/mindee/product/us/us_mail/us_mail_v3_document.rbs
|
768
779
|
- sig/mindee/product/us/us_mail/us_mail_v3_page.rbs
|
@@ -1,112 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Ruby Client Library - EU License Plate
|
3
|
-
category: 622b805aaec68102ea7fcbc2
|
4
|
-
slug: ruby-eu-license-plate-ocr
|
5
|
-
parentDoc: 67b49e29a2cd6f08d69a40d8
|
6
|
-
---
|
7
|
-
The Ruby Client Library supports the [License Plate API](https://platform.mindee.com/mindee/license_plates).
|
8
|
-
|
9
|
-
|
10
|
-
> 📝 Product Specs
|
11
|
-
>
|
12
|
-
> | Specification | Details |
|
13
|
-
> | ------------------------------ | -------------------------------------------------- |
|
14
|
-
> | Endpoint Name | `license_plates` |
|
15
|
-
> | Recommended Version | `v1.1` |
|
16
|
-
> | Supports Polling/Webhooks | ❌ No |
|
17
|
-
> | Support Synchronous HTTP Calls | ✔️ Yes |
|
18
|
-
> | Geography | 🇪🇺 Europe |
|
19
|
-
|
20
|
-
|
21
|
-
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/license_plates/default_sample.jpg),
|
22
|
-
we are going to illustrate how to extract the data that we want using the Ruby Client Library.
|
23
|
-

|
24
|
-
|
25
|
-
# Quick-Start
|
26
|
-
```rb
|
27
|
-
#
|
28
|
-
# Install the Ruby client library by running:
|
29
|
-
# gem install mindee
|
30
|
-
#
|
31
|
-
|
32
|
-
require 'mindee'
|
33
|
-
|
34
|
-
# Init a new client
|
35
|
-
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
36
|
-
|
37
|
-
# Load a file from disk
|
38
|
-
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
39
|
-
|
40
|
-
# Parse the file
|
41
|
-
result = mindee_client.parse(
|
42
|
-
input_source,
|
43
|
-
Mindee::Product::EU::LicensePlate::LicensePlateV1
|
44
|
-
)
|
45
|
-
|
46
|
-
# Print a full summary of the parsed data in RST format
|
47
|
-
puts result.document
|
48
|
-
|
49
|
-
# Print the document-level parsed data
|
50
|
-
# puts result.document.inference.prediction
|
51
|
-
```
|
52
|
-
|
53
|
-
**Output (RST):**
|
54
|
-
```rst
|
55
|
-
########
|
56
|
-
Document
|
57
|
-
########
|
58
|
-
:Mindee ID: f0f48232-2c80-4473-9c6f-88a09111b84d
|
59
|
-
:Filename: default_sample.jpg
|
60
|
-
|
61
|
-
Inference
|
62
|
-
#########
|
63
|
-
:Product: mindee/license_plates v1.0
|
64
|
-
:Rotation applied: No
|
65
|
-
|
66
|
-
Prediction
|
67
|
-
==========
|
68
|
-
:License Plates: BY-323-YB
|
69
|
-
|
70
|
-
Page Predictions
|
71
|
-
================
|
72
|
-
|
73
|
-
Page 0
|
74
|
-
------
|
75
|
-
:License Plates: BY-323-YB
|
76
|
-
```
|
77
|
-
|
78
|
-
# Field Types
|
79
|
-
## Standard Fields
|
80
|
-
These fields are generic and used in several products.
|
81
|
-
|
82
|
-
### Basic Field
|
83
|
-
Each prediction object contains a set of fields that inherit from the generic `Field` class.
|
84
|
-
A typical `Field` object will have the following attributes:
|
85
|
-
|
86
|
-
* **value** (`String`, `Float`, `Integer`, `bool`): corresponds to the field value. Can be `nil` if no value was extracted.
|
87
|
-
* **confidence** (Float, nil): the confidence score of the field prediction.
|
88
|
-
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
89
|
-
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
90
|
-
* **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
|
91
|
-
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
92
|
-
|
93
|
-
|
94
|
-
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.
|
95
|
-
|
96
|
-
### String Field
|
97
|
-
The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
|
98
|
-
|
99
|
-
# Attributes
|
100
|
-
The following fields are extracted for License Plate V1:
|
101
|
-
|
102
|
-
## License Plates
|
103
|
-
**license_plates** (Array<[StringField](#string-field)>): List of all license plates found in the image.
|
104
|
-
|
105
|
-
```rb
|
106
|
-
result.document.inference.prediction.license_plates do |license_plates_elem|
|
107
|
-
puts license_plates_elem.value
|
108
|
-
end
|
109
|
-
```
|
110
|
-
|
111
|
-
# Questions?
|
112
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../../parsing'
|
4
|
-
|
5
|
-
module Mindee
|
6
|
-
module Product
|
7
|
-
module EU
|
8
|
-
module LicensePlate
|
9
|
-
# License Plate API version 1.1 document data.
|
10
|
-
class LicensePlateV1Document < Mindee::Parsing::Common::Prediction
|
11
|
-
include Mindee::Parsing::Standard
|
12
|
-
# List of all license plates found in the image.
|
13
|
-
# @return [Array<Mindee::Parsing::Standard::StringField>]
|
14
|
-
attr_reader :license_plates
|
15
|
-
|
16
|
-
# @param prediction [Hash]
|
17
|
-
# @param page_id [Integer, nil]
|
18
|
-
def initialize(prediction, page_id)
|
19
|
-
super
|
20
|
-
@license_plates = [] # : Array[Parsing::Standard::StringField]
|
21
|
-
prediction['license_plates'].each do |item|
|
22
|
-
@license_plates.push(Parsing::Standard::StringField.new(item, page_id))
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
# @return [String]
|
27
|
-
def to_s
|
28
|
-
license_plates = @license_plates.join("\n #{' ' * 16}")
|
29
|
-
out_str = String.new
|
30
|
-
out_str << "\n:License Plates: #{license_plates}".rstrip
|
31
|
-
out_str[1..].to_s
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# lib/mindee/product/../license_plate/license_plate_v1.rb
|
2
|
-
|
3
|
-
module Mindee
|
4
|
-
module Product
|
5
|
-
module EU
|
6
|
-
module LicensePlate
|
7
|
-
class LicensePlateV1 < Parsing::Common::Inference
|
8
|
-
def initialize: (Hash[Symbol | String, untyped]) -> void
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# lib/mindee/product/../license_plate/license_plate_v1_document.rb
|
2
|
-
|
3
|
-
module Mindee
|
4
|
-
module Product
|
5
|
-
module EU
|
6
|
-
module LicensePlate
|
7
|
-
class LicensePlateV1Document < Parsing::Common::Prediction
|
8
|
-
def initialize: (Hash[Symbol | String, untyped], Integer?) -> void
|
9
|
-
def license_plates: -> (Array[Parsing::Standard::StringField])
|
10
|
-
def to_s: -> String
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|