Skip to content

Commit

Permalink
✨ add support for International Id (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee authored Dec 18, 2023
1 parent 7d34fae commit f8026b0
Show file tree
Hide file tree
Showing 72 changed files with 168 additions and 337 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,5 @@ jobs:
- name: Run Regression Testing
env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
uses: actions/checkout@v3
with:
timeout_minutes: 25
max_attempts: 2
run: |
pytest -m regression tests
run: |
pytest -m regression tests
4 changes: 0 additions & 4 deletions docs/extras/code_samples/bank_account_details_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.BankAccountDetailsV1, i

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/bank_account_details_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.BankAccountDetailsV2, i

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/bank_check_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.us.BankCheckV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/barcode_reader_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.BarcodeReaderV1, input_doc

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/carte_grise_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.CarteGriseV1, input_doc

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/carte_vitale_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.CarteVitaleV1, input_do

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/cropper_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.CropperV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/expense_receipts_v5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.ReceiptV5, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/financial_document_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.FinancialDocumentV1, input

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/idcard_fr_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.IdCardV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/idcard_fr_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.fr.IdCardV2, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/invoices_v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.InvoiceV4, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/license_plates_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.eu.LicensePlateV1, input_d

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/material_certificate_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.MaterialCertificateV1, inp

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/multi_receipts_detector_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.MultiReceiptsDetectorV1, i

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/passport_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.PassportV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/proof_of_address_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.ProofOfAddressV1, input_do

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/us_driver_license_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.us.DriverLicenseV1, input_

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
4 changes: 0 additions & 4 deletions docs/extras/code_samples/us_w9_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ result: PredictResponse = mindee_client.parse(product.us.W9V1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
6 changes: 1 addition & 5 deletions docs/extras/guide/bank_account_details_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.fr.BankAccountDetailsV2, i

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -80,7 +76,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/bank_check_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.us.BankCheckV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -80,7 +76,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/barcode_reader_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.BarcodeReaderV1, input_doc

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -70,7 +66,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/carte_grise_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.fr.CarteGriseV1, input_doc

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -146,7 +142,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/carte_vitale_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.fr.CarteVitaleV1, input_do

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -72,7 +68,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/cropper_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.CropperV1, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -66,7 +62,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/expense_receipts_v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.ReceiptV5, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -118,7 +114,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
10 changes: 3 additions & 7 deletions docs/extras/guide/financial_document_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.FinancialDocumentV1, input

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -72,7 +68,7 @@ Prediction
:Purchase Time: 20:20
:Line Items:
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
| Description | Product Code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
+======================================+==============+==========+============+==============+==============+============+
| TAX | | | | | 3.34 | |
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
Expand Down Expand Up @@ -111,7 +107,7 @@ Page 0
:Purchase Time: 20:20
:Line Items:
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
| Description | Product Code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
| Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit Price |
+======================================+==============+==========+============+==============+==============+============+
| TAX | | | | | 3.34 | |
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
Expand All @@ -130,7 +126,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
6 changes: 1 addition & 5 deletions docs/extras/guide/idcard_fr_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ result: PredictResponse = mindee_client.parse(product.fr.IdCardV2, input_doc)

# Print a brief summary of the parsed data
print(result.document)

# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)
```

**Output (RST):**
Expand Down Expand Up @@ -98,7 +94,7 @@ A typical `BaseField` object will have the following attributes:
* **bounding_box** (`[Point, Point, Point, Point]`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
* **polygon** (`List[Point]`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
* **page_id** (`int`): the ID of the page, is `None` when at document-level.
* **reconstructed** (`bool`): indicates whether or not an object was reconstructed (not extracted as the API gave it).
* **reconstructed** (`bool`): indicates whether an object was reconstructed (not extracted as the API gave it).

> **Note:** A `Point` simply refers to a List of two numbers (`[float, float]`).
Expand Down
Loading

0 comments on commit f8026b0

Please sign in to comment.