Ver código fonte

fix: extend text block handling to include reference text in draw_bbox.py

myhloli 2 meses atrás
pai
commit
c5b2926c7b
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      mineru/utils/draw_bbox.py

+ 1 - 1
mineru/utils/draw_bbox.py

@@ -176,7 +176,7 @@ def draw_layout_bbox(pdf_info, pdf_bytes, out_path, filename):
                         codes_caption.append(bbox)
             elif block["type"] == BlockType.TITLE:
                 titles.append(bbox)
-            elif block["type"] == BlockType.TEXT:
+            elif block["type"] in [BlockType.TEXT, BlockType.REF_TEXT]:
                 texts.append(bbox)
             elif block["type"] == BlockType.INTERLINE_EQUATION:
                 interequations.append(bbox)