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
ec7271fa
Commit
ec7271fa
authored
Aug 05, 2024
by
liukaiwen
Browse files
fix table recognition bug#321
parent
b8adb630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
magic_pdf/dict2md/ocr_mkcontent.py
magic_pdf/dict2md/ocr_mkcontent.py
+1
-1
No files found.
magic_pdf/dict2md/ocr_mkcontent.py
View file @
ec7271fa
...
@@ -255,7 +255,7 @@ def para_to_standard_format_v2(para_block, img_buket_path, page_idx):
...
@@ -255,7 +255,7 @@ def para_to_standard_format_v2(para_block, img_buket_path, page_idx):
for
block
in
para_block
[
'blocks'
]:
for
block
in
para_block
[
'blocks'
]:
if
block
[
'type'
]
==
BlockType
.
TableBody
:
if
block
[
'type'
]
==
BlockType
.
TableBody
:
if
block
[
"lines"
][
0
][
"spans"
][
0
].
get
(
'latex'
,
''
):
if
block
[
"lines"
][
0
][
"spans"
][
0
].
get
(
'latex'
,
''
):
para_content
[
'table_body'
]
=
f
"
\n\n
$
\n
{
block
[
'lines'
][
0
][
'spans'
][
0
][
'
content
'
]
}
\n
$
\n\n
"
para_content
[
'table_body'
]
=
f
"
\n\n
$
\n
{
block
[
'lines'
][
0
][
'spans'
][
0
][
'
latex
'
]
}
\n
$
\n\n
"
para_content
[
'img_path'
]
=
join_path
(
img_buket_path
,
block
[
"lines"
][
0
][
"spans"
][
0
][
'image_path'
])
para_content
[
'img_path'
]
=
join_path
(
img_buket_path
,
block
[
"lines"
][
0
][
"spans"
][
0
][
'image_path'
])
if
block
[
'type'
]
==
BlockType
.
TableCaption
:
if
block
[
'type'
]
==
BlockType
.
TableCaption
:
para_content
[
'table_caption'
]
=
merge_para_with_text
(
block
)
para_content
[
'table_caption'
]
=
merge_para_with_text
(
block
)
...
...
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