Skip to content

Commit 9aabffa

Browse files
committed
📝 slightly better code samples
1 parent d1f6769 commit 9aabffa

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

docs/code_samples/v2_classification.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class SimpleMindeeClientV2 {
2929
// Load a file from disk
3030
LocalInputSource inputSource = new LocalInputSource(filePath);
3131

32-
// Send for processing
32+
// Send for processing using polling
3333
ClassificationResponse response = mindeeClient.enqueueAndGetResult(
3434
ClassificationResponse.class,
3535
inputSource,

docs/code_samples/v2_crop.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class SimpleMindeeClientV2 {
1919
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);
2020

2121
// Set inference parameters
22-
// Note: modelId is mandatory.
2322
CropParameters cropParams = CropParameters
2423
// ID of the model, required.
2524
.builder(modelId)
@@ -28,7 +27,7 @@ public class SimpleMindeeClientV2 {
2827
// Load a file from disk
2928
LocalInputSource inputSource = new LocalInputSource(filePath);
3029

31-
// Send for processing
30+
// Send for processing using polling
3231
CropResponse response = mindeeClient.enqueueAndGetResult(
3332
CropResponse.class,
3433
inputSource,

docs/code_samples/v2_extraction.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import com.mindee.MindeeClientV2;
22
import com.mindee.InferenceParameters;
33
import com.mindee.input.LocalInputSource;
44
import com.mindee.parsing.v2.InferenceResponse;
5-
import com.mindee.parsing.v2.InferenceResult;
5+
import com.mindee.parsing.v2.field.InferenceFields;
66
import java.io.IOException;
77

88
public class SimpleMindeeClientV2 {
@@ -18,7 +18,6 @@ public class SimpleMindeeClientV2 {
1818
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);
1919

2020
// Set inference parameters
21-
// Note: modelId is mandatory.
2221
InferenceParameters extractionParams = InferenceParameters
2322
// ID of the model, required.
2423
.builder(modelId)
@@ -40,7 +39,7 @@ public class SimpleMindeeClientV2 {
4039
// Load a file from disk
4140
LocalInputSource inputSource = new LocalInputSource(filePath);
4241

43-
// Send for processing
42+
// Send for processing using polling
4443
InferenceResponse response = mindeeClient.enqueueAndGetResult(
4544
InferenceResponse.class,
4645
inputSource,
@@ -51,6 +50,6 @@ public class SimpleMindeeClientV2 {
5150
System.out.println(response.getInference().toString());
5251

5352
// Access the result fields
54-
InferenceResult result = response.getInference().getResult();
53+
InferenceFields fields = response.getInference().getResult().getFields();
5554
}
5655
}

docs/code_samples/v2_ocr.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class SimpleMindeeClientV2 {
1919
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);
2020

2121
// Set inference parameters
22-
// Note: modelId is mandatory.
2322
OcrParameters ocrParams = OcrParameters
2423
// ID of the model, required.
2524
.builder(modelId)
@@ -28,7 +27,7 @@ public class SimpleMindeeClientV2 {
2827
// Load a file from disk
2928
LocalInputSource inputSource = new LocalInputSource(filePath);
3029

31-
// Send for processing
30+
// Send for processing using polling
3231
OcrResponse response = mindeeClient.enqueueAndGetResult(
3332
OcrResponse.class,
3433
inputSource,

docs/code_samples/v2_split.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class SimpleMindeeClientV2 {
1919
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);
2020

2121
// Set inference parameters
22-
// Note: modelId is mandatory.
2322
SplitParameters splitParams = SplitParameters
2423
// ID of the model, required.
2524
.builder(modelId)
@@ -28,7 +27,7 @@ public class SimpleMindeeClientV2 {
2827
// Load a file from disk
2928
LocalInputSource inputSource = new LocalInputSource(filePath);
3029

31-
// Send for processing
30+
// Send for processing using polling
3231
SplitResponse response = mindeeClient.enqueueAndGetResult(
3332
SplitResponse.class,
3433
inputSource,

0 commit comments

Comments
 (0)