Classification Result
Reference documentation on processing a Classification result using the Mindee SDKs.
Accessing the Classification
Classifier Attributes
Classifier AttributesDocument Type
Extraction Response
from mindee import ClassificationResponse
def handle_response(response: ClassificationResponse) -> None:
classification = response.inference.result.classification
# Document type identified for this file
document_type: str = classification.document_type
print(f"Detected type: {document_type}")
# Optional extraction response, present if extraction chaining was requested
extraction_response = classification.extraction_response
if extraction_response is not None:
# Access extracted fields from the inference result
fields = extraction_response.inference.result.fields
print(f"Extraction fields: {fields}")function handleResponse(response) {
const classification = response.getInference().getResult().getClassification();
// Document type identified for this file
const documentType = classification.getDocumentType();
console.log(`Detected type: ${documentType}`);
// Optional extraction response, present if extraction chaining was requested
const extractionResponse = classification.getExtractionResponse();
if (extractionResponse != null) {
// Access extracted fields from the split's inference result
const fields = extractionResponse.getInference().getResult().getFields();
console.log(`Extraction fields: ${fields.toString()}`);
}
}Last updated
Was this helpful?

