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
d95f5452
Unverified
Commit
d95f5452
authored
Apr 22, 2024
by
myhloli
Committed by
GitHub
Apr 22, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #50 from myhloli/master
统一使用ocr组装markdown
parents
f6d8f6ca
1340a97a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
AbsPipe.py
magic_pdf/pipe/AbsPipe.py
+3
-2
No files found.
magic_pdf/pipe/AbsPipe.py
View file @
d95f5452
...
@@ -106,8 +106,9 @@ class AbsPipe(ABC):
...
@@ -106,8 +106,9 @@ class AbsPipe(ABC):
parse_type
=
pdf_mid_data
[
"_parse_type"
]
parse_type
=
pdf_mid_data
[
"_parse_type"
]
pdf_info_list
=
pdf_mid_data
[
"pdf_info"
]
pdf_info_list
=
pdf_mid_data
[
"pdf_info"
]
if
parse_type
==
AbsPipe
.
PIP_TXT
:
if
parse_type
==
AbsPipe
.
PIP_TXT
:
content_list
=
mk_universal_format
(
pdf_info_list
,
img_buket_path
)
# content_list = mk_universal_format(pdf_info_list, img_buket_path)
md_content
=
mk_mm_markdown
(
content_list
)
# md_content = mk_mm_markdown(content_list)
md_content
=
ocr_mk_mm_markdown_with_para
(
pdf_info_list
,
img_buket_path
)
elif
parse_type
==
AbsPipe
.
PIP_OCR
:
elif
parse_type
==
AbsPipe
.
PIP_OCR
:
md_content
=
ocr_mk_mm_markdown_with_para
(
pdf_info_list
,
img_buket_path
)
md_content
=
ocr_mk_mm_markdown_with_para
(
pdf_info_list
,
img_buket_path
)
return
md_content
return
md_content
...
...
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