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
4 changes: 2 additions & 2 deletions docs/code_samples/bank_account_details_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<BankAccountDetailsV2> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/barcode_reader_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<BarcodeReaderV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/carte_grise_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<CarteGriseV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/cropper_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<CropperV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Configure the endpoint
Endpoint endpoint = new Endpoint(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/default_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Configure the endpoint
Endpoint endpoint = new Endpoint(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/driver_license_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<DriverLicenseV1> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/expense_receipts_v5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<ReceiptV5> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/expense_receipts_v5_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<ReceiptV5> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/financial_document_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<FinancialDocumentV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/financial_document_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<FinancialDocumentV1> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/idcard_fr_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<IdCardV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/idcard_fr_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<IdCardV2> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/ind_passport_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<IndianPassportV1> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/international_id_v2_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<InternationalIdV2> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/invoice_splitter_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<InvoiceSplitterV1> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/invoices_v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<InvoiceV4> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/invoices_v4_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(new File(filePath));
var inputSource = new LocalInputSource(new File(filePath));

// Parse the file asynchronously
AsyncPredictResponse<InvoiceV4> response = mindeeClient.enqueueAndParse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/multi_receipts_detector_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<MultiReceiptsDetectorV1> response = mindeeClient.parse(
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/passport_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class SimpleMindeeClientV1 {
String filePath = "/path/to/the/file.ext";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Parse the file
PredictResponse<PassportV1> response = mindeeClient.parse(
Expand Down
12 changes: 5 additions & 7 deletions docs/code_samples/v2_classification.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import com.mindee.input.LocalInputSource;
import com.mindee.v2.MindeeClient;
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.IOException;

Expand All @@ -16,17 +14,17 @@ public class SimpleMindeeClientV2 {
String modelId = "MY_MODEL_ID";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Set inference parameters
// Note: modelId is mandatory.
ClassificationParameters classificationParams = ClassificationParameters
var classificationParams = ClassificationParameters
// ID of the model, required.
.builder(modelId)
.build();

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

// Send for processing using polling
ClassificationResponse response = mindeeClient.enqueueAndGetResult(
Expand All @@ -39,7 +37,7 @@ public class SimpleMindeeClientV2 {
System.out.println(response.getInference().toString());

// Access the classification result
ClassificationResult result = response.getInference().getResult();
ClassificationClassifier classification = result.getClassification();
var result = response.getInference().getResult();
var classification = result.getClassification();
}
}
9 changes: 4 additions & 5 deletions docs/code_samples/v2_crop.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import com.mindee.input.LocalInputSource;
import com.mindee.v2.MindeeClient;
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.IOException;

Expand All @@ -15,16 +14,16 @@ public class SimpleMindeeClientV2 {
String modelId = "MY_MODEL_ID";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Set inference parameters
CropParameters cropParams = CropParameters
var cropParams = CropParameters
// ID of the model, required.
.builder(modelId)
.build();

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

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

// Access the crop results
CropResult result = response.getInference().getResult();
var result = response.getInference().getResult();
}
}
9 changes: 4 additions & 5 deletions docs/code_samples/v2_extraction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import com.mindee.input.LocalInputSource;
import com.mindee.v2.MindeeClient;
import com.mindee.v2.product.extraction.params.ExtractionParameters;
import com.mindee.v2.product.extraction.ExtractionResponse;
import com.mindee.v2.parsing.inference.field.InferenceFields;
import java.io.IOException;

public class SimpleMindeeClientV2 {
Expand All @@ -15,10 +14,10 @@ public class SimpleMindeeClientV2 {
String modelId = "MY_MODEL_ID";

// Init a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);
var mindeeClient = new MindeeClient(apiKey);

// Set inference parameters
ExtractionParameters extractionParams = ExtractionParameters
var extractionParams = ExtractionParameters
// ID of the model, required.
.builder(modelId)

Expand All @@ -37,7 +36,7 @@ public class SimpleMindeeClientV2 {
.build();

// Load a file from disk
LocalInputSource inputSource = new LocalInputSource(filePath);
var inputSource = new LocalInputSource(filePath);

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

// Access the result fields
InferenceFields fields = response.getInference().getResult().getFields();
var fields = response.getInference().getResult().getFields();
}
}
Loading
Loading