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
384e0379
Unverified
Commit
384e0379
authored
Dec 01, 2024
by
Xiaomeng Zhao
Committed by
GitHub
Dec 01, 2024
Browse files
Merge pull request #1156 from myhloli/dev
refactor(para): adjust line height multiplier for block splitting
parents
b17084fe
41545a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
magic_pdf/para/para_split_v3.py
magic_pdf/para/para_split_v3.py
+2
-2
No files found.
magic_pdf/para/para_split_v3.py
View file @
384e0379
...
...
@@ -112,8 +112,8 @@ def __is_list_or_index_block(block):
line_mid_x
=
(
line
[
'bbox'
][
0
]
+
line
[
'bbox'
][
2
])
/
2
block_mid_x
=
(
block
[
'bbox_fs'
][
0
]
+
block
[
'bbox_fs'
][
2
])
/
2
if
(
line
[
'bbox'
][
0
]
-
block
[
'bbox_fs'
][
0
]
>
0.
8
*
line_height
and
block
[
'bbox_fs'
][
2
]
-
line
[
'bbox'
][
2
]
>
0.
8
*
line_height
line
[
'bbox'
][
0
]
-
block
[
'bbox_fs'
][
0
]
>
0.
7
*
line_height
and
block
[
'bbox_fs'
][
2
]
-
line
[
'bbox'
][
2
]
>
0.
7
*
line_height
):
external_sides_not_close_num
+=
1
if
abs
(
line_mid_x
-
block_mid_x
)
<
line_height
/
2
:
...
...
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