Commit af2a36ab authored by quyuan's avatar quyuan

Merge branch 'master' of https://github.com/magicpdf/Magic-PDF

parents 484b3304 a288b572
...@@ -59,25 +59,7 @@ def txt_spans_extract(pdf_page, inline_equations, interline_equations): ...@@ -59,25 +59,7 @@ def txt_spans_extract(pdf_page, inline_equations, interline_equations):
bbox = span["bbox"] bbox = span["bbox"]
if float_equal(bbox[0], bbox[2]) or float_equal(bbox[1], bbox[3]): if float_equal(bbox[0], bbox[2]) or float_equal(bbox[1], bbox[3]):
continue continue
if span.get('type') == ContentType.InlineEquation: if span.get('type') not in (ContentType.InlineEquation, ContentType.InterlineEquation):
spans.append(
{
"bbox": list(span["bbox"]),
"content": span["latex"],
"type": ContentType.InlineEquation,
"score": 1.0,
}
)
elif span.get('type') == ContentType.InterlineEquation:
spans.append(
{
"bbox": list(span["bbox"]),
"content": span["latex"],
"type": ContentType.InterlineEquation,
"score": 1.0,
}
)
else:
spans.append( spans.append(
{ {
"bbox": list(span["bbox"]), "bbox": list(span["bbox"]),
......
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