mindee 3.5.0 → 3.6.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/CHANGELOG.md +5 -0
- data/README.md +2 -1
- data/bin/mindee.rb +6 -0
- data/docs/bank_account_details_v2.md +1 -1
- data/docs/bank_check_v1.md +1 -1
- data/docs/bank_statement_fr_v1.md +1 -1
- data/docs/barcode_reader_v1.md +1 -1
- data/docs/carte_grise_v1.md +1 -1
- data/docs/carte_vitale_v1.md +1 -1
- data/docs/code_samples/resume_v1_async.txt +19 -0
- data/docs/cropper_v1.md +1 -1
- data/docs/custom_v1.md +1 -1
- data/docs/eu_driver_license_v1.md +5 -5
- data/docs/expense_receipts_v5.md +1 -1
- data/docs/financial_document_v1.md +1 -1
- data/docs/generated_v1.md +1 -1
- data/docs/getting_started.md +1 -1
- data/docs/idcard_fr_v2.md +1 -1
- data/docs/international_id_v2.md +195 -0
- data/docs/invoice_splitter_v1.md +1 -1
- data/docs/invoices_v4.md +1 -1
- data/docs/license_plates_v1.md +1 -1
- data/docs/multi_receipts_detector_v1.md +1 -1
- data/docs/passport_v1.md +1 -1
- data/docs/proof_of_address_v1.md +1 -1
- data/docs/resume_v1.md +334 -0
- data/docs/us_driver_license_v1.md +1 -1
- data/docs/us_w9_v1.md +1 -1
- data/lib/mindee/parsing/standard/base_field.rb +1 -1
- data/lib/mindee/product/.rubocop.yml +7 -2
- data/lib/mindee/product/eu/driver_license/driver_license_v1.rb +2 -2
- data/lib/mindee/product/eu/driver_license/driver_license_v1_document.rb +1 -1
- data/lib/mindee/product/eu/driver_license/driver_license_v1_page.rb +2 -2
- data/lib/mindee/product/fr/carte_grise/carte_grise_v1_document.rb +0 -2
- data/lib/mindee/product/resume/resume_v1.rb +39 -0
- data/lib/mindee/product/resume/resume_v1_certificate.rb +69 -0
- data/lib/mindee/product/resume/resume_v1_document.rb +322 -0
- data/lib/mindee/product/resume/resume_v1_education.rb +90 -0
- data/lib/mindee/product/resume/resume_v1_language.rb +55 -0
- data/lib/mindee/product/resume/resume_v1_page.rb +32 -0
- data/lib/mindee/product/resume/resume_v1_professional_experience.rb +97 -0
- data/lib/mindee/product/resume/resume_v1_social_networks_url.rb +55 -0
- data/lib/mindee/product.rb +1 -0
- data/lib/mindee/version.rb +1 -1
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28d1e6c48c575030a3c6519080f7cff23b52745c212d8db9cc43f8c800c1c3d8
|
4
|
+
data.tar.gz: a96015beeeac1378f72f77bd3bcb73c3032e0946e39cc7a4519b5db3eca3e8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ca08ce6349eb1ebeaf7cf2bbba6004ff638cfc0db480d7b41bf183f6f6a4066bd1a76a36edbf4282eb65f31c89487cad388cc1f2ea6bfa2bb6bed7ff6c6e517
|
7
|
+
data.tar.gz: e18f1c1f8190c73987b036745fba0e6dca91b98ee71bc6144d8f1612be4c497cbb5f0301951b91db494c4812ca07ef6ec86fdeee17bdb3e83aacaef481b2fb3f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -142,6 +142,7 @@ customize the experience.
|
|
142
142
|
* [Passport OCR Ruby](https://developers.mindee.com/docs/passport-ocr-ruby)
|
143
143
|
* [Proof of Address OCR Ruby](https://developers.mindee.com/docs/proof-of-address-ocr-ruby)
|
144
144
|
* [Receipt OCR Ruby](https://developers.mindee.com/docs/receipt-ocr-ruby)
|
145
|
+
* [Resume OCR Ruby](https://developers.mindee.com/docs/resume-ocr-ruby)
|
145
146
|
* [EU License Plate OCR Ruby](https://developers.mindee.com/docs/eu-license-plate-ocr-ruby)
|
146
147
|
* [EU Driver License OCR Ruby](https://developers.mindee.com/docs/eu-driver-license-ocr-ruby)
|
147
148
|
* [FR Bank Account Details OCR Ruby](https://developers.mindee.com/docs/fr-bank-account-details-ocr-ruby)
|
@@ -167,4 +168,4 @@ Copyright © Mindee, SA
|
|
167
168
|
Available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
168
169
|
|
169
170
|
## Questions?
|
170
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
171
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/bin/mindee.rb
CHANGED
@@ -55,6 +55,12 @@ DOCUMENTS = {
|
|
55
55
|
sync: true,
|
56
56
|
async: false,
|
57
57
|
},
|
58
|
+
"resume" => {
|
59
|
+
description: "Resume",
|
60
|
+
doc_class: Mindee::Product::Resume::ResumeV1,
|
61
|
+
sync: false,
|
62
|
+
async: true,
|
63
|
+
},
|
58
64
|
"passport" => {
|
59
65
|
description: "Passport",
|
60
66
|
doc_class: Mindee::Product::Passport::PassportV1,
|
@@ -134,4 +134,4 @@ puts result.document.inference.prediction.swift_code.value
|
|
134
134
|
```
|
135
135
|
|
136
136
|
# Questions?
|
137
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
137
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/bank_check_v1.md
CHANGED
data/docs/barcode_reader_v1.md
CHANGED
data/docs/carte_grise_v1.md
CHANGED
@@ -451,4 +451,4 @@ puts result.document.inference.prediction.y6.value
|
|
451
451
|
```
|
452
452
|
|
453
453
|
# Questions?
|
454
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
454
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/carte_vitale_v1.md
CHANGED
@@ -120,4 +120,4 @@ puts result.document.inference.prediction.surname.value
|
|
120
120
|
```
|
121
121
|
|
122
122
|
# Questions?
|
123
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
123
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -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::Resume::ResumeV1
|
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
|
data/docs/cropper_v1.md
CHANGED
data/docs/custom_v1.md
CHANGED
@@ -106,4 +106,4 @@ console.log(result.document.inference.prediction.classifications["my-classificat
|
|
106
106
|
|
107
107
|
# Questions?
|
108
108
|
|
109
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
109
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
---
|
2
|
-
title: EU
|
2
|
+
title: EU Driver License OCR Ruby
|
3
3
|
---
|
4
|
-
The Ruby OCR SDK supports the [
|
4
|
+
The Ruby OCR SDK supports the [Driver License API](https://platform.mindee.com/mindee/eu_driver_license).
|
5
5
|
|
6
6
|
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/eu_driver_license/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
|
7
|
-

|
8
8
|
|
9
9
|
# Quick-Start
|
10
10
|
```rb
|
@@ -115,7 +115,7 @@ The text field `StringField` only has one constraint: it's **value** is a `Strin
|
|
115
115
|
Some fields are constrained to the page level, and so will not be retrievable to through the document.
|
116
116
|
|
117
117
|
# Attributes
|
118
|
-
The following fields are extracted for
|
118
|
+
The following fields are extracted for Driver License V1:
|
119
119
|
|
120
120
|
## Address
|
121
121
|
**address** ([StringField](#string-field)): EU driver license holders address
|
@@ -220,4 +220,4 @@ end
|
|
220
220
|
```
|
221
221
|
|
222
222
|
# Questions?
|
223
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
223
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/expense_receipts_v5.md
CHANGED
@@ -303,4 +303,4 @@ puts result.document.inference.prediction.total_tax.value
|
|
303
303
|
```
|
304
304
|
|
305
305
|
# Questions?
|
306
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
306
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -392,4 +392,4 @@ puts result.document.inference.prediction.total_tax.value
|
|
392
392
|
```
|
393
393
|
|
394
394
|
# Questions?
|
395
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
395
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/generated_v1.md
CHANGED
@@ -87,4 +87,4 @@ puts result.document.inference.prediction.fields["my-field"].to_s
|
|
87
87
|
|
88
88
|
# Questions?
|
89
89
|
|
90
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
90
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/getting_started.md
CHANGED
@@ -319,4 +319,4 @@ input_source = mindee_client.source_from_file(input_file, "name-of-my-file.ext",
|
|
319
319
|
Note: This only works for local files, files sent by URL will not be processed.
|
320
320
|
|
321
321
|
## Questions?
|
322
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
322
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/idcard_fr_v2.md
CHANGED
@@ -250,4 +250,4 @@ puts result.document.inference.prediction.surname.value
|
|
250
250
|
```
|
251
251
|
|
252
252
|
# Questions?
|
253
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
253
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -0,0 +1,195 @@
|
|
1
|
+
---
|
2
|
+
title: International ID OCR Ruby
|
3
|
+
---
|
4
|
+
The Ruby OCR SDK supports the [International ID API](https://platform.mindee.com/mindee/international_id).
|
5
|
+
|
6
|
+
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/international_id/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
|
7
|
+

|
8
|
+
|
9
|
+
# Quick-Start
|
10
|
+
```rb
|
11
|
+
require 'mindee'
|
12
|
+
|
13
|
+
# Init a new client
|
14
|
+
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
15
|
+
|
16
|
+
# Load a file from disk
|
17
|
+
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
18
|
+
|
19
|
+
# Parse the file
|
20
|
+
result = mindee_client.enqueue_and_parse(
|
21
|
+
input_source,
|
22
|
+
Mindee::Product::InternationalId::InternationalIdV2
|
23
|
+
)
|
24
|
+
|
25
|
+
# Print a full summary of the parsed data in RST format
|
26
|
+
puts result.document
|
27
|
+
|
28
|
+
# Print the document-level parsed data
|
29
|
+
# puts result.document.inference.prediction
|
30
|
+
```
|
31
|
+
|
32
|
+
**Output (RST):**
|
33
|
+
```rst
|
34
|
+
```
|
35
|
+
|
36
|
+
# Field Types
|
37
|
+
## Standard Fields
|
38
|
+
These fields are generic and used in several products.
|
39
|
+
|
40
|
+
### Basic Field
|
41
|
+
Each prediction object contains a set of fields that inherit from the generic `Field` class.
|
42
|
+
A typical `Field` object will have the following attributes:
|
43
|
+
|
44
|
+
* **value** (`String`, `Float`, `Integer`, `Boolean`): corresponds to the field value. Can be `nil` if no value was extracted.
|
45
|
+
* **confidence** (Float, nil): the confidence score of the field prediction.
|
46
|
+
* **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
|
47
|
+
* **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
|
48
|
+
* **page_id** (`Integer`, `nil`): the ID of the page, is `nil` when at document-level.
|
49
|
+
* **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
|
50
|
+
|
51
|
+
|
52
|
+
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.
|
53
|
+
|
54
|
+
|
55
|
+
### Classification Field
|
56
|
+
The classification field `ClassificationField` does not implement all the basic `Field` attributes. It only implements **value**, **confidence** and **page_id**.
|
57
|
+
|
58
|
+
> Note: a classification field's `value is always a `String`.
|
59
|
+
|
60
|
+
### Date Field
|
61
|
+
Aside from the basic `Field` attributes, the date field `DateField` also implements the following:
|
62
|
+
|
63
|
+
* **date_object** (`Date`): an accessible representation of the value as a JavaScript object.
|
64
|
+
|
65
|
+
### String Field
|
66
|
+
The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
|
67
|
+
|
68
|
+
# Attributes
|
69
|
+
The following fields are extracted for International ID V2:
|
70
|
+
|
71
|
+
## Address
|
72
|
+
**address** ([StringField](#string-field)): The physical address of the document holder.
|
73
|
+
|
74
|
+
```rb
|
75
|
+
puts result.document.inference.prediction.address.value
|
76
|
+
```
|
77
|
+
|
78
|
+
## Birth Date
|
79
|
+
**birth_date** ([DateField](#date-field)): The date of birth of the document holder.
|
80
|
+
|
81
|
+
```rb
|
82
|
+
puts result.document.inference.prediction.birth_date.value
|
83
|
+
```
|
84
|
+
|
85
|
+
## Birth Place
|
86
|
+
**birth_place** ([StringField](#string-field)): The place of birth of the document holder.
|
87
|
+
|
88
|
+
```rb
|
89
|
+
puts result.document.inference.prediction.birth_place.value
|
90
|
+
```
|
91
|
+
|
92
|
+
## Country of Issue
|
93
|
+
**country_of_issue** ([StringField](#string-field)): The country where the document was issued.
|
94
|
+
|
95
|
+
```rb
|
96
|
+
puts result.document.inference.prediction.country_of_issue.value
|
97
|
+
```
|
98
|
+
|
99
|
+
## Document Number
|
100
|
+
**document_number** ([StringField](#string-field)): The unique identifier assigned to the document.
|
101
|
+
|
102
|
+
```rb
|
103
|
+
puts result.document.inference.prediction.document_number.value
|
104
|
+
```
|
105
|
+
|
106
|
+
## Document Type
|
107
|
+
**document_type** ([ClassificationField](#classification-field)): The type of personal identification document.
|
108
|
+
|
109
|
+
```rb
|
110
|
+
puts result.document.inference.prediction.document_type.value
|
111
|
+
```
|
112
|
+
|
113
|
+
## Expiration Date
|
114
|
+
**expiry_date** ([DateField](#date-field)): The date when the document becomes invalid.
|
115
|
+
|
116
|
+
```rb
|
117
|
+
puts result.document.inference.prediction.expiry_date.value
|
118
|
+
```
|
119
|
+
|
120
|
+
## Given Names
|
121
|
+
**given_names** (Array<[StringField](#string-field)>): The list of the document holder's given names.
|
122
|
+
|
123
|
+
```rb
|
124
|
+
for given_names_elem in result.document.inference.prediction.given_names do
|
125
|
+
puts given_names_elem.value
|
126
|
+
end
|
127
|
+
```
|
128
|
+
|
129
|
+
## Issue Date
|
130
|
+
**issue_date** ([DateField](#date-field)): The date when the document was issued.
|
131
|
+
|
132
|
+
```rb
|
133
|
+
puts result.document.inference.prediction.issue_date.value
|
134
|
+
```
|
135
|
+
|
136
|
+
## MRZ Line 1
|
137
|
+
**mrz_line1** ([StringField](#string-field)): The Machine Readable Zone, first line.
|
138
|
+
|
139
|
+
```rb
|
140
|
+
puts result.document.inference.prediction.mrz_line1.value
|
141
|
+
```
|
142
|
+
|
143
|
+
## MRZ Line 2
|
144
|
+
**mrz_line2** ([StringField](#string-field)): The Machine Readable Zone, second line.
|
145
|
+
|
146
|
+
```rb
|
147
|
+
puts result.document.inference.prediction.mrz_line2.value
|
148
|
+
```
|
149
|
+
|
150
|
+
## MRZ Line 3
|
151
|
+
**mrz_line3** ([StringField](#string-field)): The Machine Readable Zone, third line.
|
152
|
+
|
153
|
+
```rb
|
154
|
+
puts result.document.inference.prediction.mrz_line3.value
|
155
|
+
```
|
156
|
+
|
157
|
+
## Nationality
|
158
|
+
**nationality** ([StringField](#string-field)): The country of citizenship of the document holder.
|
159
|
+
|
160
|
+
```rb
|
161
|
+
puts result.document.inference.prediction.nationality.value
|
162
|
+
```
|
163
|
+
|
164
|
+
## Personal Number
|
165
|
+
**personal_number** ([StringField](#string-field)): The unique identifier assigned to the document holder.
|
166
|
+
|
167
|
+
```rb
|
168
|
+
puts result.document.inference.prediction.personal_number.value
|
169
|
+
```
|
170
|
+
|
171
|
+
## Sex
|
172
|
+
**sex** ([StringField](#string-field)): The biological sex of the document holder.
|
173
|
+
|
174
|
+
```rb
|
175
|
+
puts result.document.inference.prediction.sex.value
|
176
|
+
```
|
177
|
+
|
178
|
+
## State of Issue
|
179
|
+
**state_of_issue** ([StringField](#string-field)): The state or territory where the document was issued.
|
180
|
+
|
181
|
+
```rb
|
182
|
+
puts result.document.inference.prediction.state_of_issue.value
|
183
|
+
```
|
184
|
+
|
185
|
+
## Surnames
|
186
|
+
**surnames** (Array<[StringField](#string-field)>): The list of the document holder's family names.
|
187
|
+
|
188
|
+
```rb
|
189
|
+
for surnames_elem in result.document.inference.prediction.surnames do
|
190
|
+
puts surnames_elem.value
|
191
|
+
end
|
192
|
+
```
|
193
|
+
|
194
|
+
# Questions?
|
195
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/invoice_splitter_v1.md
CHANGED
data/docs/invoices_v4.md
CHANGED
@@ -347,4 +347,4 @@ puts result.document.inference.prediction.total_tax.value
|
|
347
347
|
```
|
348
348
|
|
349
349
|
# Questions?
|
350
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
350
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/license_plates_v1.md
CHANGED
data/docs/passport_v1.md
CHANGED
@@ -183,4 +183,4 @@ puts result.document.inference.prediction.surname.value
|
|
183
183
|
```
|
184
184
|
|
185
185
|
# Questions?
|
186
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
186
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
data/docs/proof_of_address_v1.md
CHANGED
@@ -204,4 +204,4 @@ puts result.document.inference.prediction.recipient_name.value
|
|
204
204
|
```
|
205
205
|
|
206
206
|
# Questions?
|
207
|
-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-
|
207
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|