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
fa6e305c
Commit
fa6e305c
authored
Apr 23, 2024
by
赵小蒙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2pipeline在分段区域增加异常捕获
parent
179ab593
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
pdf_parse_by_ocr_v2.py
magic_pdf/pdf_parse_by_ocr_v2.py
+5
-1
pdf_parse_by_txt_v2.py
magic_pdf/pdf_parse_by_txt_v2.py
+5
-1
No files found.
magic_pdf/pdf_parse_by_ocr_v2.py
View file @
fa6e305c
...
@@ -92,7 +92,11 @@ def parse_pdf_by_ocr(pdf_bytes,
...
@@ -92,7 +92,11 @@ def parse_pdf_by_ocr(pdf_bytes,
pdf_info_dict
[
f
"page_{page_id}"
]
=
page_info
pdf_info_dict
[
f
"page_{page_id}"
]
=
page_info
"""分段"""
"""分段"""
try
:
para_split
(
pdf_info_dict
,
debug_mode
=
debug_mode
)
para_split
(
pdf_info_dict
,
debug_mode
=
debug_mode
)
except
Exception
as
e
:
logger
.
exception
(
e
)
raise
e
"""dict转list"""
"""dict转list"""
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
...
...
magic_pdf/pdf_parse_by_txt_v2.py
View file @
fa6e305c
...
@@ -171,7 +171,11 @@ def parse_pdf_by_txt(
...
@@ -171,7 +171,11 @@ def parse_pdf_by_txt(
pdf_info_dict
[
f
"page_{page_id}"
]
=
page_info
pdf_info_dict
[
f
"page_{page_id}"
]
=
page_info
"""分段"""
"""分段"""
try
:
para_split
(
pdf_info_dict
,
debug_mode
=
debug_mode
)
para_split
(
pdf_info_dict
,
debug_mode
=
debug_mode
)
except
Exception
as
e
:
logger
.
exception
(
e
)
raise
e
"""dict转list"""
"""dict转list"""
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
pdf_info_list
=
dict_to_list
(
pdf_info_dict
)
...
...
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