Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

重构目录结构

赵小蒙7f0371da0e20
diff --git a/check_inline_formula.py b/othoers/check_inline_formula.py
similarity index 100%
rename from check_inline_formula.py
rename to othoers/check_inline_formula.py
diff --git a/pdf2json_infer.py b/othoers/pdf2json_infer.py
similarity index 99%
rename from pdf2json_infer.py
rename to othoers/pdf2json_infer.py
index 1ade9089..889e425a 100644
--- a/pdf2json_infer.py
+++ b/othoers/pdf2json_infer.py
@@ -24,10 +24,10 @@ from validation import cal_edit_distance, format_gt_bbox, label_match, detect_va
from layout.bbox_sort import bbox_sort, CONTENT_IDX, CONTENT_TYPE_IDX
from pre_proc.detect_images import parse_images # 获取figures的bbox
-from pdf2text_recogTable import parse_tables # 获取tables的bbox
+from pre_proc.detect_tables import parse_tables # 获取tables的bbox
from pre_proc.detect_equation import parse_equations # 获取equations的bbox
# from pdf2text_recogFootnote import parse_footnotes # 获取footnotes的bbox
-from pdf2text_recogPara import process_blocks_per_page
+from post_proc.detect_para import process_blocks_per_page
from libs.commons import parse_aws_param, parse_bucket_key, read_file, join_path
diff --git a/pdf2text_evaluatePdfLayout.py b/othoers/pdf2text_evaluatePdfLayout.py
similarity index 100%
rename from pdf2text_evaluatePdfLayout.py
rename to othoers/pdf2text_evaluatePdfLayout.py
diff --git a/pdf2text_getNumberOfColumn.py b/othoers/pdf2text_getNumberOfColumn.py
similarity index 100%
rename from pdf2text_getNumberOfColumn.py
rename to othoers/pdf2text_getNumberOfColumn.py
diff --git a/pdf2text_recogFootnoteLine.py b/othoers/pdf2text_recogFootnoteLine.py
similarity index 100%
rename from pdf2text_recogFootnoteLine.py
rename to othoers/pdf2text_recogFootnoteLine.py
diff --git a/pdf2text_recogPara_v2.py b/othoers/pdf2text_recogPara_v2.py
similarity index 99%
rename from pdf2text_recogPara_v2.py
rename to othoers/pdf2text_recogPara_v2.py
index aa3d0914..afc210ef 100644
--- a/pdf2text_recogPara_v2.py
+++ b/othoers/pdf2text_recogPara_v2.py
@@ -3469,7 +3469,7 @@ class ParaProcessPipeline:
"""
Run this script to test the function with Command:
-python pdf2text_recogPara.py [pdf_path] [output_pdf_path]
+python detect_para.py [pdf_path] [output_pdf_path]
Params:
- pdf_path: the path of the pdf file
diff --git a/pdf2text_recogTitle.py b/othoers/pdf2text_recogTitle.py
similarity index 100%
rename from pdf2text_recogTitle.py
rename to othoers/pdf2text_recogTitle.py
diff --git a/vali_bbox_sort.py b/othoers/vali_bbox_sort.py
similarity index 100%
rename from vali_bbox_sort.py
rename to othoers/vali_bbox_sort.py
diff --git a/validation.py b/othoers/validation.py
similarity index 100%
rename from validation.py
rename to othoers/validation.py
diff --git a/pipeline/pdf_parse_by_model.py b/pipeline/pdf_parse_by_model.py
index 0bd7eafc..da973444 100644
--- a/pipeline/pdf_parse_by_model.py
+++ b/pipeline/pdf_parse_by_model.py
@@ -16,14 +16,14 @@ from libs.markdown_utils import escape_special_markdown_char
from libs.safe_filename import sanitize_filename
from libs.vis_utils import draw_bbox_on_page, draw_layout_bbox_on_page
from pre_proc.detect_images import parse_images
-from pdf2text_recogTable import parse_tables # 获取tables的bbox
+from pre_proc.detect_tables import parse_tables # 获取tables的bbox
from pre_proc.detect_equation import parse_equations # 获取equations的bbox
-from pdf2text_recogHeader import parse_headers # 获取headers的bbox
-from pdf2text_recogPageNo import parse_pageNos # 获取pageNos的bbox
+from pre_proc.detect_header import parse_headers # 获取headers的bbox
+from pre_proc.detect_page_number import parse_pageNos # 获取pageNos的bbox
from pre_proc.detect_footnote import parse_footnotes_by_model, parse_footnotes_by_rule # 获取footnotes的bbox
from pre_proc.detect_footer_by_model import parse_footers # 获取footers的bbox
-from pdf2text_recogPara import (
+from post_proc.detect_para import (
ParaProcessPipeline,
TitleDetectionException,
TitleLevelException,
diff --git a/pdf2text_recogPara.py b/post_proc/detect_para.py
similarity index 99%
rename from pdf2text_recogPara.py
rename to post_proc/detect_para.py
index ddabde89..5aa67300 100644
--- a/pdf2text_recogPara.py
+++ b/post_proc/detect_para.py
@@ -3395,7 +3395,7 @@ class ParaProcessPipeline:
"""
Run this script to test the function with Command:
-python pdf2text_recogPara.py [pdf_path] [output_pdf_path]
+python detect_para.py [pdf_path] [output_pdf_path]
Params:
- pdf_path: the path of the pdf file
diff --git a/pdf2text_recogHeader.py b/pre_proc/detect_header.py
similarity index 100%
rename from pdf2text_recogHeader.py
rename to pre_proc/detect_header.py
diff --git a/pdf2text_recogPageNo.py b/pre_proc/detect_page_number.py
similarity index 100%
rename from pdf2text_recogPageNo.py
rename to pre_proc/detect_page_number.py
diff --git a/pdf2text_recogTable.py b/pre_proc/detect_tables.py
similarity index 100%
rename from pdf2text_recogTable.py
rename to pre_proc/detect_tables.py
diff --git a/test/test_para/test_pdf2text_recogPara_BlockContinuationProcessor.py b/test/test_para/test_pdf2text_recogPara_BlockContinuationProcessor.py
index 08cce0e6..91bff3f5 100644
--- a/test/test_para/test_pdf2text_recogPara_BlockContinuationProcessor.py
+++ b/test/test_para/test_pdf2text_recogPara_BlockContinuationProcessor.py
@@ -1,6 +1,6 @@
import unittest
-from pdf2text_recogPara import BlockContinuationProcessor
+from post_proc.detect_para import BlockContinuationProcessor
# from ... pdf2text_recogPara import BlockContinuationProcessor # another way to import
diff --git a/test/test_para/test_pdf2text_recogPara_BlockInnerParasProcessor.py b/test/test_para/test_pdf2text_recogPara_BlockInnerParasProcessor.py
index 676bd183..209c4a53 100644
--- a/test/test_para/test_pdf2text_recogPara_BlockInnerParasProcessor.py
+++ b/test/test_para/test_pdf2text_recogPara_BlockInnerParasProcessor.py
@@ -1,6 +1,6 @@
import unittest
-from pdf2text_recogPara import BlockTerminationProcessor
+from post_proc.detect_para import BlockTerminationProcessor
# from ... pdf2text_recogPara import BlockInnerParasProcessor # another way to import
diff --git a/test/test_para/test_pdf2text_recogPara_Common.py b/test/test_para/test_pdf2text_recogPara_Common.py
index 6fa43219..a7e38848 100644
--- a/test/test_para/test_pdf2text_recogPara_Common.py
+++ b/test/test_para/test_pdf2text_recogPara_Common.py
@@ -1,6 +1,6 @@
import unittest
-from pdf2text_recogPara import (
+from post_proc.detect_para import (
is_bbox_overlap,
is_in_bbox,
is_line_right_aligned_from_neighbors,
diff --git a/test/test_para/test_pdf2text_recogPara_TitleProcessor.py b/test/test_para/test_pdf2text_recogPara_TitleProcessor.py
index f5e59d8b..01afdca5 100644
--- a/test/test_para/test_pdf2text_recogPara_TitleProcessor.py
+++ b/test/test_para/test_pdf2text_recogPara_TitleProcessor.py
@@ -2,7 +2,7 @@ import json
import unittest
from utils_for_test_para import UtilsForTestPara
-from pdf2text_recogPara import TitleProcessor
+from post_proc.detect_para import TitleProcessor
# from ... pdf2text_recogPara import * # another way to import