浏览代码

add modify inline equation y axis
add false displayed equation to inline equation

liukaiwen 1 年之前
父节点
当前提交
5513e48ab8
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      magic_pdf/pre_proc/ocr_dict_merge.py

+ 1 - 0
magic_pdf/pre_proc/ocr_dict_merge.py

@@ -178,6 +178,7 @@ def modify_y_axis(spans: list):
             if (span_y0 < y0 and span_y > y0 or span_y0 < y1 and span_y > y1 or span_y0 < y0 and span_y > y1) and __is_overlaps_y_exceeds_threshold(span['bbox'], (0, y0, 0, y1)):
                 span["bbox"][1] = y0
                 # span["bbox"][3] = y1
+                #调整公式类型
                 if span["type"] == "displayed_equation":
                     span["type"] = "inline_equation"
                 break