Class TextExtractionResultElement
- Namespace
- LMKit.Extraction
- Assembly
- LM-Kit.NET.dll
Represents a single extracted element produced by TextExtraction, holding the extracted value together with confidence, validation, and source location metadata.
public sealed class TextExtractionResultElement : ILayoutElement
- Inheritance
-
TextExtractionResultElement
- Implements
- Inherited Members
Examples
var result = extractor.Parse();
foreach (var el in result.Elements)
{
Console.WriteLine($"{el.TextExtractionElement.Name} = {el.Value}");
Console.WriteLine($" Confidence : {el.Confidence:P0}");
Console.WriteLine($" Page : {el.PageIndex}");
Console.WriteLine($" Review? : {el.HumanVerificationRequired}");
}
Remarks
Each instance pairs a TextExtractionElement (the extraction schema definition) with the actual value that was extracted. For document inputs that carry layout data (PDF, images with OCR), the element also exposes its Bounds and PageIndex so callers can highlight the value in a viewer.
Fields
- TextExtractionElement
Gets the schema definition that was used to extract this element.
Properties
- Bounds
Gets the bounding quadrilateral of this element in the source document, when layout information is available.
- Confidence
Gets the confidence score of the extraction for this element, derived from per-token probability analysis during generation.
- HumanVerificationRequired
Gets a value indicating whether a human reviewer should verify this element's extracted value.
- InnerElements
Gets the child elements when this element is an object or an array of objects, as defined by InnerElements.
- PageIndex
Gets the zero-based page index where this element was located in the source document, or
-1when the page could not be determined.
- Validation
Gets the entity validation result for this element.
- Value
Gets the extracted value as a boxed object.
Methods
- As<T>(T)
Returns Value converted to
T, ordefaultValuewhen the value isnullor the conversion fails.
- ToString()
Returns a JSON-formatted string representing the extracted value.