Skip to content

Commit 17c597f

Browse files
✨ add support for financial document v1.10 & invoice v4.8 (#266)
1 parent e0cd332 commit 17c597f

File tree

14 files changed

+342
-14
lines changed

14 files changed

+342
-14
lines changed

docs/extras/guide/bill_of_lading_v1.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 609808f773b0b90051d839de
66
---
77
The Python OCR SDK supports the [Bill of Lading API](https://platform.mindee.com/mindee/bill_of_lading).
88

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.
9+
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/bill_of_lading/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
1010
![Bill of Lading sample](https://github.com/mindee/client-lib-test-data/blob/main/products/bill_of_lading/default_sample.jpg?raw=true)
1111

1212
# Quick-Start
@@ -29,6 +29,55 @@ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
2929
print(result.document)
3030

3131
```
32+
33+
**Output (RST):**
34+
```rst
35+
########
36+
Document
37+
########
38+
:Mindee ID: 3b5250a1-b52c-4e0b-bc3e-2f0146b04e29
39+
:Filename: default_sample.jpg
40+
41+
Inference
42+
#########
43+
:Product: mindee/bill_of_lading v1.1
44+
:Rotation applied: No
45+
46+
Prediction
47+
==========
48+
:Bill of Lading Number: XYZ123456
49+
:Shipper:
50+
:Address: 123 OCEAN DRIVE, SHANGHAI, CHINA
51+
:Email:
52+
:Name: GLOBAL FREIGHT SOLUTIONS INC.
53+
:Phone: 86-21-12345678
54+
:Consignee:
55+
:Address: 789 TRADE STREET, SINGAPORE 567890, SINGAPORE
56+
:Email:
57+
:Name: PACIFIC TRADING CO.
58+
:Phone: 65-65432100
59+
:Notify Party:
60+
:Address: 789 TRADE STREET, SINGAPORE 567890, SINGAPORE
61+
:Email:
62+
:Name: PACIFIC TRADING CO.
63+
:Phone: 65-65432100
64+
:Carrier:
65+
:Name: GLOBAL SHIPPING CO.,LTD.
66+
:Professional Number:
67+
:SCAC:
68+
:Items:
69+
+--------------------------------------+--------------+-------------+------------------+----------+-------------+
70+
| Description | Gross Weight | Measurement | Measurement Unit | Quantity | Weight Unit |
71+
+======================================+==============+=============+==================+==========+=============+
72+
| ELECTRONIC COMPONENTS\nP/N: 12345... | 500.00 | 1.50 | cbm | 1.00 | kgs |
73+
+--------------------------------------+--------------+-------------+------------------+----------+-------------+
74+
:Port of Loading: SHANGHAI, CHINA
75+
:Port of Discharge: LOS ANGELES, USA
76+
:Place of Delivery: LOS ANGELES, USA
77+
:Date of issue: 2022-09-30
78+
:Departure Date:
79+
```
80+
3281
# Field Types
3382
## Standard Fields
3483
These fields are generic and used in several products.

docs/extras/guide/energy_bill_fra_v1.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 609808f773b0b90051d839de
66
---
77
The Python OCR SDK supports the [Energy Bill API](https://platform.mindee.com/mindee/energy_bill_fra).
88

9-
The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg) can be used for testing purposes.
9+
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
1010
![Energy Bill sample](https://github.com/mindee/client-lib-test-data/blob/main/products/energy_bill_fra/default_sample.jpg?raw=true)
1111

1212
# Quick-Start
@@ -29,6 +29,66 @@ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
2929
print(result.document)
3030

3131
```
32+
33+
**Output (RST):**
34+
```rst
35+
########
36+
Document
37+
########
38+
:Mindee ID: 17f0ccef-e3fe-4a28-838d-d704489d6ce7
39+
:Filename: default_sample.pdf
40+
41+
Inference
42+
#########
43+
:Product: mindee/energy_bill_fra v1.0
44+
:Rotation applied: No
45+
46+
Prediction
47+
==========
48+
:Invoice Number: 10123590373
49+
:Contract ID: 1234567890
50+
:Delivery Point: 98765432109876
51+
:Invoice Date: 2021-01-29
52+
:Due Date: 2021-02-15
53+
:Total Before Taxes: 1241.03
54+
:Total Taxes: 238.82
55+
:Total Amount: 1479.85
56+
:Energy Supplier:
57+
:Address: TSA 12345, 12345 DEMOCITY CEDEX, 75001 PARIS
58+
:Name: EDF
59+
:Energy Consumer:
60+
:Address: 12 AVENUE DES RÊVES, RDC A 123 COUR FAUSSE A, 75000 PARIS
61+
:Name: John Doe
62+
:Subscription:
63+
+--------------------------------------+------------+------------+----------+-----------+------------+
64+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
65+
+======================================+============+============+==========+===========+============+
66+
| Abonnement électricité | 2021-02-28 | 2021-01-01 | 5.50 | 59.00 | 29.50 |
67+
+--------------------------------------+------------+------------+----------+-----------+------------+
68+
:Energy Usage:
69+
+--------------------------------------+------------+------------+----------+-----------+------------+
70+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
71+
+======================================+============+============+==========+===========+============+
72+
| Consommation (HT) | 2021-01-27 | 2020-11-28 | 20.00 | 898.43 | 10.47 |
73+
+--------------------------------------+------------+------------+----------+-----------+------------+
74+
:Taxes and Contributions:
75+
+--------------------------------------+------------+------------+----------+-----------+------------+
76+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
77+
+======================================+============+============+==========+===========+============+
78+
| Contribution au Service Public de... | 2021-01-27 | 2020-11-28 | 20.00 | 193.07 | 2.25 |
79+
+--------------------------------------+------------+------------+----------+-----------+------------+
80+
| Départementale sur la Conso Final... | 2020-12-31 | 2020-11-28 | 20.00 | 13.98 | 0.3315 |
81+
+--------------------------------------+------------+------------+----------+-----------+------------+
82+
| Communale sur la Conso Finale Ele... | 2021-01-27 | 2021-01-01 | 20.00 | 28.56 | 0.6545 |
83+
+--------------------------------------+------------+------------+----------+-----------+------------+
84+
| Contribution Tarifaire d'Achemine... | 2020-12-31 | 2020-11-28 | 20.00 | 27.96 | 0.663 |
85+
+--------------------------------------+------------+------------+----------+-----------+------------+
86+
:Meter Details:
87+
:Meter Number: 620
88+
:Meter Type: electricity
89+
:Unit of Measure: kWh
90+
```
91+
3292
# Field Types
3393
## Standard Fields
3494
These fields are generic and used in several products.

docs/extras/guide/expense_receipts_v5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Prediction
4848
==========
4949
:Expense Locale: en-GB; en; GB; GBP;
5050
:Purchase Category: food
51-
:Purchase Subcategory: restaurant
51+
:Purchase Subcategory:
5252
:Document Type: EXPENSE RECEIPT
5353
:Purchase Date: 2016-02-26
5454
:Purchase Time: 15:20
@@ -62,7 +62,7 @@ Prediction
6262
+===============+========+==========+===============+
6363
| 8.50 | VAT | 20.00 | 1.70 |
6464
+---------------+--------+----------+---------------+
65-
:Supplier Name: clachan
65+
:Supplier Name: Clachan
6666
:Supplier Company Registrations: Type: VAT NUMBER, Value: 232153895
6767
Type: VAT NUMBER, Value: 232153895
6868
:Supplier Address: 34 Kingley Street W1B 50H
@@ -82,7 +82,7 @@ Page 0
8282
------
8383
:Expense Locale: en-GB; en; GB; GBP;
8484
:Purchase Category: food
85-
:Purchase Subcategory: restaurant
85+
:Purchase Subcategory:
8686
:Document Type: EXPENSE RECEIPT
8787
:Purchase Date: 2016-02-26
8888
:Purchase Time: 15:20
@@ -96,7 +96,7 @@ Page 0
9696
+===============+========+==========+===============+
9797
| 8.50 | VAT | 20.00 | 1.70 |
9898
+---------------+--------+----------+---------------+
99-
:Supplier Name: clachan
99+
:Supplier Name: Clachan
100100
:Supplier Company Registrations: Type: VAT NUMBER, Value: 232153895
101101
Type: VAT NUMBER, Value: 232153895
102102
:Supplier Address: 34 Kingley Street W1B 50H

docs/extras/guide/financial_document_v1.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,20 @@ for line_items_elem in result.document.inference.prediction.line_items:
365365
print(result.document.inference.prediction.locale.value)
366366
```
367367

368+
## Payment Date
369+
**payment_date** ([DateField](#datefield)): The date on which the payment is due / fullfilled.
370+
371+
```py
372+
print(result.document.inference.prediction.payment_date.value)
373+
```
374+
375+
## Purchase Order Number
376+
**po_number** ([StringField](#stringfield)): The purchase order number.
377+
378+
```py
379+
print(result.document.inference.prediction.po_number.value)
380+
```
381+
368382
## Receipt Number
369383
**receipt_number** ([StringField](#stringfield)): The receipt number or identifier only if document is a receipt.
370384

docs/extras/guide/invoices_v4.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Prediction
8888
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
8989
:Supplier Phone Number: 4165551212
9090
:Supplier Website:
91-
:Supplier Email: i_doi@example.com
91+
:Supplier Email: ldoi@example.com
9292
:Customer Name: JIRO DOI
9393
:Customer Company Registrations:
9494
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
@@ -132,7 +132,7 @@ Page 0
132132
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
133133
:Supplier Phone Number: 4165551212
134134
:Supplier Website:
135-
:Supplier Email: i_doi@example.com
135+
:Supplier Email: ldoi@example.com
136136
:Customer Name: JIRO DOI
137137
:Customer Company Registrations:
138138
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
@@ -327,6 +327,20 @@ for line_items_elem in result.document.inference.prediction.line_items:
327327
print(result.document.inference.prediction.locale.value)
328328
```
329329

330+
## Payment Date
331+
**payment_date** ([DateField](#datefield)): The date on which the payment is due/ was full-filled.
332+
333+
```py
334+
print(result.document.inference.prediction.payment_date.value)
335+
```
336+
337+
## Purchase Order Number
338+
**po_number** ([StringField](#stringfield)): The purchase order number.
339+
340+
```py
341+
print(result.document.inference.prediction.po_number.value)
342+
```
343+
330344
## Reference Numbers
331345
**reference_numbers** (List[[StringField](#stringfield)]): List of Reference numbers, including PO number.
332346

docs/extras/guide/nutrition_facts_v1.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 609808f773b0b90051d839de
66
---
77
The Python OCR SDK supports the [Nutrition Facts Label API](https://platform.mindee.com/mindee/nutrition_facts).
88

9-
The [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/nutrition_facts/default_sample.jpg) can be used for testing purposes.
9+
Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/nutrition_facts/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
1010
![Nutrition Facts Label sample](https://github.com/mindee/client-lib-test-data/blob/main/products/nutrition_facts/default_sample.jpg?raw=true)
1111

1212
# Quick-Start
@@ -29,6 +29,85 @@ result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
2929
print(result.document)
3030

3131
```
32+
33+
**Output (RST):**
34+
```rst
35+
########
36+
Document
37+
########
38+
:Mindee ID: 38a12fe0-5d69-4ca4-9b30-12f1b659311c
39+
:Filename: default_sample.jpg
40+
41+
Inference
42+
#########
43+
:Product: mindee/nutrition_facts v1.0
44+
:Rotation applied: No
45+
46+
Prediction
47+
==========
48+
:Serving per Box: 2.00
49+
:Serving Size:
50+
:Amount: 228.00
51+
:Unit: g
52+
:Calories:
53+
:Daily Value:
54+
:Per 100g:
55+
:Per Serving: 250.00
56+
:Total Fat:
57+
:Daily Value:
58+
:Per 100g:
59+
:Per Serving: 12.00
60+
:Saturated Fat:
61+
:Daily Value: 15.00
62+
:Per 100g:
63+
:Per Serving: 3.00
64+
:Trans Fat:
65+
:Daily Value:
66+
:Per 100g:
67+
:Per Serving: 3.00
68+
:Cholesterol:
69+
:Daily Value: 10.00
70+
:Per 100g:
71+
:Per Serving: 30.00
72+
:Total Carbohydrate:
73+
:Daily Value: 10.00
74+
:Per 100g:
75+
:Per Serving: 31.00
76+
:Dietary Fiber:
77+
:Daily Value: 0.00
78+
:Per 100g:
79+
:Per Serving: 0.00
80+
:Total Sugars:
81+
:Daily Value:
82+
:Per 100g:
83+
:Per Serving: 5.00
84+
:Added Sugars:
85+
:Daily Value:
86+
:Per 100g:
87+
:Per Serving:
88+
:Protein:
89+
:Daily Value:
90+
:Per 100g:
91+
:Per Serving: 5.00
92+
:sodium:
93+
:Daily Value: 20.00
94+
:Per 100g:
95+
:Per Serving: 470.00
96+
:Unit: mg
97+
:nutrients:
98+
+-------------+----------------------+----------+-------------+------+
99+
| Daily Value | Name | Per 100g | Per Serving | Unit |
100+
+=============+======================+==========+=============+======+
101+
| 12.00 | Vitamin A | | 4.00 | mcg |
102+
+-------------+----------------------+----------+-------------+------+
103+
| 12.00 | Vitamin C | | 2.00 | mg |
104+
+-------------+----------------------+----------+-------------+------+
105+
| 12.00 | Calcium | | 45.60 | mg |
106+
+-------------+----------------------+----------+-------------+------+
107+
| 12.00 | Iron | | 0.90 | mg |
108+
+-------------+----------------------+----------+-------------+------+
109+
```
110+
32111
# Field Types
33112
## Standard Fields
34113
These fields are generic and used in several products.

0 commit comments

Comments
 (0)