Property OcrEngine
- Namespace
- LMKit.Extraction
- Assembly
- LM-Kit.NET.dll
OcrEngine
Gets or sets the OcrEngine used to perform OCR on image attachments.
public OcrEngine OcrEngine { get; set; }
Property Value
Remarks
This property is optional; if no OCR engine is provided (i.e., left null
),
image-based extraction will be skipped regardless of the input content.
When set, OCR may be invoked automatically during extraction depending on the PreferredInferenceModality and the structure of the input:
- If PreferredInferenceModality is Vision or Multimodal, the engine will attempt to extract text from any raster attachments before invoking the language model.
- If the input includes both text and images, providing an OCR engine can substantially improve recognition accuracy by converting visual text into a format the language model can process directly.
For purely text-based inputs or when no OCR engine is supplied, the extraction process will rely solely on the language model’s text understanding capabilities.