Skip to content

Commit 8546af0

Browse files
✨ add support for financial document v1.10 & invoice v4.8 (#200)
1 parent 6be4742 commit 8546af0

File tree

15 files changed

+394
-16
lines changed

15 files changed

+394
-16
lines changed

docs/bill_of_lading_v1.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 631a062c3718850f3519b793
66
---
77
The Java 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
@@ -54,6 +54,55 @@ public class SimpleMindeeClient {
5454
}
5555

5656
```
57+
58+
**Output (RST):**
59+
```rst
60+
########
61+
Document
62+
########
63+
:Mindee ID: 3b5250a1-b52c-4e0b-bc3e-2f0146b04e29
64+
:Filename: default_sample.jpg
65+
66+
Inference
67+
#########
68+
:Product: mindee/bill_of_lading v1.1
69+
:Rotation applied: No
70+
71+
Prediction
72+
==========
73+
:Bill of Lading Number: XYZ123456
74+
:Shipper:
75+
:Address: 123 OCEAN DRIVE, SHANGHAI, CHINA
76+
:Email:
77+
:Name: GLOBAL FREIGHT SOLUTIONS INC.
78+
:Phone: 86-21-12345678
79+
:Consignee:
80+
:Address: 789 TRADE STREET, SINGAPORE 567890, SINGAPORE
81+
:Email:
82+
:Name: PACIFIC TRADING CO.
83+
:Phone: 65-65432100
84+
:Notify Party:
85+
:Address: 789 TRADE STREET, SINGAPORE 567890, SINGAPORE
86+
:Email:
87+
:Name: PACIFIC TRADING CO.
88+
:Phone: 65-65432100
89+
:Carrier:
90+
:Name: GLOBAL SHIPPING CO.,LTD.
91+
:Professional Number:
92+
:SCAC:
93+
:Items:
94+
+--------------------------------------+--------------+-------------+------------------+----------+-------------+
95+
| Description | Gross Weight | Measurement | Measurement Unit | Quantity | Weight Unit |
96+
+======================================+==============+=============+==================+==========+=============+
97+
| ELECTRONIC COMPONENTS\nP/N: 12345... | 500.00 | 1.50 | cbm | 1.00 | kgs |
98+
+--------------------------------------+--------------+-------------+------------------+----------+-------------+
99+
:Port of Loading: SHANGHAI, CHINA
100+
:Port of Discharge: LOS ANGELES, USA
101+
:Place of Delivery: LOS ANGELES, USA
102+
:Date of issue: 2022-09-30
103+
:Departure Date:
104+
```
105+
57106
# Field Types
58107
## Standard Fields
59108
These fields are generic and used in several products.

docs/energy_bill_fra_v1.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 631a062c3718850f3519b793
66
---
77
The Java 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
@@ -54,6 +54,66 @@ public class SimpleMindeeClient {
5454
}
5555

5656
```
57+
58+
**Output (RST):**
59+
```rst
60+
########
61+
Document
62+
########
63+
:Mindee ID: 17f0ccef-e3fe-4a28-838d-d704489d6ce7
64+
:Filename: default_sample.pdf
65+
66+
Inference
67+
#########
68+
:Product: mindee/energy_bill_fra v1.0
69+
:Rotation applied: No
70+
71+
Prediction
72+
==========
73+
:Invoice Number: 10123590373
74+
:Contract ID: 1234567890
75+
:Delivery Point: 98765432109876
76+
:Invoice Date: 2021-01-29
77+
:Due Date: 2021-02-15
78+
:Total Before Taxes: 1241.03
79+
:Total Taxes: 238.82
80+
:Total Amount: 1479.85
81+
:Energy Supplier:
82+
:Address: TSA 12345, 12345 DEMOCITY CEDEX, 75001 PARIS
83+
:Name: EDF
84+
:Energy Consumer:
85+
:Address: 12 AVENUE DES RÊVES, RDC A 123 COUR FAUSSE A, 75000 PARIS
86+
:Name: John Doe
87+
:Subscription:
88+
+--------------------------------------+------------+------------+----------+-----------+------------+
89+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
90+
+======================================+============+============+==========+===========+============+
91+
| Abonnement électricité | 2021-02-28 | 2021-01-01 | 5.50 | 59.00 | 29.50 |
92+
+--------------------------------------+------------+------------+----------+-----------+------------+
93+
:Energy Usage:
94+
+--------------------------------------+------------+------------+----------+-----------+------------+
95+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
96+
+======================================+============+============+==========+===========+============+
97+
| Consommation (HT) | 2021-01-27 | 2020-11-28 | 20.00 | 898.43 | 10.47 |
98+
+--------------------------------------+------------+------------+----------+-----------+------------+
99+
:Taxes and Contributions:
100+
+--------------------------------------+------------+------------+----------+-----------+------------+
101+
| Description | End Date | Start Date | Tax Rate | Total | Unit Price |
102+
+======================================+============+============+==========+===========+============+
103+
| Contribution au Service Public de... | 2021-01-27 | 2020-11-28 | 20.00 | 193.07 | 2.25 |
104+
+--------------------------------------+------------+------------+----------+-----------+------------+
105+
| Départementale sur la Conso Final... | 2020-12-31 | 2020-11-28 | 20.00 | 13.98 | 0.3315 |
106+
+--------------------------------------+------------+------------+----------+-----------+------------+
107+
| Communale sur la Conso Finale Ele... | 2021-01-27 | 2021-01-01 | 20.00 | 28.56 | 0.6545 |
108+
+--------------------------------------+------------+------------+----------+-----------+------------+
109+
| Contribution Tarifaire d'Achemine... | 2020-12-31 | 2020-11-28 | 20.00 | 27.96 | 0.663 |
110+
+--------------------------------------+------------+------------+----------+-----------+------------+
111+
:Meter Details:
112+
:Meter Number: 620
113+
:Meter Type: electricity
114+
:Unit of Measure: kWh
115+
```
116+
57117
# Field Types
58118
## Standard Fields
59119
These fields are generic and used in several products.

docs/expense_receipts_v5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Prediction
7272
==========
7373
:Expense Locale: en-GB; en; GB; GBP;
7474
:Purchase Category: food
75-
:Purchase Subcategory: restaurant
75+
:Purchase Subcategory:
7676
:Document Type: EXPENSE RECEIPT
7777
:Purchase Date: 2016-02-26
7878
:Purchase Time: 15:20
@@ -86,7 +86,7 @@ Prediction
8686
+===============+========+==========+===============+
8787
| 8.50 | VAT | 20.00 | 1.70 |
8888
+---------------+--------+----------+---------------+
89-
:Supplier Name: clachan
89+
:Supplier Name: Clachan
9090
:Supplier Company Registrations: Type: VAT NUMBER, Value: 232153895
9191
Type: VAT NUMBER, Value: 232153895
9292
:Supplier Address: 34 Kingley Street W1B 50H
@@ -106,7 +106,7 @@ Page 0
106106
------
107107
:Expense Locale: en-GB; en; GB; GBP;
108108
:Purchase Category: food
109-
:Purchase Subcategory: restaurant
109+
:Purchase Subcategory:
110110
:Document Type: EXPENSE RECEIPT
111111
:Purchase Date: 2016-02-26
112112
:Purchase Time: 15:20
@@ -120,7 +120,7 @@ Page 0
120120
+===============+========+==========+===============+
121121
| 8.50 | VAT | 20.00 | 1.70 |
122122
+---------------+--------+----------+---------------+
123-
:Supplier Name: clachan
123+
:Supplier Name: Clachan
124124
:Supplier Company Registrations: Type: VAT NUMBER, Value: 232153895
125125
Type: VAT NUMBER, Value: 232153895
126126
:Supplier Address: 34 Kingley Street W1B 50H

docs/financial_document_v1.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,20 @@ for (lineItemsElem : result.getDocument().getInference().getPrediction().getLine
416416
System.out.println(result.getDocument().getInference().getPrediction().getLocale().value);
417417
```
418418

419+
## Payment Date
420+
**paymentDate**: The date on which the payment is due / fullfilled.
421+
422+
```java
423+
System.out.println(result.getDocument().getInference().getPrediction().getPaymentDate().value);
424+
```
425+
426+
## Purchase Order Number
427+
**poNumber**: The purchase order number.
428+
429+
```java
430+
System.out.println(result.getDocument().getInference().getPrediction().getPoNumber().value);
431+
```
432+
419433
## Receipt Number
420434
**receiptNumber**: The receipt number or identifier only if document is a receipt.
421435

docs/invoices_v4.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Prediction
137137
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
138138
:Supplier Phone Number: 4165551212
139139
:Supplier Website:
140-
:Supplier Email: i_doi@example.com
140+
:Supplier Email: ldoi@example.com
141141
:Customer Name: JIRO DOI
142142
:Customer Company Registrations:
143143
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
@@ -181,7 +181,7 @@ Page 0
181181
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
182182
:Supplier Phone Number: 4165551212
183183
:Supplier Website:
184-
:Supplier Email: i_doi@example.com
184+
:Supplier Email: ldoi@example.com
185185
:Customer Name: JIRO DOI
186186
:Customer Company Registrations:
187187
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
@@ -378,6 +378,20 @@ for (lineItemsElem : result.getDocument().getInference().getPrediction().getLine
378378
System.out.println(result.getDocument().getInference().getPrediction().getLocale().value);
379379
```
380380

381+
## Payment Date
382+
**paymentDate**: The date on which the payment is due/ was full-filled.
383+
384+
```java
385+
System.out.println(result.getDocument().getInference().getPrediction().getPaymentDate().value);
386+
```
387+
388+
## Purchase Order Number
389+
**poNumber**: The purchase order number.
390+
391+
```java
392+
System.out.println(result.getDocument().getInference().getPrediction().getPoNumber().value);
393+
```
394+
381395
## Reference Numbers
382396
**referenceNumbers**: List of Reference numbers, including PO number.
383397

docs/nutrition_facts_v1.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parentDoc: 631a062c3718850f3519b793
66
---
77
The Java 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
@@ -54,6 +54,85 @@ public class SimpleMindeeClient {
5454
}
5555

5656
```
57+
58+
**Output (RST):**
59+
```rst
60+
########
61+
Document
62+
########
63+
:Mindee ID: 38a12fe0-5d69-4ca4-9b30-12f1b659311c
64+
:Filename: default_sample.jpg
65+
66+
Inference
67+
#########
68+
:Product: mindee/nutrition_facts v1.0
69+
:Rotation applied: No
70+
71+
Prediction
72+
==========
73+
:Serving per Box: 2.00
74+
:Serving Size:
75+
:Amount: 228.00
76+
:Unit: g
77+
:Calories:
78+
:Daily Value:
79+
:Per 100g:
80+
:Per Serving: 250.00
81+
:Total Fat:
82+
:Daily Value:
83+
:Per 100g:
84+
:Per Serving: 12.00
85+
:Saturated Fat:
86+
:Daily Value: 15.00
87+
:Per 100g:
88+
:Per Serving: 3.00
89+
:Trans Fat:
90+
:Daily Value:
91+
:Per 100g:
92+
:Per Serving: 3.00
93+
:Cholesterol:
94+
:Daily Value: 10.00
95+
:Per 100g:
96+
:Per Serving: 30.00
97+
:Total Carbohydrate:
98+
:Daily Value: 10.00
99+
:Per 100g:
100+
:Per Serving: 31.00
101+
:Dietary Fiber:
102+
:Daily Value: 0.00
103+
:Per 100g:
104+
:Per Serving: 0.00
105+
:Total Sugars:
106+
:Daily Value:
107+
:Per 100g:
108+
:Per Serving: 5.00
109+
:Added Sugars:
110+
:Daily Value:
111+
:Per 100g:
112+
:Per Serving:
113+
:Protein:
114+
:Daily Value:
115+
:Per 100g:
116+
:Per Serving: 5.00
117+
:sodium:
118+
:Daily Value: 20.00
119+
:Per 100g:
120+
:Per Serving: 470.00
121+
:Unit: mg
122+
:nutrients:
123+
+-------------+----------------------+----------+-------------+------+
124+
| Daily Value | Name | Per 100g | Per Serving | Unit |
125+
+=============+======================+==========+=============+======+
126+
| 12.00 | Vitamin A | | 4.00 | mcg |
127+
+-------------+----------------------+----------+-------------+------+
128+
| 12.00 | Vitamin C | | 2.00 | mg |
129+
+-------------+----------------------+----------+-------------+------+
130+
| 12.00 | Calcium | | 45.60 | mg |
131+
+-------------+----------------------+----------+-------------+------+
132+
| 12.00 | Iron | | 0.90 | mg |
133+
+-------------+----------------------+----------+-------------+------+
134+
```
135+
57136
# Field Types
58137
## Standard Fields
59138
These fields are generic and used in several products.

0 commit comments

Comments
 (0)