fix table recognition bug#321

This commit is contained in:
liukaiwen
2024-08-05 16:54:35 +08:00
parent b8adb630ee
commit ec7271faee
+1 -1
View File
@@ -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)