"vscode:/vscode.git/clone" did not exist on "d1123084973dd3a910760e77c499afad76d16cea"
Commit 91f7cff8 authored by 赵小蒙's avatar 赵小蒙
Browse files

fix replace_equations without "score" bug

parent e5907296
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment