Property ContentConfidence
- Namespace
- LMKit.Extraction.Ocr
- Assembly
- LM-Kit.NET.dll
ContentConfidence
Gets or sets the confidence, in the 0..1 range, that the recognized content of this page is genuine text rather than recognition noise.
[JsonPropertyName("ContentConfidence")]
public double ContentConfidence { get; set; }
Property Value
- double
A calibrated score computed when noise rejection is enabled (see EnableNoiseRejection). When the screening is disabled, the value remains at its default of
1.0.
Examples
OcrResult result = await ocr.RunAsync(parameters);
if (result.ContentConfidence >= OcrResult.ContentConfidenceRejectionThreshold)
{
index.Add(result.PageText);
}
Remarks
When OCR runs over content with no machine-readable text, such as a natural photograph or a texture, the recognition engine can produce word-shaped artifacts. This score tells the caller how trustworthy the recognized content is; the recognized elements are always preserved so the caller decides what to do with them.
Recommended reading of the range:
- Below ContentConfidenceRejectionThreshold (0.35): the content is recognition noise; discard it rather than indexing or extracting from it.
- From ContentConfidenceRejectionThreshold (0.35) up to ContentConfidenceReviewThreshold (0.60): ambiguous; keep the content but route the page to human verification when the workflow supports it.
- At or above ContentConfidenceReviewThreshold (0.60): genuine text; safe to index, extract, and display.