ITableExtractor<T>

Interfaces · AiDotNet.Document.Interfaces

Interface for table detection and structure recognition models.

Implements: IDocumentModel<T>

Known implementations: MATCHA<T>, TableTransformer<T>

For Beginners

Documents often contain tables with important data. Table extraction helps computers understand where tables are, how they’re structured, and what data they contain. This is useful for extracting financial data, product catalogs, or any tabular information.

Example usage:

How It Works

Table extraction models detect tables in documents and extract their structure (rows, columns, cells) along with the content in each cell.

Properties

Property Summary
bool SupportsBorderedTables { get; } Gets whether this model supports bordered tables.
bool SupportsBorderlessTables { get; } Gets whether this model supports borderless tables.
bool SupportsMergedCells { get; } Gets whether this model can detect merged cells (row/column spans).

Methods

Method Summary
IEnumerable<List<List<string>>> ExtractTableContent(Tensor<T> documentImage) Extracts table content as structured data.
IEnumerable<TableRegion<T>> DetectTables(Tensor<T> documentImage) Detects tables in a document image.
TableStructureResult<T> RecognizeStructure(Tensor<T> tableImage) Recognizes the structure of a table (rows, columns, cells).
string ExportTables(Tensor<T> documentImage, TableExportFormat format) Exports detected tables to a specific format.