pub struct StructuredDataConfig {
pub min_table_rows: usize,
pub min_table_columns: usize,
pub column_alignment_tolerance: f64,
pub row_alignment_tolerance: f64,
pub detect_tables: bool,
pub detect_key_value: bool,
pub detect_multi_column: bool,
pub min_column_gap: f64,
}Expand description
Configuration for structured data detection.
Fields§
§min_table_rows: usizeMinimum number of rows to consider something a table
min_table_columns: usizeMinimum number of columns to consider something a table
column_alignment_tolerance: f64Tolerance for column alignment (in PDF units)
Text fragments within this distance are considered aligned.
row_alignment_tolerance: f64Tolerance for row alignment (in PDF units)
detect_tables: boolEnable table detection
detect_key_value: boolEnable key-value pair detection
detect_multi_column: boolEnable multi-column layout detection
min_column_gap: f64Minimum horizontal gap to consider a column boundary (in PDF units)
Implementations§
Source§impl StructuredDataConfig
impl StructuredDataConfig
Sourcepub fn with_min_table_rows(self, rows: usize) -> Self
pub fn with_min_table_rows(self, rows: usize) -> Self
Sets the minimum number of rows for table detection.
Sourcepub fn with_min_table_columns(self, columns: usize) -> Self
pub fn with_min_table_columns(self, columns: usize) -> Self
Sets the minimum number of columns for table detection.
Sourcepub fn with_column_tolerance(self, tolerance: f64) -> Self
pub fn with_column_tolerance(self, tolerance: f64) -> Self
Sets the column alignment tolerance.
Sourcepub fn with_row_tolerance(self, tolerance: f64) -> Self
pub fn with_row_tolerance(self, tolerance: f64) -> Self
Sets the row alignment tolerance.
Sourcepub fn with_table_detection(self, enabled: bool) -> Self
pub fn with_table_detection(self, enabled: bool) -> Self
Enables or disables table detection.
Sourcepub fn with_key_value_detection(self, enabled: bool) -> Self
pub fn with_key_value_detection(self, enabled: bool) -> Self
Enables or disables key-value pair detection.
Sourcepub fn with_multi_column_detection(self, enabled: bool) -> Self
pub fn with_multi_column_detection(self, enabled: bool) -> Self
Enables or disables multi-column layout detection.
Trait Implementations§
Source§impl Clone for StructuredDataConfig
impl Clone for StructuredDataConfig
Source§fn clone(&self) -> StructuredDataConfig
fn clone(&self) -> StructuredDataConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more