Vision

public final class Vision implements AutoCloseable

Provides machine learning and computer vision capabilities for document processing. Enables AI-powered document description and content extraction.

Functions

Link copied to clipboard
public final String classify(ClassificationRequest request)
Classifies the document against the candidate labels carried by (zero-shot) and exports the ranked result.
Link copied to clipboard
public final static String classifyText(ClassificationRequest request, String text)
Classifies caller-supplied text against the candidate labels carried by (zero-shot) with no document.
Link copied to clipboard
public final void classifyToFile(ClassificationRequest request, String outputPath)
Classifies the document against the candidate labels carried by (zero-shot) and writes the exported result to a file.
Link copied to clipboard
public final void close()
Closes this resource and releases any associated native resources.
Link copied to clipboard
public final String describe()
Generates an AI-powered description of the document content.
Link copied to clipboard
public final String detectForms()
Detects form fields on the document and exports the result.
Link copied to clipboard
public final void detectFormsToFile(String outputPath)
Detects form fields on the document and writes the exported result to a file.
Link copied to clipboard
public final String detectLanguages()
Detects the language and text direction of the document, fully offline, and exports the result.
Link copied to clipboard
public final static String detectLanguagesText(String text)
Detects the language of caller-supplied text, fully offline, with no document.
public final static String detectLanguagesText(String text, DocumentSettings settings)
Detects the language(s) of caller-supplied text, fully offline, with explicit settings — raise to report more than one language in mixed text.
Link copied to clipboard
public final void detectLanguagesToFile(String outputPath)
Detects the language and text direction of the document, fully offline, and writes the exported result to a file.
Link copied to clipboard
public final String extractContent()
Extracts structured content from the document using machine vision processing.
Extracts structured content from the document using machine vision processing with custom export settings.
Link copied to clipboard
public final void extractContentToFile(String outputPath)
Extracts structured content from the document and writes it to a file.
public final void extractContentToFile(String outputPath, DocumentLayoutJsonExportSettings settings)
Extracts structured content from the document and saves it to a JSON file with custom settings.
Link copied to clipboard
Extracts structured data from the document, shaped to the JSON Schema carried by the 's {"schema": ...} envelope.
Link copied to clipboard
public final void extractStructuredToFile(StructuredExtractionRequest request, String outputPath)
Extracts structured data from the document, shaped to the JSON Schema carried by the 's {"schema": ...} envelope, and writes the JSON result to a file.
Link copied to clipboard
public final static String generateSchema(SchemaGenerationRequest request)
Generates a JSON Schema for a class of documents using a vision model, with default document settings.
public final static String generateSchema(SchemaGenerationRequest request, DocumentSettings settings)
Generates a JSON Schema for a class of documents using a vision model, with explicit document settings.
Link copied to clipboard
public final static void generateSchemaToFile(SchemaGenerationRequest request, String outputPath)
Generates a JSON Schema for a class of documents using a vision model and writes it to a file, with default document settings.
public final static void generateSchemaToFile(SchemaGenerationRequest request, DocumentSettings settings, String outputPath)
Generates a JSON Schema for a class of documents using a vision model and writes it to a file, with explicit document settings.
Link copied to clipboard
public final static Vision set(Document document)
Creates a Vision instance for the specified document.
Link copied to clipboard
public final void warmup()
Preloads (warms up) all resources needed for vision processing.