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
2fc6e9a3
Commit
2fc6e9a3
authored
Apr 26, 2024
by
liukaiwen
Browse files
更新了para_split
parent
1d81631b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
magic_pdf/para/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 @
2fc6e9a3
...
@@ -414,7 +414,10 @@ def __connect_list_inter_page(pre_page_paras, next_page_paras, pre_page_layout_b
...
@@ -414,7 +414,10 @@ def __connect_list_inter_page(pre_page_paras, next_page_paras, pre_page_layout_b
# 向layout_paras[i] 寻找开头具有相同缩进的连续的行
# 向layout_paras[i] 寻找开头具有相同缩进的连续的行
may_list_lines
=
[]
may_list_lines
=
[]
for
j
in
range
(
len
(
next_page_paras
[
0
])):
for
j
in
range
(
len
(
next_page_paras
[
0
])):
lines
=
next_page_paras
[
0
][
j
][
"lines"
]
next_page_block_j
=
next_page_paras
[
0
][
j
]
if
next_page_block_j
[
"type"
]
!=
BlockType
.
Text
:
break
lines
=
next_page_block_j
[
"lines"
]
if
len
(
lines
)
==
1
:
# 只可能是一行,多行情况再需要分析了
if
len
(
lines
)
==
1
:
# 只可能是一行,多行情况再需要分析了
if
lines
[
0
][
'bbox'
][
0
]
>
__find_layout_bbox_by_line
(
lines
[
0
][
'bbox'
],
next_page_layout_bbox
)[
0
]:
if
lines
[
0
][
'bbox'
][
0
]
>
__find_layout_bbox_by_line
(
lines
[
0
][
'bbox'
],
next_page_layout_bbox
)[
0
]:
may_list_lines
.
append
(
lines
[
0
])
may_list_lines
.
append
(
lines
[
0
])
...
...
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