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.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +27 -0
  4. data/README.md +23 -23
  5. data/Rakefile +5 -0
  6. data/bin/mindee.rb +7 -1
  7. data/docs/bank_account_details_v2.md +5 -1
  8. data/docs/bank_check_v1.md +6 -2
  9. data/docs/bank_statement_fr_v1.md +3 -0
  10. data/docs/barcode_reader_v1.md +5 -1
  11. data/docs/bill_of_lading_v1.md +202 -0
  12. data/docs/carte_grise_v1.md +5 -1
  13. data/docs/carte_vitale_v1.md +5 -1
  14. data/docs/code_samples/bill_of_lading_v1_async.txt +19 -0
  15. data/docs/code_samples/energy_bill_fra_v1_async.txt +19 -0
  16. data/docs/code_samples/financial_document_v1_async.txt +19 -0
  17. data/docs/code_samples/invoices_v4_async.txt +19 -0
  18. data/docs/code_samples/nutrition_facts_v1_async.txt +19 -0
  19. data/docs/code_samples/payslip_fra_v2_async.txt +19 -0
  20. data/docs/code_samples/us_healthcare_cards_v1_async.txt +19 -0
  21. data/docs/cropper_v1.md +6 -2
  22. data/docs/custom_v1.md +5 -3
  23. data/docs/energy_bill_fra_v1.md +249 -0
  24. data/docs/eu_driver_license_v1.md +6 -2
  25. data/docs/expense_receipts_v5.md +38 -11
  26. data/docs/financial_document_v1.md +80 -23
  27. data/docs/generated_v1.md +3 -0
  28. data/docs/getting_started.md +3 -0
  29. data/docs/idcard_fr_v2.md +15 -2
  30. data/docs/international_id_v2.md +13 -1
  31. data/docs/invoice_splitter_v1.md +16 -13
  32. data/docs/invoices_v4.md +57 -23
  33. data/docs/license_plates_v1.md +5 -1
  34. data/docs/multi_receipts_detector_v1.md +5 -1
  35. data/docs/nutrition_facts_v1.md +295 -0
  36. data/docs/passport_v1.md +5 -1
  37. data/docs/payslip_fra_v2.md +218 -0
  38. data/docs/proof_of_address_v1.md +5 -1
  39. data/docs/resume_v1.md +24 -1
  40. data/docs/us_driver_license_v1.md +6 -2
  41. data/docs/us_healthcare_cards_v1.md +208 -0
  42. data/docs/us_mail_v2.md +5 -1
  43. data/docs/us_w9_v1.md +6 -2
  44. data/examples/auto_invoice_splitter_extraction.rb +43 -0
  45. data/lib/mindee/client.rb +20 -8
  46. data/lib/mindee/extraction/common/extracted_image.rb +73 -0
  47. data/lib/mindee/extraction/common/image_extractor.rb +189 -0
  48. data/lib/mindee/extraction/common.rb +4 -0
  49. data/lib/mindee/extraction/multi_receipts_extractor/multi_receipts_extractor.rb +26 -0
  50. data/lib/mindee/extraction/multi_receipts_extractor.rb +3 -0
  51. data/lib/mindee/extraction/pdf_extractor/extracted_pdf.rb +55 -0
  52. data/lib/mindee/extraction/pdf_extractor/pdf_extractor.rb +111 -0
  53. data/lib/mindee/extraction/pdf_extractor.rb +4 -0
  54. data/lib/mindee/extraction/tax_extractor/tax_extractor.rb +322 -0
  55. data/lib/mindee/extraction/tax_extractor.rb +1 -320
  56. data/lib/mindee/extraction.rb +3 -0
  57. data/lib/mindee/http/endpoint.rb +18 -6
  58. data/lib/mindee/input/sources.rb +8 -0
  59. data/lib/mindee/parsing/common/api_response.rb +1 -1
  60. data/lib/mindee/parsing/common/document.rb +31 -1
  61. data/lib/mindee/parsing/common/extras/cropper_extra.rb +29 -0
  62. data/lib/mindee/parsing/common/extras/extras.rb +50 -0
  63. data/lib/mindee/parsing/common/extras/full_text_ocr_extra.rb +32 -0
  64. data/lib/mindee/parsing/common/extras.rb +5 -0
  65. data/lib/mindee/parsing/common/page.rb +5 -0
  66. data/lib/mindee/parsing/standard/base_field.rb +1 -0
  67. data/lib/mindee/parsing/standard/company_registration_field.rb +17 -0
  68. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1.rb +39 -0
  69. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier.rb +52 -0
  70. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_item.rb +95 -0
  71. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_consignee.rb +58 -0
  72. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_document.rb +136 -0
  73. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb +58 -0
  74. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_page.rb +32 -0
  75. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rb +58 -0
  76. data/lib/mindee/product/financial_document/financial_document_v1_document.rb +3 -1
  77. data/lib/mindee/product/financial_document/financial_document_v1_line_item.rb +22 -1
  78. data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
  79. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb +4 -15
  80. data/lib/mindee/product/fr/energy_bill/energy_bill_v1.rb +41 -0
  81. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_document.rb +235 -0
  82. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_consumer.rb +48 -0
  83. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb +48 -0
  84. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rb +97 -0
  85. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb +54 -0
  86. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_page.rb +34 -0
  87. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_subscription.rb +97 -0
  88. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contribution.rb +97 -0
  89. data/lib/mindee/product/fr/payslip/payslip_v2.rb +41 -0
  90. data/lib/mindee/product/fr/payslip/payslip_v2_bank_account_detail.rb +54 -0
  91. data/lib/mindee/product/fr/payslip/payslip_v2_document.rb +128 -0
  92. data/lib/mindee/product/fr/payslip/payslip_v2_employee.rb +78 -0
  93. data/lib/mindee/product/fr/payslip/payslip_v2_employer.rb +78 -0
  94. data/lib/mindee/product/fr/payslip/payslip_v2_employment.rb +72 -0
  95. data/lib/mindee/product/fr/payslip/payslip_v2_page.rb +34 -0
  96. data/lib/mindee/product/fr/payslip/payslip_v2_pay_detail.rb +100 -0
  97. data/lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb +66 -0
  98. data/lib/mindee/product/fr/payslip/payslip_v2_pto.rb +56 -0
  99. data/lib/mindee/product/fr/payslip/payslip_v2_salary_detail.rb +81 -0
  100. data/lib/mindee/product/international_id/international_id_v2_document.rb +1 -1
  101. data/lib/mindee/product/international_id/international_id_v2_page.rb +1 -1
  102. data/lib/mindee/product/invoice/invoice_v4_document.rb +3 -1
  103. data/lib/mindee/product/invoice/invoice_v4_line_item.rb +22 -1
  104. data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
  105. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb +1 -1
  106. data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb +1 -1
  107. data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb +1 -1
  108. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1.rb +39 -0
  109. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_added_sugar.rb +52 -0
  110. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_calorie.rb +52 -0
  111. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_cholesterol.rb +52 -0
  112. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_dietary_fiber.rb +52 -0
  113. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_document.rb +173 -0
  114. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrient.rb +87 -0
  115. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_page.rb +32 -0
  116. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_protein.rb +52 -0
  117. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_saturated_fat.rb +52 -0
  118. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_serving_size.rb +46 -0
  119. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_sodium.rb +58 -0
  120. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_carbohydrate.rb +52 -0
  121. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_fat.rb +52 -0
  122. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_sugar.rb +52 -0
  123. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_trans_fat.rb +52 -0
  124. data/lib/mindee/product/receipt/receipt_v5_document.rb +1 -1
  125. data/lib/mindee/product/receipt/receipt_v5_line_item.rb +11 -1
  126. data/lib/mindee/product/receipt/receipt_v5_page.rb +1 -1
  127. data/lib/mindee/product/resume/resume_v1_certificate.rb +11 -1
  128. data/lib/mindee/product/resume/resume_v1_education.rb +14 -1
  129. data/lib/mindee/product/resume/resume_v1_language.rb +9 -1
  130. data/lib/mindee/product/resume/resume_v1_professional_experience.rb +15 -1
  131. data/lib/mindee/product/resume/resume_v1_social_networks_url.rb +9 -1
  132. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1.rb +41 -0
  133. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rb +65 -0
  134. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb +127 -0
  135. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb +34 -0
  136. data/lib/mindee/product/us/us_mail/us_mail_v2_recipient_address.rb +14 -1
  137. data/lib/mindee/product/us/us_mail/us_mail_v2_sender_address.rb +5 -17
  138. data/lib/mindee/product.rb +6 -1
  139. data/lib/mindee/version.rb +1 -1
  140. data/mindee.gemspec +1 -0
  141. metadata +91 -3
  142. /data/lib/mindee/extraction/{ocr_extractor.rb → tax_extractor/ocr_extractor.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdf4542787e1ef24c74bf2104d3eacc5205afff3066ea24b0bea52b7d43d6993
4
- data.tar.gz: 6d816b54bb34feb7d6c59db0f0a1f90cc34c5b6dd8155be315dfb698c88838d4
3
+ metadata.gz: 04d255d5113e3dc0f77b2f1d73bc13c9c5de423e7999d984480279488ee65835
4
+ data.tar.gz: 02cfd3cec62b74c7bcbb90068deb6c791fa4f9e36837614f6712b36f32557b5f
5
5
  SHA512:
6
- metadata.gz: 3ee7621e86789bf3f3ff294d505d71272018f342936d05f74f17a57e7b15916f8cde1218ffe1fa7ff7e7d2331c2982562725994bbf3565290645b870756d113e
7
- data.tar.gz: 9b48e7088ffcc75136714e10e0fca34975b6b94f0f8a5241fd775fbcde0e8a05a836ca9f8703a7dc1d00c2820717ccc0cc989c8c1ea390716a3119114347e111
6
+ metadata.gz: d95a14c6fdd4238b135907c5b98eee4026287dbe14c2e71aac3d214f3cd92fd83472ff3bf9d59256892ee806c2375c97a6bdd3889a717ba76a3557c722cf3e9d
7
+ data.tar.gz: ac8b4b8dd66883be7f6669d0da7e68740fdf1dc64c9db9dd6228ec927f300e0bbc43f1498ed231110932fc5531e7d840f7d5f1b40f60bde1415481b699f3d304
data/.rubocop.yml CHANGED
@@ -38,7 +38,7 @@ Metrics/ClassLength:
38
38
  Max: 200
39
39
 
40
40
  Metrics/ParameterLists:
41
- Max: 7
41
+ Max: 8
42
42
 
43
43
  Metrics/AbcSize:
44
44
  Max: 60
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Mindee Ruby API Library Changelog
2
2
 
3
+ ## v3.13.0 - 2024-09-18
4
+ ### Changes
5
+ * :sparkles: add support for BillOfLadingV1
6
+ * :sparkles: add support for (US) UsMailV2
7
+ * :sparkles: add support for (FR) EnergyBillV1
8
+ * :sparkles: add support for (FR) PayslipV1
9
+ * :sparkles: add support for NutritionFactsLabelV1
10
+ * :sparkles: add support for cropper Extra
11
+ * :sparkles: add support for full text Extra
12
+ * :sparkles: add support for invoice splitter auto-extraction
13
+
14
+ ### Fixes
15
+ * :bug: fixed a bug that prevented longer decimals from appearing in the string representation of some objects
16
+ * :bug: fixed a bug that caused non-table elements to unexpectedly appear truncated when printed to the console
17
+ * :memo: fix a few documentation errors & typos
18
+ * :wrench: updated CI dependencies
19
+
20
+
21
+ ## v3.12.0 - 2024-07-24
22
+ ### Changes
23
+ * :sparkles: add support for Multi-Receipts Extraction
24
+ * :sparkles: add support for Healthcare Card V1
25
+ * :sparkles: add support for Invoice V4.7
26
+ * :sparkles: add support for Financial Document V1.9
27
+ * :recycle: update display for company registration fields
28
+
29
+
3
30
  ## v3.11.0 - 2024-06-10
4
31
  ### Changes
5
32
  * :sparkles: add custom tax extraction feature (#76)
data/README.md CHANGED
@@ -167,29 +167,29 @@ bundle exec ruby ./bin/mindee.rb invoice path/to/your/file.ext
167
167
  There's more to it than that for those that need more features, or want to
168
168
  customize the experience.
169
169
 
170
- * [Ruby Overview](https://developers.mindee.com/docs/getting-started-ocr-ruby)
171
- * [Custom OCR Ruby](https://developers.mindee.com/docs/api-builder-ocr-ruby)
172
- * [Generated API Ruby](https://developers.mindee.com/docs/generated-api-ruby)
173
- * [Invoice OCR Ruby](https://developers.mindee.com/docs/invoice-ocr-ruby)
174
- * [International Id OCR Ruby](https://developers.mindee.com/docs/international-id-ocr-ruby)
175
- * [Financial Document OCR Ruby](https://developers.mindee.com/docs/financial-document-ocr-ruby)
176
- * [Passport OCR Ruby](https://developers.mindee.com/docs/passport-ocr-ruby)
177
- * [Proof of Address OCR Ruby](https://developers.mindee.com/docs/proof-of-address-ocr-ruby)
178
- * [Receipt OCR Ruby](https://developers.mindee.com/docs/receipt-ocr-ruby)
179
- * [Resume OCR Ruby](https://developers.mindee.com/docs/resume-ocr-ruby)
180
- * [EU License Plate OCR Ruby](https://developers.mindee.com/docs/eu-license-plate-ocr-ruby)
181
- * [EU Driver License OCR Ruby](https://developers.mindee.com/docs/eu-driver-license-ocr-ruby)
182
- * [FR Bank Account Details OCR Ruby](https://developers.mindee.com/docs/fr-bank-account-details-ocr-ruby)
183
- * [FR Bank Statement OCR Ruby](https://developers.mindee.com/docs/fr-bank-statement-ocr-ruby)
184
- * [FR Carte Vitale OCR Ruby](https://developers.mindee.com/docs/fr-carte-vitale-ocr-ruby)
185
- * [FR ID Card OCR Ruby](https://developers.mindee.com/docs/fr-id-card-ocr-ruby)
186
- * [US Bank Check OCR Ruby](https://developers.mindee.com/docs/us-bank-check-ocr-ruby)
187
- * [US Driver License OCR Ruby](https://developers.mindee.com/docs/us-driver-license-ocr-ruby)
188
- * [US W9 API Ruby](https://developers.mindee.com/docs/us-w9-api-ruby)
189
- * [Barcode Reader API Ruby](https://developers.mindee.com/docs/barcode-reader-api-ruby)
190
- * [Cropper API Ruby](https://developers.mindee.com/docs/cropper-api-ruby)
191
- * [Invoice Splitter API Ruby](https://developers.mindee.com/docs/invoice-splitter-api-ruby)
192
- * [Multi Receipts Detector API Ruby](https://developers.mindee.com/docs/multi-receipts-detector-api-ruby)
170
+ * [Ruby Overview](https://developers.mindee.com/docs/ruby-getting-started)
171
+ * [Custom OCR Ruby (Deprecated)](https://developers.mindee.com/docs/ruby-api-builder-ocr)
172
+ * [Generated API Ruby](https://developers.mindee.com/docs/ruby-generated-ocr)
173
+ * [Invoice OCR Ruby](https://developers.mindee.com/docs/ruby-invoice-ocr)
174
+ * [International Id OCR Ruby](https://developers.mindee.com/docs/ruby-international-id-ocr)
175
+ * [Financial Document OCR Ruby](https://developers.mindee.com/docs/ruby-financial-document-ocr)
176
+ * [Passport OCR Ruby](https://developers.mindee.com/docs/ruby-passport-ocr)
177
+ * [Proof of Address OCR Ruby](https://developers.mindee.com/docs/ruby-proof-of-address-ocr)
178
+ * [Receipt OCR Ruby](https://developers.mindee.com/docs/ruby-receipt-ocr)
179
+ * [Resume OCR Ruby](https://developers.mindee.com/docs/ruby-resume-ocr)
180
+ * [EU License Plate OCR Ruby](https://developers.mindee.com/docs/ruby-eu-license-plate-ocr)
181
+ * [EU Driver License OCR Ruby](https://developers.mindee.com/docs/ruby-eu-driver-license-ocr)
182
+ * [FR Bank Account Details OCR Ruby](https://developers.mindee.com/docs/ruby-fr-bank-account-details-ocr)
183
+ * [FR Bank Statement OCR Ruby](https://developers.mindee.com/docs/ruby-fr-bank-statement-ocr)
184
+ * [FR Carte Vitale OCR Ruby](https://developers.mindee.com/docs/ruby-fr-carte-vitale-ocr)
185
+ * [FR ID Card OCR Ruby](https://developers.mindee.com/docs/ruby-fr-carte-nationale-didentite-ocr)
186
+ * [US Bank Check OCR Ruby](https://developers.mindee.com/docs/ruby-us-bank-check-ocr)
187
+ * [US Driver License OCR Ruby](https://developers.mindee.com/docs/ruby-us-driver-license-ocr)
188
+ * [US W9 API Ruby](https://developers.mindee.com/docs/ruby-us-w9-ocr)
189
+ * [Barcode Reader API Ruby](https://developers.mindee.com/docs/ruby-barcode-reader-ocr)
190
+ * [Cropper API Ruby](https://developers.mindee.com/docs/ruby-cropper-ocr)
191
+ * [Invoice Splitter API Ruby](https://developers.mindee.com/docs/ruby-invoice-splitter-ocr)
192
+ * [Multi Receipts Detector API Ruby](https://developers.mindee.com/docs/ruby-multi-receipts-detector-ocr)
193
193
 
194
194
  You can also take a look at the
195
195
  [Reference Documentation](https://mindee.github.io/mindee-api-ruby/).
data/Rakefile CHANGED
@@ -20,6 +20,11 @@ YARD::Rake::YardocTask.new(:doc) do |task|
20
20
  task.files = ['lib/**/*.rb']
21
21
  end
22
22
 
23
+ desc 'Run integration tests'
24
+ RSpec::Core::RakeTask.new(:integration) do |t|
25
+ t.pattern = 'spec/**/*_integration.rb'
26
+ end
27
+
23
28
  Rake::Task[:doc].enhance do
24
29
  FileUtils.cp_r(
25
30
  File.join('docs', 'code_samples'),
data/bin/mindee.rb CHANGED
@@ -35,7 +35,7 @@ DOCUMENTS = {
35
35
  description: 'Financial Document',
36
36
  doc_class: Mindee::Product::FinancialDocument::FinancialDocumentV1,
37
37
  sync: true,
38
- async: false,
38
+ async: true,
39
39
  },
40
40
  "invoice" => {
41
41
  description: 'Invoice',
@@ -115,6 +115,12 @@ DOCUMENTS = {
115
115
  sync: true,
116
116
  async: false,
117
117
  },
118
+ "us-heathcare-card" => {
119
+ description: "US Healthcare Card",
120
+ doc_class: Mindee::Product::US::HealthcareCard::HealthcareCardV1,
121
+ sync: false,
122
+ async: true
123
+ },
118
124
  "us-w9" => {
119
125
  description: "US W9 Form",
120
126
  doc_class: Mindee::Product::US::W9::W9V1,
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: FR Bank Account Details OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-fr-bank-account-details-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Bank Account Details API](https://platform.mindee.com/mindee/bank_account_details).
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):**
@@ -80,7 +84,7 @@ A typical `Field` object will have the following attributes:
80
84
  * **confidence** (Float, nil): the confidence score of the field prediction.
81
85
  * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
82
86
  * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
83
- * **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
87
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
84
88
  * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
85
89
 
86
90
 
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: US Bank Check OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-us-bank-check-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Bank Check API](https://platform.mindee.com/mindee/bank_check).
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):**
@@ -80,7 +84,7 @@ A typical `Field` object will have the following attributes:
80
84
  * **confidence** (Float, nil): the confidence score of the field prediction.
81
85
  * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
82
86
  * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
83
- * **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
87
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
84
88
  * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
85
89
 
86
90
 
@@ -106,7 +110,7 @@ The position field `PositionField` does not implement all the basic `Field` attr
106
110
  The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
107
111
 
108
112
  ## Page-Level Fields
109
- Some fields are constrained to the page level, and so will not be retrievable to through the document.
113
+ Some fields are constrained to the page level, and so will not be retrievable at document level.
110
114
 
111
115
  # Attributes
112
116
  The following fields are extracted for Bank Check V1:
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: FR Bank Statement (FR) OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-fr-bank-statement-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Bank Statement (FR) API](https://platform.mindee.com/mindee/bank_statement_fr).
5
8
 
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: Barcode Reader OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-barcode-reader-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Barcode Reader API](https://platform.mindee.com/mindee/barcode_reader).
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):**
@@ -70,7 +74,7 @@ A typical `Field` object will have the following attributes:
70
74
  * **confidence** (Float, nil): the confidence score of the field prediction.
71
75
  * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
72
76
  * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
73
- * **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
77
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
74
78
  * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
75
79
 
76
80
 
@@ -0,0 +1,202 @@
1
+ ---
2
+ title: Bill of Lading OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-bill-of-lading-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
6
+ ---
7
+ The Ruby OCR SDK supports the [Bill of Lading API](https://platform.mindee.com/mindee/bill_of_lading).
8
+
9
+ The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/bill_of_lading/default_sample.jpg) can be used for testing purposes.
10
+ ![Bill of Lading sample](https://github.com/mindee/client-lib-test-data/blob/main/products/bill_of_lading/default_sample.jpg?raw=true)
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::BillOfLading::BillOfLadingV1
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
+ ### Date Field
54
+ Aside from the basic `Field` attributes, the date field `DateField` also implements the following:
55
+
56
+ * **date_object** (`Date`): an accessible representation of the value as a JavaScript object.
57
+
58
+ ### String Field
59
+ The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
60
+
61
+ ## Specific Fields
62
+ Fields which are specific to this product; they are not used in any other product.
63
+
64
+ ### Carrier Field
65
+ The shipping company responsible for transporting the goods.
66
+
67
+ A `BillOfLadingV1Carrier` implements the following attributes:
68
+
69
+ * `name` (String): The name of the carrier.
70
+ * `professional_number` (String): The professional number of the carrier.
71
+ * `scac` (String): The Standard Carrier Alpha Code (SCAC) of the carrier.
72
+ Fields which are specific to this product; they are not used in any other product.
73
+
74
+ ### Consignee Field
75
+ The party to whom the goods are being shipped.
76
+
77
+ A `BillOfLadingV1Consignee` implements the following attributes:
78
+
79
+ * `address` (String): The address of the consignee.
80
+ * `email` (String): The email of the shipper.
81
+ * `name` (String): The name of the consignee.
82
+ * `phone` (String): The phone number of the consignee.
83
+ Fields which are specific to this product; they are not used in any other product.
84
+
85
+ ### Items Field
86
+ The goods being shipped.
87
+
88
+ A `BillOfLadingV1CarrierItem` implements the following attributes:
89
+
90
+ * `description` (String): A description of the item.
91
+ * `gross_weight` (Float): The gross weight of the item.
92
+ * `measurement` (Float): The measurement of the item.
93
+ * `measurement_unit` (String): The unit of measurement for the measurement.
94
+ * `quantity` (Float): The quantity of the item being shipped.
95
+ * `weight_unit` (String): The unit of measurement for weights.
96
+ Fields which are specific to this product; they are not used in any other product.
97
+
98
+ ### Notify Party Field
99
+ The party to be notified of the arrival of the goods.
100
+
101
+ A `BillOfLadingV1NotifyParty` implements the following attributes:
102
+
103
+ * `address` (String): The address of the notify party.
104
+ * `email` (String): The email of the shipper.
105
+ * `name` (String): The name of the notify party.
106
+ * `phone` (String): The phone number of the notify party.
107
+ Fields which are specific to this product; they are not used in any other product.
108
+
109
+ ### Shipper Field
110
+ The party responsible for shipping the goods.
111
+
112
+ A `BillOfLadingV1Shipper` implements the following attributes:
113
+
114
+ * `address` (String): The address of the shipper.
115
+ * `email` (String): The email of the shipper.
116
+ * `name` (String): The name of the shipper.
117
+ * `phone` (String): The phone number of the shipper.
118
+
119
+ # Attributes
120
+ The following fields are extracted for Bill of Lading V1:
121
+
122
+ ## Bill of Lading Number
123
+ **bill_of_lading_number** ([StringField](#string-field)): A unique identifier assigned to a Bill of Lading document.
124
+
125
+ ```rb
126
+ puts result.document.inference.prediction.bill_of_lading_number.value
127
+ ```
128
+
129
+ ## Carrier
130
+ **carrier** ([BillOfLadingV1Carrier](#carrier-field)): The shipping company responsible for transporting the goods.
131
+
132
+ ```rb
133
+ puts result.document.inference.prediction.carrier.value
134
+ ```
135
+
136
+ ## Items
137
+ **carrier_items** (Array<[BillOfLadingV1CarrierItem](#items-field)>): The goods being shipped.
138
+
139
+ ```rb
140
+ for carrier_items_elem in result.document.inference.prediction.carrier_items do
141
+ puts carrier_items_elem.value
142
+ end
143
+ ```
144
+
145
+ ## Consignee
146
+ **consignee** ([BillOfLadingV1Consignee](#consignee-field)): The party to whom the goods are being shipped.
147
+
148
+ ```rb
149
+ puts result.document.inference.prediction.consignee.value
150
+ ```
151
+
152
+ ## Date of issue
153
+ **date_of_issue** ([DateField](#date-field)): The date when the bill of lading is issued.
154
+
155
+ ```rb
156
+ puts result.document.inference.prediction.date_of_issue.value
157
+ ```
158
+
159
+ ## Departure Date
160
+ **departure_date** ([DateField](#date-field)): The date when the vessel departs from the port of loading.
161
+
162
+ ```rb
163
+ puts result.document.inference.prediction.departure_date.value
164
+ ```
165
+
166
+ ## Notify Party
167
+ **notify_party** ([BillOfLadingV1NotifyParty](#notify-party-field)): The party to be notified of the arrival of the goods.
168
+
169
+ ```rb
170
+ puts result.document.inference.prediction.notify_party.value
171
+ ```
172
+
173
+ ## Place of Delivery
174
+ **place_of_delivery** ([StringField](#string-field)): The place where the goods are to be delivered.
175
+
176
+ ```rb
177
+ puts result.document.inference.prediction.place_of_delivery.value
178
+ ```
179
+
180
+ ## Port of Discharge
181
+ **port_of_discharge** ([StringField](#string-field)): The port where the goods are unloaded from the vessel.
182
+
183
+ ```rb
184
+ puts result.document.inference.prediction.port_of_discharge.value
185
+ ```
186
+
187
+ ## Port of Loading
188
+ **port_of_loading** ([StringField](#string-field)): The port where the goods are loaded onto the vessel.
189
+
190
+ ```rb
191
+ puts result.document.inference.prediction.port_of_loading.value
192
+ ```
193
+
194
+ ## Shipper
195
+ **shipper** ([BillOfLadingV1Shipper](#shipper-field)): The party responsible for shipping the goods.
196
+
197
+ ```rb
198
+ puts result.document.inference.prediction.shipper.value
199
+ ```
200
+
201
+ # Questions?
202
+ [Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: FR Carte Grise OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-fr-carte-grise-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Carte Grise API](https://platform.mindee.com/mindee/carte_grise).
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):**
@@ -146,7 +150,7 @@ A typical `Field` object will have the following attributes:
146
150
  * **confidence** (Float, nil): the confidence score of the field prediction.
147
151
  * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
148
152
  * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
149
- * **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
153
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
150
154
  * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
151
155
 
152
156
 
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: FR Carte Vitale OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-fr-carte-vitale-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
3
6
  ---
4
7
  The Ruby OCR SDK supports the [Carte Vitale API](https://platform.mindee.com/mindee/carte_vitale).
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):**
@@ -72,7 +76,7 @@ A typical `Field` object will have the following attributes:
72
76
  * **confidence** (Float, nil): the confidence score of the field prediction.
73
77
  * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
74
78
  * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
75
- * **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
79
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
76
80
  * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
77
81
 
78
82
 
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::BillOfLading::BillOfLadingV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::FR::EnergyBill::EnergyBillV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::FinancialDocument::FinancialDocumentV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::Invoice::InvoiceV4
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::NutritionFactsLabel::NutritionFactsLabelV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::FR::Payslip::PayslipV2
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::US::HealthcareCard::HealthcareCardV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction