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
65c3ac66
Unverified
Commit
65c3ac66
authored
Aug 20, 2024
by
Kaiwen Liu
Committed by
GitHub
Aug 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<fix>(para_split_v2): index out of range issue of span_text first char (#396)
Co-authored-by:
liukaiwen
<
liukaiwen@pjlab.org.cn
>
parent
0b764d59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
47 deletions
+50
-47
para_split_v2.py
magic_pdf/para/para_split_v2.py
+50
-47
No files found.
magic_pdf/para/para_split_v2.py
View file @
65c3ac66
...
...
@@ -100,7 +100,7 @@ def __detect_list_lines(lines, new_layout_bboxes, lang):
if
lang
!=
'en'
:
return
lines
,
None
else
:
total_lines
=
len
(
lines
)
line_fea_encode
=
[]
"""
...
...
@@ -114,6 +114,9 @@ def __detect_list_lines(lines, new_layout_bboxes, lang):
x_map_tag_dict
,
min_x_tag
=
cluster_line_x
(
lines
)
for
l
in
lines
:
span_text
=
__get_span_text
(
l
[
'spans'
][
0
])
if
not
span_text
:
line_fea_encode
.
append
(
0
)
continue
first_char
=
span_text
[
0
]
layout
=
__find_layout_bbox_by_line
(
l
[
'bbox'
],
new_layout_bboxes
)
if
not
layout
:
...
...
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