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
a19089a9
Unverified
Commit
a19089a9
authored
Mar 11, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Mar 11, 2025
Browse files
Merge pull request #1894 from myhloli/dev
fix(pre_proc): add Discarded block type to span block type compatibility
parents
cf15c065
7a856804
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
magic_pdf/pre_proc/ocr_dict_merge.py
magic_pdf/pre_proc/ocr_dict_merge.py
+9
-1
No files found.
magic_pdf/pre_proc/ocr_dict_merge.py
View file @
a19089a9
...
...
@@ -62,7 +62,15 @@ def merge_spans_to_line(spans, threshold=0.6):
def
span_block_type_compatible
(
span_type
,
block_type
):
if
span_type
in
[
ContentType
.
Text
,
ContentType
.
InlineEquation
]:
return
block_type
in
[
BlockType
.
Text
,
BlockType
.
Title
,
BlockType
.
ImageCaption
,
BlockType
.
ImageFootnote
,
BlockType
.
TableCaption
,
BlockType
.
TableFootnote
]
return
block_type
in
[
BlockType
.
Text
,
BlockType
.
Title
,
BlockType
.
ImageCaption
,
BlockType
.
ImageFootnote
,
BlockType
.
TableCaption
,
BlockType
.
TableFootnote
,
BlockType
.
Discarded
]
elif
span_type
==
ContentType
.
InterlineEquation
:
return
block_type
in
[
BlockType
.
InterlineEquation
,
BlockType
.
Text
]
elif
span_type
==
ContentType
.
Image
:
...
...
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