pub struct TableDetector { /* private fields */ }Expand description
Detects tables in a list of text spans.
Implementations§
Source§impl TableDetector
impl TableDetector
Sourcepub fn with_config(config: TableDetectorConfig) -> Self
pub fn with_config(config: TableDetectorConfig) -> Self
Create a new table detector with custom configuration.
Sourcepub fn detect(
&self,
spans: Vec<TextSpan>,
) -> (Vec<DetectedTable>, Vec<TextSpan>)
pub fn detect( &self, spans: Vec<TextSpan>, ) -> (Vec<DetectedTable>, Vec<TextSpan>)
Detect tables in the given spans.
Returns detected tables and the spans that were NOT part of tables.
Sourcepub fn to_table_model(&self, detected: &DetectedTable) -> Table
pub fn to_table_model(&self, detected: &DetectedTable) -> Table
Convert a detected table to the model Table type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableDetector
impl RefUnwindSafe for TableDetector
impl Send for TableDetector
impl Sync for TableDetector
impl Unpin for TableDetector
impl UnwindSafe for TableDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more