Skip to content

Commit

Permalink
Merge pull request #1156 from myhloli/dev
Browse files Browse the repository at this point in the history
refactor(para): adjust line height multiplier for block splitting
  • Loading branch information
myhloli authored Nov 30, 2024
2 parents b17084f + 41545a1 commit 384e037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magic_pdf/para/para_split_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def __is_list_or_index_block(block):
line_mid_x = (line['bbox'][0] + line['bbox'][2]) / 2
block_mid_x = (block['bbox_fs'][0] + block['bbox_fs'][2]) / 2
if (
line['bbox'][0] - block['bbox_fs'][0] > 0.8 * line_height
and block['bbox_fs'][2] - line['bbox'][2] > 0.8 * line_height
line['bbox'][0] - block['bbox_fs'][0] > 0.7 * line_height
and block['bbox_fs'][2] - line['bbox'][2] > 0.7 * line_height
):
external_sides_not_close_num += 1
if abs(line_mid_x - block_mid_x) < line_height / 2:
Expand Down

0 comments on commit 384e037

Please sign in to comment.