Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/code_samples/v2_classification.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.mindee.v2.product.classification.ClassificationClassifier;
import com.mindee.v2.product.classification.ClassificationResponse;
import com.mindee.v2.product.classification.ClassificationResult;
import com.mindee.v2.product.classification.params.ClassificationParameters;
import java.io.File;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -29,7 +28,7 @@ public class SimpleMindeeClientV2 {
// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);

// Send for processing
// Send for processing using polling
ClassificationResponse response = mindeeClient.enqueueAndGetResult(
ClassificationResponse.class,
inputSource,
Expand Down
4 changes: 1 addition & 3 deletions docs/code_samples/v2_crop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource;
import com.mindee.v2.product.crop.CropResponse;
import com.mindee.v2.product.crop.CropResult;
import com.mindee.v2.product.crop.params.CropParameters;
import java.io.File;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 {
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);

// Set inference parameters
// Note: modelId is mandatory.
CropParameters cropParams = CropParameters
// ID of the model, required.
.builder(modelId)
Expand All @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 {
// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);

// Send for processing
// Send for processing using polling
CropResponse response = mindeeClient.enqueueAndGetResult(
CropResponse.class,
inputSource,
Expand Down
7 changes: 3 additions & 4 deletions docs/code_samples/v2_extraction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import com.mindee.MindeeClientV2;
import com.mindee.InferenceParameters;
import com.mindee.input.LocalInputSource;
import com.mindee.parsing.v2.InferenceResponse;
import com.mindee.parsing.v2.InferenceResult;
import com.mindee.parsing.v2.field.InferenceFields;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -18,7 +18,6 @@ public class SimpleMindeeClientV2 {
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);

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

// Send for processing
// Send for processing using polling
InferenceResponse response = mindeeClient.enqueueAndGetResult(
InferenceResponse.class,
inputSource,
Expand All @@ -51,6 +50,6 @@ public class SimpleMindeeClientV2 {
System.out.println(response.getInference().toString());

// Access the result fields
InferenceResult result = response.getInference().getResult();
InferenceFields fields = response.getInference().getResult().getFields();
}
}
4 changes: 1 addition & 3 deletions docs/code_samples/v2_ocr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource;
import com.mindee.v2.product.ocr.OcrResponse;
import com.mindee.v2.product.ocr.OcrResult;
import com.mindee.v2.product.ocr.params.OcrParameters;
import java.io.File;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 {
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);

// Set inference parameters
// Note: modelId is mandatory.
OcrParameters ocrParams = OcrParameters
// ID of the model, required.
.builder(modelId)
Expand All @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 {
// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);

// Send for processing
// Send for processing using polling
OcrResponse response = mindeeClient.enqueueAndGetResult(
OcrResponse.class,
inputSource,
Expand Down
4 changes: 1 addition & 3 deletions docs/code_samples/v2_split.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import com.mindee.input.LocalInputSource;
import com.mindee.v2.product.split.SplitResponse;
import com.mindee.v2.product.split.SplitResult;
import com.mindee.v2.product.split.params.SplitParameters;
import java.io.File;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -19,7 +18,6 @@ public class SimpleMindeeClientV2 {
MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey);

// Set inference parameters
// Note: modelId is mandatory.
SplitParameters splitParams = SplitParameters
// ID of the model, required.
.builder(modelId)
Expand All @@ -28,7 +26,7 @@ public class SimpleMindeeClientV2 {
// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);

// Send for processing
// Send for processing using polling
SplitResponse response = mindeeClient.enqueueAndGetResult(
SplitResponse.class,
inputSource,
Expand Down
Loading