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
6a993c16
Unverified
Commit
6a993c16
authored
May 07, 2024
by
myhloli
Committed by
GitHub
May 07, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #99 from papayalove/master
解决分段span丢失问题
parents
eebd9767
0fb9619a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
para_split_v2.py
magic_pdf/para/para_split_v2.py
+4
-1
No files found.
magic_pdf/para/para_split_v2.py
View file @
6a993c16
...
...
@@ -489,7 +489,10 @@ def __connect_para_inter_layoutbox(blocks_group, new_layout_bbox, lang):
connected_layout_blocks
.
append
(
blocks_group
[
0
])
for
i
in
range
(
1
,
len
(
blocks_group
)):
try
:
if
len
(
blocks_group
[
i
])
==
0
or
len
(
blocks_group
[
i
-
1
])
==
0
:
# TODO 考虑连接问题,
if
len
(
blocks_group
[
i
])
==
0
:
continue
if
len
(
blocks_group
[
i
-
1
])
==
0
:
# TODO 考虑连接问题,
connected_layout_blocks
.
append
(
blocks_group
[
i
])
continue
# text类型的段才需要考虑layout间的合并
if
blocks_group
[
i
-
1
][
-
1
][
"type"
]
!=
BlockType
.
Text
or
blocks_group
[
i
][
0
][
"type"
]
!=
BlockType
.
Text
:
...
...
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