Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
30bd3a83
Commit
30bd3a83
authored
Feb 14, 2025
by
myhloli
Browse files
fix(pdf_parse): Fixed the issue where some headings were missing in certain complex layouts.
parent
619aabd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
magic_pdf/pdf_parse_union_core_v2.py
magic_pdf/pdf_parse_union_core_v2.py
+5
-4
No files found.
magic_pdf/pdf_parse_union_core_v2.py
View file @
30bd3a83
...
@@ -436,10 +436,11 @@ def cal_block_index(fix_blocks, sorted_bboxes):
...
@@ -436,10 +436,11 @@ def cal_block_index(fix_blocks, sorted_bboxes):
block_bboxes
.
append
(
block
[
'bbox'
])
block_bboxes
.
append
(
block
[
'bbox'
])
# 删除图表body block中的虚拟line信息, 并用real_lines信息回填
# 删除图表body block中的虚拟line信息, 并用real_lines信息回填
if
block
[
'type'
]
in
[
BlockType
.
ImageBody
,
BlockType
.
TableBody
]:
if
block
[
'type'
]
in
[
BlockType
.
ImageBody
,
BlockType
.
TableBody
,
BlockType
.
Title
,
BlockType
.
InterlineEquation
]:
block
[
'virtual_lines'
]
=
copy
.
deepcopy
(
block
[
'lines'
])
if
'real_lines'
in
block
:
block
[
'lines'
]
=
copy
.
deepcopy
(
block
[
'real_lines'
])
block
[
'virtual_lines'
]
=
copy
.
deepcopy
(
block
[
'lines'
])
del
block
[
'real_lines'
]
block
[
'lines'
]
=
copy
.
deepcopy
(
block
[
'real_lines'
])
del
block
[
'real_lines'
]
import
numpy
as
np
import
numpy
as
np
...
...
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