From 8f7853894e12cc09d3925d898c079a607b7035de Mon Sep 17 00:00:00 2001 From: Klaijan Date: Mon, 26 Feb 2024 12:01:34 +0700 Subject: [PATCH] bug: add main function to ingest/evaluate.py (#2583) Conflicted on previous two merge. Add the main function back. --- CHANGELOG.md | 2 +- unstructured/ingest/evaluate.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6da2b9e1..a32edbd4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Features -* **Header and footer detection for fast strategy.** `partition_pdf` with `fast` strategy now +* **Header and footer detection for fast strategy** `partition_pdf` with `fast` strategy now detects elements that are in the top or bottom 5 percent of the page as headers and footers. * **Add parent_element to overlapping case output** Adds parent_element to the output for `identify_overlapping_or_nesting_case` and `catch_overlapping_and_nested_bboxes` functions. * **Add table structure evaluation** Adds a new function to evaluate the structure of a table and return a metric that represents the quality of the table structure. This function is used to evaluate the quality of the table structure and the table contents. diff --git a/unstructured/ingest/evaluate.py b/unstructured/ingest/evaluate.py index 6daf8f8da..318fc674e 100755 --- a/unstructured/ingest/evaluate.py +++ b/unstructured/ingest/evaluate.py @@ -207,3 +207,7 @@ def measure_table_structure_accuracy_command( return measure_table_structure_accuracy( output_dir, source_dir, output_list, source_list, export_dir, visualize, cutoff ) + + +if __name__ == "__main__": + main()