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
642eaee2
Unverified
Commit
642eaee2
authored
Apr 26, 2024
by
myhloli
Committed by
GitHub
Apr 26, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75 from papayalove/master
更新了para_split
parents
1d81631b
2fc6e9a3
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 @
642eaee2
...
@@ -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