docs: 添加涉密文件自检工具实施计划

This commit is contained in:
2026-06-08 13:53:24 +08:00
commit 31161d9a5f
1838 changed files with 455407 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# 排版解析-多栏-单行
from .tbpu import Tbpu
from .parser_tools.line_preprocessing import linePreprocessing # 行预处理
from .parser_tools.gap_tree import GapTree # 间隙树排序算法
class MultiLine(Tbpu):
def __init__(self):
self.tbpuName = "排版解析-多栏-单行"
# 构建算法对象,指定包围盒的元素位置
self.gtree = GapTree(lambda tb: tb["normalized_bbox"])
def run(self, textBlocks):
textBlocks = linePreprocessing(textBlocks) # 预处理
textBlocks = self.gtree.sort(textBlocks) # 构建间隙树
# 补充行尾间隔符
for tb in textBlocks:
tb["end"] = "\n"
del tb["normalized_bbox"]
return textBlocks