Table of Contents

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:

Share