Browse Source

fix table recognition bug#321

liukaiwen 1 year ago
parent
commit
ec7271faee
1 changed files with 1 additions and 1 deletions
  1. 1 1
      magic_pdf/dict2md/ocr_mkcontent.py

+ 1 - 1
magic_pdf/dict2md/ocr_mkcontent.py

@@ -255,7 +255,7 @@ def para_to_standard_format_v2(para_block, img_buket_path, page_idx):
         for block in para_block['blocks']:
             if block['type'] == BlockType.TableBody:
                 if block["lines"][0]["spans"][0].get('latex', ''):
-                    para_content['table_body'] = f"\n\n$\n {block['lines'][0]['spans'][0]['content']}\n$\n\n"
+                    para_content['table_body'] = f"\n\n$\n {block['lines'][0]['spans'][0]['latex']}\n$\n\n"
                 para_content['img_path'] = join_path(img_buket_path, block["lines"][0]["spans"][0]['image_path'])
             if block['type'] == BlockType.TableCaption:
                 para_content['table_caption'] = merge_para_with_text(block)