mindee 3.16.0 → 3.18.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 +16 -0
- data/README.md +4 -4
- data/bin/mindee.rb +20 -8
- data/docs/code_samples/{international_id_v1_async.txt → driver_license_v1_async.txt} +1 -1
- data/docs/code_samples/french_healthcard_v1_async.txt +19 -0
- data/docs/code_samples/{carte_vitale_v1.txt → payslip_fra_v3_async.txt} +2 -2
- data/docs/code_samples/workflow_execution.txt +29 -0
- data/docs/custom_v1.md +1 -1
- data/docs/driver_license_v1.md +156 -0
- data/docs/{carte_vitale_v1.md → french_healthcard_v1.md} +14 -24
- data/docs/getting_started.md +5 -5
- data/docs/payslip_fra_v3.md +319 -0
- data/lib/mindee/client.rb +40 -0
- data/lib/mindee/extraction/tax_extractor/tax_extractor.rb +34 -19
- data/lib/mindee/http/workflow_endpoint.rb +90 -0
- data/lib/mindee/http.rb +1 -0
- data/lib/mindee/input/sources/base64_input_source.rb +31 -0
- data/lib/mindee/input/sources/bytes_input_source.rb +21 -0
- data/lib/mindee/input/sources/file_input_source.rb +20 -0
- data/lib/mindee/input/sources/local_input_source.rb +183 -0
- data/lib/mindee/input/sources/path_input_source.rb +20 -0
- data/lib/mindee/input/sources/url_input_source.rb +127 -0
- data/lib/mindee/input/sources.rb +6 -248
- data/lib/mindee/parsing/common/api_response.rb +22 -1
- data/lib/mindee/parsing/common/execution.rb +73 -0
- data/lib/mindee/parsing/common/execution_file.rb +24 -0
- data/lib/mindee/parsing/common/execution_priority.rb +30 -0
- data/lib/mindee/parsing/common.rb +3 -0
- data/lib/mindee/product/{international_id/international_id_v1.rb → driver_license/driver_license_v1.rb} +9 -9
- data/lib/mindee/product/driver_license/driver_license_v1_document.rb +91 -0
- data/lib/mindee/product/{international_id/international_id_v1_page.rb → driver_license/driver_license_v1_page.rb} +7 -7
- data/lib/mindee/product/fr/{carte_vitale/carte_vitale_v1.rb → health_card/health_card_v1.rb} +9 -9
- data/lib/mindee/product/fr/{carte_vitale/carte_vitale_v1_document.rb → health_card/health_card_v1_document.rb} +6 -6
- data/lib/mindee/product/fr/{carte_vitale/carte_vitale_v1_page.rb → health_card/health_card_v1_page.rb} +7 -7
- data/lib/mindee/product/fr/payslip/payslip_v3.rb +41 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rb +54 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_document.rb +166 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employee.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employer.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employment.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_page.rb +34 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_off.rb +89 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_pay_detail.rb +100 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_pay_period.rb +66 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_salary_detail.rb +89 -0
- data/lib/mindee/product/resume/resume_v1_document.rb +1 -1
- data/lib/mindee/product/resume/resume_v1_page.rb +1 -1
- data/lib/mindee/product.rb +3 -2
- data/lib/mindee/version.rb +1 -1
- metadata +36 -14
- data/docs/eu_driver_license_v1.md +0 -227
- data/docs/proof_of_address_v1.md +0 -211
- data/docs/us_driver_license_v1.md +0 -272
- data/lib/mindee/product/international_id/international_id_v1_document.rb +0 -109
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d2f2fd3fa8b6ca9d7756f08d3f7b526b510866d0c75a33ccfab1ff20b3ba2c6
|
4
|
+
data.tar.gz: 7f09aa2efbe008271aa229515ce7f804680ea46d7318c6fe62d57889785762bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bfa14969fc8938ca888b4c44a4861c969f816e5611bdf0150cec25677c3a6bb4cbd34d8e8b5a8ff48d2483fe8ed1ae462358a67bcd40176b3184122c65b5e76
|
7
|
+
data.tar.gz: 5afeb6406e28ea57c2a56d7f5e52f90739cb7be1b77648773d3365d52adf72f8ea6b97be16838aa428a32ce5cbc414acabe9b0d61196fc05a2027231062598f9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Mindee Ruby API Library Changelog
|
2
2
|
|
3
|
+
## v3.18.0 - 2024-12-13
|
4
|
+
### Changes
|
5
|
+
* :sparkles: allow local downloading of remote sources
|
6
|
+
* :coffin: remove support for (FR) Carte Vitale V1 in favor of French Health Card V1
|
7
|
+
### Fixes
|
8
|
+
* :bug: fix tax-extraction script
|
9
|
+
|
10
|
+
|
11
|
+
## v3.17.0 - 2024-11-28
|
12
|
+
### Changes
|
13
|
+
* :sparkles: add support for workflows
|
14
|
+
* :sparkles: add support for French Health Card V1
|
15
|
+
* :sparkles: add support for Driver License V1
|
16
|
+
* :sparkles: add support for Payslip FR V3
|
17
|
+
* :coffin: remove support for international ID V1
|
18
|
+
|
3
19
|
## v3.16.0 - 2024-11-14
|
4
20
|
### Changes
|
5
21
|
* :sparkles: add support for business cards V1
|
data/README.md
CHANGED
@@ -116,7 +116,7 @@ result = mindee_client.parse(
|
|
116
116
|
puts result.document
|
117
117
|
```
|
118
118
|
|
119
|
-
### Custom
|
119
|
+
### Custom Documents (docTI & Custom APIs)
|
120
120
|
|
121
121
|
```ruby
|
122
122
|
require 'mindee'
|
@@ -131,9 +131,9 @@ endpoint = mindee_client.create_endpoint(
|
|
131
131
|
# Load a file from disk
|
132
132
|
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
133
133
|
|
134
|
-
result = mindee_client.
|
134
|
+
result = mindee_client.enqueue_and_parse(
|
135
135
|
input_source,
|
136
|
-
Mindee::Product::
|
136
|
+
Mindee::Product::Generated::GeneratedV1,
|
137
137
|
endpoint: endpoint
|
138
138
|
)
|
139
139
|
|
@@ -181,7 +181,7 @@ customize the experience.
|
|
181
181
|
* [EU Driver License OCR Ruby](https://developers.mindee.com/docs/ruby-eu-driver-license-ocr)
|
182
182
|
* [FR Bank Account Details OCR Ruby](https://developers.mindee.com/docs/ruby-fr-bank-account-details-ocr)
|
183
183
|
* [FR Bank Statement OCR Ruby](https://developers.mindee.com/docs/ruby-fr-bank-statement-ocr)
|
184
|
-
* [FR
|
184
|
+
* [FR Health Card OCR Ruby](https://developers.mindee.com/docs/ruby-fr-health-card-ocr)
|
185
185
|
* [FR ID Card OCR Ruby](https://developers.mindee.com/docs/ruby-fr-carte-nationale-didentite-ocr)
|
186
186
|
* [US Bank Check OCR Ruby](https://developers.mindee.com/docs/ruby-us-bank-check-ocr)
|
187
187
|
* [US Driver License OCR Ruby](https://developers.mindee.com/docs/ruby-us-driver-license-ocr)
|
data/bin/mindee.rb
CHANGED
@@ -41,7 +41,7 @@ DOCUMENTS = {
|
|
41
41
|
description: 'Invoice',
|
42
42
|
doc_class: Mindee::Product::Invoice::InvoiceV4,
|
43
43
|
sync: true,
|
44
|
-
async:
|
44
|
+
async: true,
|
45
45
|
},
|
46
46
|
"international-id" => {
|
47
47
|
description: 'International Id',
|
@@ -53,7 +53,13 @@ DOCUMENTS = {
|
|
53
53
|
description: "Expense Receipt",
|
54
54
|
doc_class: Mindee::Product::Receipt::ReceiptV5,
|
55
55
|
sync: true,
|
56
|
-
async:
|
56
|
+
async: true,
|
57
|
+
},
|
58
|
+
"driver-license" => {
|
59
|
+
description: "Driver License",
|
60
|
+
doc_class: Mindee::Product::DriverLicense::DriverLicenseV1,
|
61
|
+
sync: false,
|
62
|
+
async: true,
|
57
63
|
},
|
58
64
|
"resume" => {
|
59
65
|
description: "Resume",
|
@@ -91,18 +97,24 @@ DOCUMENTS = {
|
|
91
97
|
sync: false,
|
92
98
|
async: true,
|
93
99
|
},
|
94
|
-
"fr-carte-vitale" => {
|
95
|
-
description: "FR Carte Vitale",
|
96
|
-
doc_class: Mindee::Product::FR::CarteVitale::CarteVitaleV1,
|
97
|
-
sync: true,
|
98
|
-
async: false,
|
99
|
-
},
|
100
100
|
"fr-id-card" => {
|
101
101
|
description: "FR ID Card",
|
102
102
|
doc_class: Mindee::Product::FR::IdCard::IdCardV2,
|
103
103
|
sync: true,
|
104
104
|
async: false,
|
105
105
|
},
|
106
|
+
"fr-health-card" => {
|
107
|
+
description: "FR Health Card",
|
108
|
+
doc_class: Mindee::Product::FR::HealthCard::HealthCardV1,
|
109
|
+
sync: false,
|
110
|
+
async: true,
|
111
|
+
},
|
112
|
+
"fr-payslip" => {
|
113
|
+
description: "FR Payslip",
|
114
|
+
doc_class: Mindee::Product::FR::Payslip::PayslipV3,
|
115
|
+
sync: false,
|
116
|
+
async: true,
|
117
|
+
},
|
106
118
|
"us-bank-check" => {
|
107
119
|
description: "US Bank Check",
|
108
120
|
doc_class: Mindee::Product::US::BankCheck::BankCheckV1,
|
@@ -9,7 +9,7 @@ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
|
9
9
|
# Parse the file
|
10
10
|
result = mindee_client.enqueue_and_parse(
|
11
11
|
input_source,
|
12
|
-
Mindee::Product::
|
12
|
+
Mindee::Product::DriverLicense::DriverLicenseV1
|
13
13
|
)
|
14
14
|
|
15
15
|
# Print a full summary of the parsed data in RST format
|
@@ -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::HealthCard::HealthCardV1
|
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
|
@@ -7,9 +7,9 @@ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
|
7
7
|
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
8
8
|
|
9
9
|
# Parse the file
|
10
|
-
result = mindee_client.
|
10
|
+
result = mindee_client.enqueue_and_parse(
|
11
11
|
input_source,
|
12
|
-
Mindee::Product::FR::
|
12
|
+
Mindee::Product::FR::Payslip::PayslipV3
|
13
13
|
)
|
14
14
|
|
15
15
|
# Print a full summary of the parsed data in RST format
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'mindee'
|
2
|
+
|
3
|
+
workflow_id = 'workflow-id'
|
4
|
+
|
5
|
+
# Init a new client
|
6
|
+
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
7
|
+
|
8
|
+
# Load a file from disk
|
9
|
+
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
10
|
+
|
11
|
+
# Send the file to the workflow
|
12
|
+
result = mindee_client.execute_workflow(
|
13
|
+
input_source,
|
14
|
+
workflow_id
|
15
|
+
)
|
16
|
+
|
17
|
+
# Alternatively, set an alias & a priority for the execution.
|
18
|
+
# result = mindee_client.execute_workflow(
|
19
|
+
# input_source,
|
20
|
+
# workflow_id,
|
21
|
+
# document_alias: "my-alias",
|
22
|
+
# priority: Mindee::Parsing::Common::ExecutionPriority::LOW
|
23
|
+
# )
|
24
|
+
|
25
|
+
# Print the execution's ID to make sure it worked
|
26
|
+
puts result.execution.id
|
27
|
+
|
28
|
+
# Print the inference, if present
|
29
|
+
# puts result.document.inference
|
data/docs/custom_v1.md
CHANGED
@@ -4,7 +4,7 @@ category: 622b805aaec68102ea7fcbc2
|
|
4
4
|
slug: ruby-api-builder-ocr
|
5
5
|
parentDoc: 6294d97ee723f1008d2ab28e
|
6
6
|
---
|
7
|
-
> 🚧 This product is still supported, but is considered to be deprecated. If you are looking for the
|
7
|
+
> 🚧 This product is still supported, but is considered to be deprecated. If you are looking for the docTI API documentation, you can find it [here](https://developers.mindee.com/docs/ruby-generated-ocr).
|
8
8
|
|
9
9
|
# Quick-Start
|
10
10
|
|
@@ -0,0 +1,156 @@
|
|
1
|
+
---
|
2
|
+
title: Driver License OCR Ruby
|
3
|
+
category: 622b805aaec68102ea7fcbc2
|
4
|
+
slug: ruby-driver-license-ocr
|
5
|
+
parentDoc: 6294d97ee723f1008d2ab28e
|
6
|
+
---
|
7
|
+
The Ruby OCR SDK supports the [Driver License API](https://platform.mindee.com/mindee/driver_license).
|
8
|
+
|
9
|
+
The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/driver_license/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::DriverLicense::DriverLicenseV1
|
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
|
+
# Attributes
|
62
|
+
The following fields are extracted for Driver License V1:
|
63
|
+
|
64
|
+
## Category
|
65
|
+
**category** ([StringField](#string-field)): The category or class of the driver license.
|
66
|
+
|
67
|
+
```rb
|
68
|
+
puts result.document.inference.prediction.category.value
|
69
|
+
```
|
70
|
+
|
71
|
+
## Country Code
|
72
|
+
**country_code** ([StringField](#string-field)): The alpha-3 ISO 3166 code of the country where the driver license was issued.
|
73
|
+
|
74
|
+
```rb
|
75
|
+
puts result.document.inference.prediction.country_code.value
|
76
|
+
```
|
77
|
+
|
78
|
+
## Date of Birth
|
79
|
+
**date_of_birth** ([DateField](#date-field)): The date of birth of the driver license holder.
|
80
|
+
|
81
|
+
```rb
|
82
|
+
puts result.document.inference.prediction.date_of_birth.value
|
83
|
+
```
|
84
|
+
|
85
|
+
## DD Number
|
86
|
+
**dd_number** ([StringField](#string-field)): The DD number of the driver license.
|
87
|
+
|
88
|
+
```rb
|
89
|
+
puts result.document.inference.prediction.dd_number.value
|
90
|
+
```
|
91
|
+
|
92
|
+
## Expiry Date
|
93
|
+
**expiry_date** ([DateField](#date-field)): The expiry date of the driver license.
|
94
|
+
|
95
|
+
```rb
|
96
|
+
puts result.document.inference.prediction.expiry_date.value
|
97
|
+
```
|
98
|
+
|
99
|
+
## First Name
|
100
|
+
**first_name** ([StringField](#string-field)): The first name of the driver license holder.
|
101
|
+
|
102
|
+
```rb
|
103
|
+
puts result.document.inference.prediction.first_name.value
|
104
|
+
```
|
105
|
+
|
106
|
+
## ID
|
107
|
+
**id** ([StringField](#string-field)): The unique identifier of the driver license.
|
108
|
+
|
109
|
+
```rb
|
110
|
+
puts result.document.inference.prediction.id.value
|
111
|
+
```
|
112
|
+
|
113
|
+
## Issued Date
|
114
|
+
**issued_date** ([DateField](#date-field)): The date when the driver license was issued.
|
115
|
+
|
116
|
+
```rb
|
117
|
+
puts result.document.inference.prediction.issued_date.value
|
118
|
+
```
|
119
|
+
|
120
|
+
## Issuing Authority
|
121
|
+
**issuing_authority** ([StringField](#string-field)): The authority that issued the driver license.
|
122
|
+
|
123
|
+
```rb
|
124
|
+
puts result.document.inference.prediction.issuing_authority.value
|
125
|
+
```
|
126
|
+
|
127
|
+
## Last Name
|
128
|
+
**last_name** ([StringField](#string-field)): The last name of the driver license holder.
|
129
|
+
|
130
|
+
```rb
|
131
|
+
puts result.document.inference.prediction.last_name.value
|
132
|
+
```
|
133
|
+
|
134
|
+
## MRZ
|
135
|
+
**mrz** ([StringField](#string-field)): The Machine Readable Zone (MRZ) of the driver license.
|
136
|
+
|
137
|
+
```rb
|
138
|
+
puts result.document.inference.prediction.mrz.value
|
139
|
+
```
|
140
|
+
|
141
|
+
## Place of Birth
|
142
|
+
**place_of_birth** ([StringField](#string-field)): The place of birth of the driver license holder.
|
143
|
+
|
144
|
+
```rb
|
145
|
+
puts result.document.inference.prediction.place_of_birth.value
|
146
|
+
```
|
147
|
+
|
148
|
+
## State
|
149
|
+
**state** ([StringField](#string-field)): Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
|
150
|
+
|
151
|
+
```rb
|
152
|
+
puts result.document.inference.prediction.state.value
|
153
|
+
```
|
154
|
+
|
155
|
+
# Questions?
|
156
|
+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
---
|
2
|
-
title: FR
|
2
|
+
title: FR Health Card OCR Ruby
|
3
3
|
category: 622b805aaec68102ea7fcbc2
|
4
|
-
slug: ruby-fr-
|
4
|
+
slug: ruby-fr-health-card-ocr
|
5
5
|
parentDoc: 6294d97ee723f1008d2ab28e
|
6
6
|
---
|
7
|
-
The Ruby OCR SDK supports the [
|
7
|
+
The Ruby OCR SDK supports the [Health Card API](https://platform.mindee.com/mindee/french_healthcard).
|
8
8
|
|
9
|
-
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/
|
10
|
-
, we are going to illustrate how to extract the data that we want using the OCR SDK.
|
10
|
+

|
11
11
|
|
12
12
|
# Quick-Start
|
13
13
|
```rb
|
@@ -20,9 +20,9 @@ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
|
|
20
20
|
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
|
21
21
|
|
22
22
|
# Parse the file
|
23
|
-
result = mindee_client.
|
23
|
+
result = mindee_client.enqueue_and_parse(
|
24
24
|
input_source,
|
25
|
-
Mindee::Product::FR::
|
25
|
+
Mindee::Product::FR::HealthCard::HealthCardV1
|
26
26
|
)
|
27
27
|
|
28
28
|
# Print a full summary of the parsed data in RST format
|
@@ -38,29 +38,19 @@ puts result.document
|
|
38
38
|
########
|
39
39
|
Document
|
40
40
|
########
|
41
|
-
:Mindee ID:
|
41
|
+
:Mindee ID: 9ee2733d-933a-4dcd-a73a-a31395e3b288
|
42
42
|
:Filename: default_sample.jpg
|
43
43
|
|
44
44
|
Inference
|
45
45
|
#########
|
46
|
-
:Product: mindee/
|
46
|
+
:Product: mindee/french_healthcard v1.0
|
47
47
|
:Rotation applied: Yes
|
48
48
|
|
49
49
|
Prediction
|
50
50
|
==========
|
51
51
|
:Given Name(s): NATHALIE
|
52
52
|
:Surname: DURAND
|
53
|
-
:Social Security Number:
|
54
|
-
:Issuance Date: 2007-01-01
|
55
|
-
|
56
|
-
Page Predictions
|
57
|
-
================
|
58
|
-
|
59
|
-
Page 0
|
60
|
-
------
|
61
|
-
:Given Name(s): NATHALIE
|
62
|
-
:Surname: DURAND
|
63
|
-
:Social Security Number: 269054958815780
|
53
|
+
:Social Security Number: 2 69 05 49 588 157 80
|
64
54
|
:Issuance Date: 2007-01-01
|
65
55
|
```
|
66
56
|
|
@@ -91,10 +81,10 @@ Aside from the basic `Field` attributes, the date field `DateField` also impleme
|
|
91
81
|
The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
|
92
82
|
|
93
83
|
# Attributes
|
94
|
-
The following fields are extracted for
|
84
|
+
The following fields are extracted for Health Card V1:
|
95
85
|
|
96
86
|
## Given Name(s)
|
97
|
-
**given_names** (Array<[StringField](#string-field)>): The given
|
87
|
+
**given_names** (Array<[StringField](#string-field)>): The given names of the card holder.
|
98
88
|
|
99
89
|
```rb
|
100
90
|
for given_names_elem in result.document.inference.prediction.given_names do
|
@@ -103,14 +93,14 @@ end
|
|
103
93
|
```
|
104
94
|
|
105
95
|
## Issuance Date
|
106
|
-
**issuance_date** ([DateField](#date-field)): The date the
|
96
|
+
**issuance_date** ([DateField](#date-field)): The date when the carte vitale document was issued.
|
107
97
|
|
108
98
|
```rb
|
109
99
|
puts result.document.inference.prediction.issuance_date.value
|
110
100
|
```
|
111
101
|
|
112
102
|
## Social Security Number
|
113
|
-
**social_security** ([StringField](#string-field)): The
|
103
|
+
**social_security** ([StringField](#string-field)): The social security number of the card holder.
|
114
104
|
|
115
105
|
```rb
|
116
106
|
puts result.document.inference.prediction.social_security.value
|
data/docs/getting_started.md
CHANGED
@@ -226,20 +226,20 @@ result = mindee_client.parse(
|
|
226
226
|
)
|
227
227
|
```
|
228
228
|
|
229
|
-
### Custom Documents
|
229
|
+
### Custom Documents (docTI)
|
230
230
|
For custom documents, the endpoint to use must also be set, and it must take in an `endpoint_name`:
|
231
231
|
|
232
232
|
```ruby
|
233
|
-
endpoint = mindee_client.create_endpoint(endpoint_name: 'wnine')
|
233
|
+
endpoint = mindee_client.create_endpoint(endpoint_name: 'wnine', account_name: 'my-account')
|
234
234
|
|
235
|
-
result = mindee_client.
|
235
|
+
result = mindee_client.enqueue_and_parse(
|
236
236
|
input_source,
|
237
|
-
Mindee::Product::
|
237
|
+
Mindee::Product::Generated::GeneratedV1,
|
238
238
|
endpoint: endpoint
|
239
239
|
)
|
240
240
|
```
|
241
241
|
|
242
|
-
This is because the `
|
242
|
+
This is because the `GeneratedV1` class is enough to handle the return processing, but the actual endpoint needs to be specified.
|
243
243
|
|
244
244
|
## Process the Result
|
245
245
|
The response object is common to all documents, including custom documents. The main properties are:
|