TableProcessor

Trait TableProcessor 

Source
pub trait TableProcessor: Send + Sync {
    // Required methods
    fn extract_table(&self, content: &str) -> RragResult<Vec<ExtractedTable>>;
    fn parse_structure(&self, table_html: &str) -> RragResult<ExtractedTable>;
    fn generate_summary(&self, table: &ExtractedTable) -> RragResult<String>;
    fn calculate_statistics(
        &self,
        table: &ExtractedTable,
    ) -> RragResult<TableStatistics>;
}
Expand description

Table processor trait

Required Methods§

Source

fn extract_table(&self, content: &str) -> RragResult<Vec<ExtractedTable>>

Extract table from document

Source

fn parse_structure(&self, table_html: &str) -> RragResult<ExtractedTable>

Parse table structure

Source

fn generate_summary(&self, table: &ExtractedTable) -> RragResult<String>

Generate table summary

Source

fn calculate_statistics( &self, table: &ExtractedTable, ) -> RragResult<TableStatistics>

Calculate statistics

Implementors§