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
05c0b9b3
Unverified
Commit
05c0b9b3
authored
Apr 30, 2024
by
myhloli
Committed by
GitHub
Apr 30, 2024
Browse files
Merge pull request #92 from icecraft/fix/key_error_replacee_equation
fix: keyerror in equation replace
parents
faa8a267
92f9df5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
magic_pdf/pre_proc/equations_replace.py
magic_pdf/pre_proc/equations_replace.py
+3
-0
No files found.
magic_pdf/pre_proc/equations_replace.py
View file @
05c0b9b3
...
@@ -258,6 +258,9 @@ def replace_line_v2(eqinfo, line):
...
@@ -258,6 +258,9 @@ def replace_line_v2(eqinfo, line):
last_overlap_span
=
-
1
last_overlap_span
=
-
1
delete_chars
=
[]
delete_chars
=
[]
for
i
in
range
(
0
,
len
(
line
[
"spans"
])):
for
i
in
range
(
0
,
len
(
line
[
"spans"
])):
if
"chars"
not
in
line
[
"spans"
][
i
]:
continue
if
line
[
"spans"
][
i
].
get
(
"_type"
,
None
)
is
not
None
:
if
line
[
"spans"
][
i
].
get
(
"_type"
,
None
)
is
not
None
:
continue
# 忽略,因为已经是插入的伪造span公式了
continue
# 忽略,因为已经是插入的伪造span公式了
...
...
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