Skip to content

Commit 122da2a

Browse files
✨ add support for new products (#148)
1 parent 165d0cd commit 122da2a

39 files changed

+1453
-46
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@ Available as open source under the terms of the [MIT License](https://opensource
149149

150150

151151
## Questions?
152-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
152+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import com.mindee.MindeeClient;
2+
import com.mindee.input.LocalInputSource;
3+
import com.mindee.parsing.common.PredictResponse;
4+
import com.mindee.product.eu.driverlicense.DriverLicenseV1;
5+
import java.io.File;
6+
import java.io.IOException;
7+
8+
public class SimpleMindeeClient {
9+
10+
public static void main(String[] args) throws IOException {
11+
String apiKey = "my-api-key";
12+
String filePath = "/path/to/the/file.ext";
13+
14+
// Init a new client
15+
MindeeClient mindeeClient = new MindeeClient(apiKey);
16+
17+
// Load a file from disk
18+
LocalInputSource inputSource = new LocalInputSource(filePath);
19+
20+
// Parse the file
21+
PredictResponse<DriverLicenseV1> response = mindeeClient.parse(
22+
DriverLicenseV1.class,
23+
inputSource
24+
);
25+
26+
// Print a summary of the response
27+
System.out.println(response.toString());
28+
29+
// Print a summary of the predictions
30+
// System.out.println(response.getDocument().toString());
31+
32+
// Print the document-level predictions
33+
// System.out.println(response.getDocument().getInference().getPrediction().toString());
34+
35+
// Print the page-level predictions
36+
// response.getDocument().getInference().getPages().forEach(
37+
// page -> System.out.println(page.toString())
38+
// );
39+
}
40+
41+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import com.mindee.MindeeClient;
2+
import com.mindee.input.LocalInputSource;
3+
import com.mindee.parsing.common.AsyncPredictResponse;
4+
import com.mindee.product.internationalid.InternationalIdV2;
5+
import java.io.File;
6+
import java.io.IOException;
7+
8+
public class SimpleMindeeClient {
9+
10+
public static void main(String[] args) throws IOException, InterruptedException {
11+
String apiKey = "my-api-key";
12+
String filePath = "/path/to/the/file.ext";
13+
14+
// Init a new client
15+
MindeeClient mindeeClient = new MindeeClient(apiKey);
16+
17+
// Load a file from disk
18+
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
19+
20+
// Parse the file asynchronously
21+
AsyncPredictResponse<InternationalIdV2> response = mindeeClient.enqueueAndParse(
22+
InternationalIdV2.class,
23+
inputSource
24+
);
25+
26+
// Print a summary of the response
27+
System.out.println(response.toString());
28+
29+
// Print a summary of the predictions
30+
// System.out.println(response.getDocumentObj().toString());
31+
32+
// Print the document-level predictions
33+
// System.out.println(response.getDocumentObj().getInference().getPrediction().toString());
34+
35+
// Print the page-level predictions
36+
// response.getDocumentObj().getInference().getPages().forEach(
37+
// page -> System.out.println(page.toString())
38+
// );
39+
}
40+
41+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import com.mindee.MindeeClient;
2+
import com.mindee.input.LocalInputSource;
3+
import com.mindee.parsing.common.AsyncPredictResponse;
4+
import com.mindee.product.resume.ResumeV1;
5+
import java.io.File;
6+
import java.io.IOException;
7+
8+
public class SimpleMindeeClient {
9+
10+
public static void main(String[] args) throws IOException, InterruptedException {
11+
String apiKey = "my-api-key";
12+
String filePath = "/path/to/the/file.ext";
13+
14+
// Init a new client
15+
MindeeClient mindeeClient = new MindeeClient(apiKey);
16+
17+
// Load a file from disk
18+
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
19+
20+
// Parse the file asynchronously
21+
AsyncPredictResponse<ResumeV1> response = mindeeClient.enqueueAndParse(
22+
ResumeV1.class,
23+
inputSource
24+
);
25+
26+
// Print a summary of the response
27+
System.out.println(response.toString());
28+
29+
// Print a summary of the predictions
30+
// System.out.println(response.getDocumentObj().toString());
31+
32+
// Print the document-level predictions
33+
// System.out.println(response.getDocumentObj().getInference().getPrediction().toString());
34+
35+
// Print the page-level predictions
36+
// response.getDocumentObj().getInference().getPages().forEach(
37+
// page -> System.out.println(page.toString())
38+
// );
39+
}
40+
41+
}

docs/java-api-builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ for (Page<CustomV1Page> page : inference.getPages()) {
130130
```
131131

132132
## Questions?
133-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
133+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

docs/java-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ This field type captures tax information
7777
The `value` attribute is of type `java.time.LocalTime`
7878

7979
## Questions?
80-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
80+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

docs/java-financial-document-ocr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Code QTY Price Amount Tax (Rate) Descript
6161
```
6262

6363
## Questions?
64-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
64+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

docs/java-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,4 @@ Each page element contains the data extracted for a particular page of the docum
293293

294294

295295
## Questions?
296-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
296+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

docs/java-invoice-ocr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,4 @@ logger.info(invoiceDocument.getInference().getDocumentPrediction().getTotalNet()
291291
````
292292

293293
## Questions?
294-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
294+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

docs/java-license-plates-ocr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ Page 0
5151
```
5252

5353
## Questions?
54-
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-1jv6nawjq-FDgFcF2T5CmMmRpl9LLptw)
54+
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

0 commit comments

Comments
 (0)