Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
2284e0d7
Commit
2284e0d7
authored
Jun 13, 2024
by
liukaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复分段边界问题
parent
f80560ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
para_split_v2.py
magic_pdf/para/para_split_v2.py
+9
-2
No files found.
magic_pdf/para/para_split_v2.py
View file @
2284e0d7
...
...
@@ -586,8 +586,15 @@ def __connect_para_inter_page(pre_page_paras, next_page_paras, pre_page_layout_b
# 不是文本,不连接
return
False
pre_x2_max
=
__find_layout_bbox_by_line
(
pre_last_line
[
'bbox'
],
pre_page_layout_bbox
)[
2
]
next_x0_min
=
__find_layout_bbox_by_line
(
next_first_line
[
'bbox'
],
next_page_layout_bbox
)[
0
]
pre_x2_max_bbox
=
__find_layout_bbox_by_line
(
pre_last_line
[
'bbox'
],
pre_page_layout_bbox
)
if
not
pre_x2_max_bbox
:
return
False
next_x0_min_bbox
=
__find_layout_bbox_by_line
(
next_first_line
[
'bbox'
],
next_page_layout_bbox
)
if
not
next_x0_min_bbox
:
return
False
pre_x2_max
=
pre_x2_max_bbox
[
2
]
next_x0_min
=
next_x0_min_bbox
[
0
]
pre_last_line_text
=
pre_last_line_text
.
strip
()
next_first_line_text
=
next_first_line_text
.
strip
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment