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
91f7cff8
Commit
91f7cff8
authored
May 09, 2024
by
赵小蒙
Browse files
fix replace_equations without "score" bug
parent
e5907296
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
magic_pdf/pdf_parse_union_core.py
magic_pdf/pdf_parse_union_core.py
+3
-0
No files found.
magic_pdf/pdf_parse_union_core.py
View file @
91f7cff8
...
...
@@ -65,6 +65,7 @@ def txt_spans_extract(pdf_page, inline_equations, interline_equations):
"bbox"
:
list
(
span
[
"bbox"
]),
"content"
:
span
[
"latex"
],
"type"
:
ContentType
.
InlineEquation
,
"score"
:
1.0
,
}
)
elif
span
.
get
(
'type'
)
==
ContentType
.
InterlineEquation
:
...
...
@@ -73,6 +74,7 @@ def txt_spans_extract(pdf_page, inline_equations, interline_equations):
"bbox"
:
list
(
span
[
"bbox"
]),
"content"
:
span
[
"latex"
],
"type"
:
ContentType
.
InterlineEquation
,
"score"
:
1.0
,
}
)
else
:
...
...
@@ -81,6 +83,7 @@ def txt_spans_extract(pdf_page, inline_equations, interline_equations):
"bbox"
:
list
(
span
[
"bbox"
]),
"content"
:
span
[
"text"
],
"type"
:
ContentType
.
Text
,
"score"
:
1.0
,
}
)
return
spans
...
...
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