File tree Expand file tree Collapse file tree 6 files changed +20
-20
lines changed
mindee/product/eu/driver_license Expand file tree Collapse file tree 6 files changed +20
-20
lines changed Original file line number Diff line number Diff line change 11---
2- title : EU EU Driver License OCR Python
2+ title : EU Driver License OCR Python
33---
4- The Python OCR SDK supports the [ EU Driver License API] ( https://platform.mindee.com/mindee/eu_driver_license ) .
4+ The Python OCR SDK supports the [ Driver License API] ( https://platform.mindee.com/mindee/eu_driver_license ) .
55
66Using 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- ![ EU Driver License sample] ( https://github.com/mindee/client-lib-test-data/blob/main/products/eu_driver_license/default_sample.jpg?raw=true )
7+ ![ Driver License sample] ( https://github.com/mindee/client-lib-test-data/blob/main/products/eu_driver_license/default_sample.jpg?raw=true )
88
99# Quick-Start
1010``` py
@@ -115,7 +115,7 @@ The text field `StringField` only has one constraint: its **value** is an `Optio
115115Some fields are constrained to the page level, and so will not be retrievable to through the document.
116116
117117# Attributes
118- The following fields are extracted for EU Driver License V1:
118+ The following fields are extracted for Driver License V1:
119119
120120## Address
121121** address** ([ StringField] ( #stringfield ) ): EU driver license holders address
Original file line number Diff line number Diff line change @@ -8,23 +8,23 @@ Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/mai
88
99# Quick-Start
1010``` py
11- from mindee import Client, PredictResponse, product
11+ from mindee import Client, product, AsyncPredictResponse
12+ from time import sleep
1213
1314# Init a new client
1415mindee_client = Client(api_key = " my-api-key" )
1516
1617# Load a file from disk
1718input_doc = mindee_client.source_from_path(" /path/to/the/file.ext" )
1819
19- # Load a file from disk and parse it.
20- # The endpoint name must be specified since it cannot be determined from the class.
21- result: PredictResponse = mindee_client.parse(product.InternationalIdV2, input_doc)
20+ # Load a file from disk and enqueue it.
21+ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
22+ product.InternationalIdV2,
23+ input_doc,
24+ )
2225
23- # Print a summary of the API result
26+ # Print a brief summary of the parsed data
2427print (result.document)
25-
26- # Print the document-level summary
27- # print(result.document.inference.prediction)
2828```
2929
3030** Output (RST):**
Original file line number Diff line number Diff line change 1- EU Driver License V1
2- --------------------
1+ Driver License V1
2+ -----------------
33
44**Sample Code: **
55
Original file line number Diff line number Diff line change 88
99
1010class DriverLicenseV1 (Inference ):
11- """Inference prediction for EU Driver License, API version 1."""
11+ """Inference prediction for Driver License, API version 1."""
1212
1313 prediction : DriverLicenseV1Document
1414 """Document-level prediction."""
@@ -21,7 +21,7 @@ class DriverLicenseV1(Inference):
2121
2222 def __init__ (self , raw_prediction : StringDict ):
2323 """
24- EU Driver License v1 inference.
24+ Driver License v1 inference.
2525
2626 :param raw_prediction: Raw prediction from the HTTP response.
2727 """
Original file line number Diff line number Diff line change 55
66
77class DriverLicenseV1Document (Prediction ):
8- """Document data for EU Driver License, API version 1."""
8+ """Document data for Driver License, API version 1."""
99
1010 address : StringField
1111 """EU driver license holders address"""
@@ -38,7 +38,7 @@ def __init__(
3838 page_id : Optional [int ] = None ,
3939 ):
4040 """
41- EU Driver License document.
41+ Driver License document.
4242
4343 :param raw_prediction: Raw prediction from HTTP response
4444 :param page_id: Page number for multi pages pdf input
Original file line number Diff line number Diff line change 88
99
1010class DriverLicenseV1Page (DriverLicenseV1Document ):
11- """Page data for EU Driver License, API version 1."""
11+ """Page data for Driver License, API version 1."""
1212
1313 photo : PositionField
1414 """Has a photo of the EU driver license holder"""
@@ -21,7 +21,7 @@ def __init__(
2121 page_id : Optional [int ] = None ,
2222 ):
2323 """
24- EU Driver License page.
24+ Driver License page.
2525
2626 :param raw_prediction: Raw prediction from HTTP response
2727 :param page_id: Page number for multi pages pdf input
You can’t perform that action at this time.
0 commit comments